SlideShare une entreprise Scribd logo
1  sur  12
Supervisor Call and Pendable service call
● Two exceptions targeted at software and operating systems
Supervisor Call
● Generates system function calls.
● When a user program wants to use certain hardware, it generates the
SVC exception using SVC instructions
● The software exception handler in the operating system is executed
and provides the service the user application requested
● SVC can also make software more portable because the user
application does not need to know the programming details of the
hardware
Instructions in SVC
● SVC exception is generated using the SVC instruction.
Ex:
SVC #0x3 ; Call SVC function 3
SVC 0x3 ; Call SVC function 3
SVC as a Gateway for OS Functions.
Pendable Service Call
● PendSV can be pended and is useful for an OS to pend an exception
so that an action can be performed after other important tasks are
completed.
● PendSV is generated by writing 1 to the PENDSVSET bit in the NVIC
Interrupt Control State register.
● A typical use of PendSV is context switching
Example
A system might have two active tasks, and context switching can be
triggered by the following:
• Calling an SVC function
• The system timer (SYSTICK)
SYSTICK to switch between two tasks
Context switching at the IRQ - Problem
Context switching with PendSV
Context switching example with PendSV
1. Task A calls SVC for task switching (for example, waiting for some work
to complete).
2. The OS receives the request, prepares for context switching, and
pends the PendSV exception.
3. When the CPU exits SVC, it enters PendSV immediately and does the
context switch.
4. When PendSV finishes and returns to the thread level, it executes Task
B.
Contd...
5. An interrupt occurs and the interrupt handler is entered.
6. While running the interrupt handler routine, a SYSTICK exception (for
OS tick) takes place.
7. The OS carries out the essential operation, then pends the PendSV
exception and gets ready for the context switch.
8. When the SYSTICK exception exits, it returns to the interrupt service
routine.
Contd...
9. When the interrupt service routine completes, the PendSV starts and
does the actual context switch operations.
10. When PendSV is complete, the program returns to the thread level;
this time it returns to Task A and continues the processing.

Contenu connexe

Tendances

Sara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time Systems
Sara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time SystemsSara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time Systems
Sara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time Systems
knowdiff
 

Tendances (20)

Superscalar Processor
Superscalar ProcessorSuperscalar Processor
Superscalar Processor
 
Shared-Memory Multiprocessors
Shared-Memory MultiprocessorsShared-Memory Multiprocessors
Shared-Memory Multiprocessors
 
Real Time Systems
Real Time SystemsReal Time Systems
Real Time Systems
 
ARM Processors
ARM ProcessorsARM Processors
ARM Processors
 
Raspberry Pi
Raspberry Pi Raspberry Pi
Raspberry Pi
 
UNIT 2 8086 System Bus Structure.pptx
UNIT 2 8086 System Bus Structure.pptxUNIT 2 8086 System Bus Structure.pptx
UNIT 2 8086 System Bus Structure.pptx
 
Lect 2 ARM processor architecture
Lect 2 ARM processor architectureLect 2 ARM processor architecture
Lect 2 ARM processor architecture
 
Unit II arm 7 Instruction Set
Unit II arm 7 Instruction SetUnit II arm 7 Instruction Set
Unit II arm 7 Instruction Set
 
Ec8791 lpc2148 pwm
Ec8791 lpc2148 pwmEc8791 lpc2148 pwm
Ec8791 lpc2148 pwm
 
Arm instruction set
Arm instruction setArm instruction set
Arm instruction set
 
Addressing sequencing
Addressing sequencingAddressing sequencing
Addressing sequencing
 
RISC (reduced instruction set computer)
RISC (reduced instruction set computer)RISC (reduced instruction set computer)
RISC (reduced instruction set computer)
 
8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controller8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controller
 
RISC - Reduced Instruction Set Computing
RISC - Reduced Instruction Set ComputingRISC - Reduced Instruction Set Computing
RISC - Reduced Instruction Set Computing
 
Pipelining and vector processing
Pipelining and vector processingPipelining and vector processing
Pipelining and vector processing
 
VLIW Processors
VLIW ProcessorsVLIW Processors
VLIW Processors
 
80486 microprocessor
80486 microprocessor80486 microprocessor
80486 microprocessor
 
Sara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time Systems
Sara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time SystemsSara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time Systems
Sara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time Systems
 
8251 USART
8251 USART8251 USART
8251 USART
 
INTERRUPT LATENCY AND RESPONSE OF THE TASK
INTERRUPT LATENCY AND RESPONSE OF THE TASKINTERRUPT LATENCY AND RESPONSE OF THE TASK
INTERRUPT LATENCY AND RESPONSE OF THE TASK
 

Similaire à Supervisor call and pendable service call

Cisco data center support
Cisco data center supportCisco data center support
Cisco data center support
Krunal Shah
 
Virtualization summary b.docx
Virtualization summary b.docxVirtualization summary b.docx
Virtualization summary b.docx
shruti533256
 

Similaire à Supervisor call and pendable service call (20)

Demystifying openvswitch
Demystifying openvswitchDemystifying openvswitch
Demystifying openvswitch
 
Cisco data center support
Cisco data center supportCisco data center support
Cisco data center support
 
PhD Slides
PhD SlidesPhD Slides
PhD Slides
 
Half a year with contrail at production
Half a year with contrail at productionHalf a year with contrail at production
Half a year with contrail at production
 
Virtualization summary b.docx
Virtualization summary b.docxVirtualization summary b.docx
Virtualization summary b.docx
 
Autosar-software-component_0hg.pptx
Autosar-software-component_0hg.pptxAutosar-software-component_0hg.pptx
Autosar-software-component_0hg.pptx
 
Interrupts.ppt
Interrupts.pptInterrupts.ppt
Interrupts.ppt
 
Autosar software component
Autosar software componentAutosar software component
Autosar software component
 
Nesc tutorial
Nesc tutorialNesc tutorial
Nesc tutorial
 
Skillwise cics part 1
Skillwise cics part 1Skillwise cics part 1
Skillwise cics part 1
 
0903 1
0903 10903 1
0903 1
 
Topology Service Injection using Dragonflow & Kuryr
Topology Service Injection using Dragonflow & KuryrTopology Service Injection using Dragonflow & Kuryr
Topology Service Injection using Dragonflow & Kuryr
 
OSEK / VDX
OSEK / VDXOSEK / VDX
OSEK / VDX
 
Control unit design
Control unit designControl unit design
Control unit design
 
Linux Internals - Part II
Linux Internals - Part IILinux Internals - Part II
Linux Internals - Part II
 
CICS error and exception handling-recovery and restart-session 6
CICS error and exception handling-recovery and restart-session 6CICS error and exception handling-recovery and restart-session 6
CICS error and exception handling-recovery and restart-session 6
 
XPDDS18: Real Time in XEN on ARM - Andrii Anisov, EPAM Systems Inc.
XPDDS18: Real Time in XEN on ARM - Andrii Anisov, EPAM Systems Inc.XPDDS18: Real Time in XEN on ARM - Andrii Anisov, EPAM Systems Inc.
XPDDS18: Real Time in XEN on ARM - Andrii Anisov, EPAM Systems Inc.
 
Upgrading Your System: A Telco User Perspectiv
Upgrading Your System: A Telco User PerspectivUpgrading Your System: A Telco User Perspectiv
Upgrading Your System: A Telco User Perspectiv
 
Exam viewer2
Exam viewer2Exam viewer2
Exam viewer2
 
FlexSC
FlexSCFlexSC
FlexSC
 

Plus de PriyangaKR1

Plus de PriyangaKR1 (20)

Lpc 17xx adc
Lpc 17xx adcLpc 17xx adc
Lpc 17xx adc
 
Lpc 1768 timers
Lpc 1768 timersLpc 1768 timers
Lpc 1768 timers
 
CCTV
CCTVCCTV
CCTV
 
Washing machine
Washing machineWashing machine
Washing machine
 
Rice cooker
Rice cookerRice cooker
Rice cooker
 
Refrigerators
RefrigeratorsRefrigerators
Refrigerators
 
Air conditioners
Air conditionersAir conditioners
Air conditioners
 
Microwave oven
Microwave ovenMicrowave oven
Microwave oven
 
Ups and burglar alarm
Ups and burglar alarmUps and burglar alarm
Ups and burglar alarm
 
Arm Development Tools
Arm Development ToolsArm Development Tools
Arm Development Tools
 
Arm instruction set
Arm instruction setArm instruction set
Arm instruction set
 
Multimedia compression networks
Multimedia compression networksMultimedia compression networks
Multimedia compression networks
 
Trends and satellite
Trends and satelliteTrends and satellite
Trends and satellite
 
Mobile around the world and wireless communication examples
Mobile around the world and wireless communication examplesMobile around the world and wireless communication examples
Mobile around the world and wireless communication examples
 
Mobile communication - Introduction
Mobile communication - IntroductionMobile communication - Introduction
Mobile communication - Introduction
 
Root locus tech
Root locus techRoot locus tech
Root locus tech
 
Real time operating systems
Real time operating systemsReal time operating systems
Real time operating systems
 
Timers done by Priyanga KR
Timers done by Priyanga KRTimers done by Priyanga KR
Timers done by Priyanga KR
 
Instruction sets picc done by Priyanga KR
Instruction sets   picc done by Priyanga KRInstruction sets   picc done by Priyanga KR
Instruction sets picc done by Priyanga KR
 
Pic architecture done by Priyanga KR
Pic architecture done by Priyanga KRPic architecture done by Priyanga KR
Pic architecture done by Priyanga KR
 

Dernier

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 

Dernier (20)

ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 

Supervisor call and pendable service call

  • 1. Supervisor Call and Pendable service call ● Two exceptions targeted at software and operating systems
  • 2. Supervisor Call ● Generates system function calls. ● When a user program wants to use certain hardware, it generates the SVC exception using SVC instructions ● The software exception handler in the operating system is executed and provides the service the user application requested ● SVC can also make software more portable because the user application does not need to know the programming details of the hardware
  • 3. Instructions in SVC ● SVC exception is generated using the SVC instruction. Ex: SVC #0x3 ; Call SVC function 3 SVC 0x3 ; Call SVC function 3
  • 4. SVC as a Gateway for OS Functions.
  • 5. Pendable Service Call ● PendSV can be pended and is useful for an OS to pend an exception so that an action can be performed after other important tasks are completed. ● PendSV is generated by writing 1 to the PENDSVSET bit in the NVIC Interrupt Control State register. ● A typical use of PendSV is context switching
  • 6. Example A system might have two active tasks, and context switching can be triggered by the following: • Calling an SVC function • The system timer (SYSTICK)
  • 7. SYSTICK to switch between two tasks
  • 8. Context switching at the IRQ - Problem
  • 10. Context switching example with PendSV 1. Task A calls SVC for task switching (for example, waiting for some work to complete). 2. The OS receives the request, prepares for context switching, and pends the PendSV exception. 3. When the CPU exits SVC, it enters PendSV immediately and does the context switch. 4. When PendSV finishes and returns to the thread level, it executes Task B.
  • 11. Contd... 5. An interrupt occurs and the interrupt handler is entered. 6. While running the interrupt handler routine, a SYSTICK exception (for OS tick) takes place. 7. The OS carries out the essential operation, then pends the PendSV exception and gets ready for the context switch. 8. When the SYSTICK exception exits, it returns to the interrupt service routine.
  • 12. Contd... 9. When the interrupt service routine completes, the PendSV starts and does the actual context switch operations. 10. When PendSV is complete, the program returns to the thread level; this time it returns to Task A and continues the processing.