SlideShare a Scribd company logo
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.

More Related Content

What's hot

SOC System Design Approach
SOC System Design ApproachSOC System Design Approach
SOC System Design Approach
A B Shinde
 
Embedded Systems (18EC62) - ARM Cortex-M3 Instruction Set and Programming (Mo...
Embedded Systems (18EC62) - ARM Cortex-M3 Instruction Set and Programming (Mo...Embedded Systems (18EC62) - ARM Cortex-M3 Instruction Set and Programming (Mo...
Embedded Systems (18EC62) - ARM Cortex-M3 Instruction Set and Programming (Mo...
Shrishail Bhat
 
Instruction sets of 8086
Instruction sets of 8086Instruction sets of 8086
Instruction sets of 8086
Mahalakshmiv11
 
Rtos concepts
Rtos conceptsRtos concepts
Rtos concepts
anishgoel
 
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I Core of Embedded Systems
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I   Core of Embedded SystemsSYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I   Core of Embedded Systems
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I Core of Embedded Systems
Arti Parab Academics
 
I2C Protocol
I2C ProtocolI2C Protocol
I2C Protocol
Anurag Tomar
 
8259 Programmable Interrupt Controller by vijay
8259 Programmable Interrupt Controller by vijay8259 Programmable Interrupt Controller by vijay
8259 Programmable Interrupt Controller by vijay
Vijay Kumar
 
I2C BUS PROTOCOL
I2C BUS PROTOCOLI2C BUS PROTOCOL
I2C BUS PROTOCOL
Kashyap Mandaliya
 
Input Output Organization
Input Output OrganizationInput Output Organization
Input Output Organization
Kamal Acharya
 
Introduction to ARM LPC2148
Introduction to ARM LPC2148Introduction to ARM LPC2148
Introduction to ARM LPC2148
Veera Kumar
 
ARM Processors
ARM ProcessorsARM Processors
ARM Processors
Mathivanan Natarajan
 
ARM CORTEX M3 PPT
ARM CORTEX M3 PPTARM CORTEX M3 PPT
ARM CORTEX M3 PPT
Gaurav Verma
 
Unit vi (1)
Unit vi (1)Unit vi (1)
Unit vi (1)
Siva Nageswararao
 
Embedded systems notes
Embedded systems notesEmbedded systems notes
Embedded systems notes
Shikha Sharma
 
REAL TIME OPERATING SYSTEM
REAL TIME OPERATING SYSTEMREAL TIME OPERATING SYSTEM
REAL TIME OPERATING SYSTEMprakrutijsh
 
Pentium processor
Pentium processorPentium processor
Pentium processor
Pranjali Deshmukh
 
Interrupts
InterruptsInterrupts
Interrupts
deval patel
 
Lect 2 ARM processor architecture
Lect 2 ARM processor architectureLect 2 ARM processor architecture
Lect 2 ARM processor architecture
Dr.YNM
 
Arbiters
ArbitersArbiters
Arbiters
prasanth gavara
 

What's hot (20)

SOC System Design Approach
SOC System Design ApproachSOC System Design Approach
SOC System Design Approach
 
Embedded Systems (18EC62) - ARM Cortex-M3 Instruction Set and Programming (Mo...
Embedded Systems (18EC62) - ARM Cortex-M3 Instruction Set and Programming (Mo...Embedded Systems (18EC62) - ARM Cortex-M3 Instruction Set and Programming (Mo...
Embedded Systems (18EC62) - ARM Cortex-M3 Instruction Set and Programming (Mo...
 
Instruction sets of 8086
Instruction sets of 8086Instruction sets of 8086
Instruction sets of 8086
 
Rtos concepts
Rtos conceptsRtos concepts
Rtos concepts
 
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I Core of Embedded Systems
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I   Core of Embedded SystemsSYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I   Core of Embedded Systems
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I Core of Embedded Systems
 
I2C Protocol
I2C ProtocolI2C Protocol
I2C Protocol
 
8259 Programmable Interrupt Controller by vijay
8259 Programmable Interrupt Controller by vijay8259 Programmable Interrupt Controller by vijay
8259 Programmable Interrupt Controller by vijay
 
I2C BUS PROTOCOL
I2C BUS PROTOCOLI2C BUS PROTOCOL
I2C BUS PROTOCOL
 
Input Output Organization
Input Output OrganizationInput Output Organization
Input Output Organization
 
Introduction to ARM LPC2148
Introduction to ARM LPC2148Introduction to ARM LPC2148
Introduction to ARM LPC2148
 
ARM Processors
ARM ProcessorsARM Processors
ARM Processors
 
Types Of Buses
Types Of BusesTypes Of Buses
Types Of Buses
 
ARM CORTEX M3 PPT
ARM CORTEX M3 PPTARM CORTEX M3 PPT
ARM CORTEX M3 PPT
 
Unit vi (1)
Unit vi (1)Unit vi (1)
Unit vi (1)
 
Embedded systems notes
Embedded systems notesEmbedded systems notes
Embedded systems notes
 
REAL TIME OPERATING SYSTEM
REAL TIME OPERATING SYSTEMREAL TIME OPERATING SYSTEM
REAL TIME OPERATING SYSTEM
 
Pentium processor
Pentium processorPentium processor
Pentium processor
 
Interrupts
InterruptsInterrupts
Interrupts
 
Lect 2 ARM processor architecture
Lect 2 ARM processor architectureLect 2 ARM processor architecture
Lect 2 ARM processor architecture
 
Arbiters
ArbitersArbiters
Arbiters
 

Similar to Supervisor call and pendable service call

Demystifying openvswitch
Demystifying openvswitchDemystifying openvswitch
Demystifying openvswitch
Prasad Mukhedkar
 
Cisco data center support
Cisco data center supportCisco data center support
Cisco data center supportKrunal Shah
 
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
Krzysztof Kowalik
 
Virtualization summary b.docx
Virtualization summary b.docxVirtualization summary b.docx
Virtualization summary b.docx
shruti533256
 
Autosar-software-component_0hg.pptx
Autosar-software-component_0hg.pptxAutosar-software-component_0hg.pptx
Autosar-software-component_0hg.pptx
fallleaf1104
 
Interrupts.ppt
Interrupts.pptInterrupts.ppt
Interrupts.ppt
SasiBhushan22
 
Autosar software component
Autosar software componentAutosar software component
Autosar software component
Farzad Sadeghi
 
Skillwise cics part 1
Skillwise cics part 1Skillwise cics part 1
Skillwise cics part 1
Skillwise Group
 
Topology Service Injection using Dragonflow & Kuryr
Topology Service Injection using Dragonflow & KuryrTopology Service Injection using Dragonflow & Kuryr
Topology Service Injection using Dragonflow & Kuryr
Eshed Gal-Or
 
OSEK / VDX
OSEK / VDXOSEK / VDX
OSEK / VDX
JOLLUSUDARSHANREDDY
 
Control unit design
Control unit designControl unit design
Control unit design
Dhaval Bagal
 
Linux Internals - Part II
Linux Internals - Part IILinux Internals - Part II
Linux Internals - Part II
Emertxe Information Technologies Pvt Ltd
 
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
Srinimf-Slides
 
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.
The Linux Foundation
 
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
OPNFV
 
Exam viewer2
Exam viewer2Exam viewer2
Exam viewer2
Jorgito Leal
 
FlexSC
FlexSCFlexSC
FlexSC
YongraeJo
 

Similar to 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
 

More from PriyangaKR1

Lpc 17xx adc
Lpc 17xx adcLpc 17xx adc
Lpc 17xx adc
PriyangaKR1
 
Lpc 1768 timers
Lpc 1768 timersLpc 1768 timers
Lpc 1768 timers
PriyangaKR1
 
CCTV
CCTVCCTV
Washing machine
Washing machineWashing machine
Washing machine
PriyangaKR1
 
Rice cooker
Rice cookerRice cooker
Rice cooker
PriyangaKR1
 
Refrigerators
RefrigeratorsRefrigerators
Refrigerators
PriyangaKR1
 
Air conditioners
Air conditionersAir conditioners
Air conditioners
PriyangaKR1
 
Microwave oven
Microwave ovenMicrowave oven
Microwave oven
PriyangaKR1
 
Ups and burglar alarm
Ups and burglar alarmUps and burglar alarm
Ups and burglar alarm
PriyangaKR1
 
Arm Development Tools
Arm Development ToolsArm Development Tools
Arm Development Tools
PriyangaKR1
 
Arm instruction set
Arm instruction setArm instruction set
Arm instruction set
PriyangaKR1
 
Multimedia compression networks
Multimedia compression networksMultimedia compression networks
Multimedia compression networks
PriyangaKR1
 
Trends and satellite
Trends and satelliteTrends and satellite
Trends and satellite
PriyangaKR1
 
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
PriyangaKR1
 
Mobile communication - Introduction
Mobile communication - IntroductionMobile communication - Introduction
Mobile communication - Introduction
PriyangaKR1
 
Root locus tech
Root locus techRoot locus tech
Root locus tech
PriyangaKR1
 
Real time operating systems
Real time operating systemsReal time operating systems
Real time operating systems
PriyangaKR1
 
Timers done by Priyanga KR
Timers done by Priyanga KRTimers done by Priyanga KR
Timers done by Priyanga KR
PriyangaKR1
 
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
PriyangaKR1
 
Pic architecture done by Priyanga KR
Pic architecture done by Priyanga KRPic architecture done by Priyanga KR
Pic architecture done by Priyanga KR
PriyangaKR1
 

More from 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
 

Recently uploaded

Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
Kamal Acharya
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.
PrashantGoswami42
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
DuvanRamosGarzon1
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
Kamal Acharya
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
ShahidSultan24
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 

Recently uploaded (20)

Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 

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.