SlideShare a Scribd company logo
1 of 34
System Calls & Libraries Vivek Pai Lecture 4, COS318 Sep 25, 2001
Gedankundmathematics ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],System Calls & Libraries
Mechanics ,[object Object],[object Object],[object Object],[object Object],System Calls & Libraries
Protection Issues ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],System Calls & Libraries
Protection Is Not Safety/Security ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],System Calls & Libraries
Support in Modern Processors: User    Kernel System Calls & Libraries ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],An interrupt or exception ( INT ) A special instruction ( IRET )
Why a Privileged Mode? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],System Calls & Libraries
x86 Protection Rings System Calls & Libraries Level 0 Level 1 Level 2 Level 3 Operating system kernel Operating system services Applications Privileged instructions Can be executed only When current privileged Level (CPR) is 0
Other Design Approaches ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],System Calls & Libraries
Monolithic ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],System Calls & Libraries Kernel many many things entry User program User program call return
Monolithic Pros and Cons ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],System Calls & Libraries
Layered Structure ,[object Object],[object Object],[object Object],[object Object],[object Object],System Calls & Libraries Hardware Level 1 Level 2 Level N . . .
Layering Pros and Cons ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],System Calls & Libraries
Microkernel ,[object Object],[object Object],[object Object],[object Object],System Calls & Libraries  kernel entry User program Services call return
Microkernel Pros and Cons ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],System Calls & Libraries
Virtual Machine ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],System Calls & Libraries Bare hardware Small kernel VM1 VMn . . . OS1 OSn user user
Hardware Support ,[object Object],[object Object],[object Object],System Calls & Libraries
System Call Mechanism ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],System Calls & Libraries Kernel in protected memory entry User program User program call return
Interrupt and Exceptions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],System Calls & Libraries
Interrupt and Exceptions (1) System Calls & Libraries Vector # Mnemonic Description Type 0 #DE Divide error (by zero) Fault 1 #DB Debug Fault/trap 2 NMI interrupt Interrupt 3 #BP Breakpoint Trap 4 #OF Overflow Trap 5 #BR BOUND range exceeded Trap 6 #UD Invalid opcode Fault 7 #NM Device not available Fault 8 #DF Double fault Abort 9 Coprocessor segment overrun Fault 10 #TS Invalid TSS
Interrupt and Exceptions (2) System Calls & Libraries Vector # Mnemonic Description Type 11 #NP Segment not present Fault 12 #SS Stack-segment fault Fault 13 #GP General protection Fault 14 #PF Page fault Fault 15 Reserved Fault 16 #MF Floating-point error (math fault) Fault 17 #AC Alignment check Fault 18 #MC Machine check Abort 19-31 Reserved 32-255 User defined Interrupt
System Calls ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],System Calls & Libraries
OS Kernel: Trap Handler System Calls & Libraries HW Device Interrupt HW exceptions SW exceptions System Service Call Virtual address exceptions HW implementation of  the boundary System service dispatcher Sys_call_table System services Interrupt service routines Exception dispatcher Exception handlers VM manager’s pager
Passing Parameters ,[object Object],[object Object],[object Object],[object Object],[object Object],System Calls & Libraries
Passing Parameters - Registers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],System Calls & Libraries
Passing Parameters - Vector ,[object Object],[object Object],[object Object],[object Object],System Calls & Libraries
Passing Parameters - Stack ,[object Object],[object Object],[object Object],[object Object],System Calls & Libraries frame frame Top
Library Stubs for System Calls ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],System Calls & Libraries User stack Registers User memory Kernel stack Registers Kernel memory Linux: 80 NT: 2E
System Call Entry Point ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],System Calls & Libraries User stack Registers User memory Kernel stack Registers Kernel memory
Design & Performance Issues ,[object Object],[object Object],[object Object],[object Object],System Calls & Libraries
General Design Aesthetics ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],System Calls & Libraries
Separation Of Concerns ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],System Calls & Libraries
Library Benefits ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],System Calls & Libraries
Feedback To The Program ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],System Calls & Libraries

More Related Content

What's hot

ASIP (Application-specific instruction-set processor)
ASIP (Application-specific instruction-set processor)ASIP (Application-specific instruction-set processor)
ASIP (Application-specific instruction-set processor)Hamid Reza
 
IPTV Set-top box monitoring
IPTV Set-top box monitoringIPTV Set-top box monitoring
IPTV Set-top box monitoringDávid Károly
 
Device drivers and interrupt service mechanism
Device drivers and interrupt service mechanismDevice drivers and interrupt service mechanism
Device drivers and interrupt service mechanismVijay Kumar
 
Central processing unit
Central processing unitCentral processing unit
Central processing unitKamal Acharya
 
Embedded Systems Introdution
Embedded Systems IntrodutionEmbedded Systems Introdution
Embedded Systems IntrodutionSheikh Ismail
 
Embedded system-Introduction to development cycle and development tool
Embedded system-Introduction to development cycle and development  toolEmbedded system-Introduction to development cycle and development  tool
Embedded system-Introduction to development cycle and development toolPantech ProLabs India Pvt Ltd
 
Embedded system custom single purpose processors
Embedded system custom single  purpose processorsEmbedded system custom single  purpose processors
Embedded system custom single purpose processorsAiswaryadevi Jaganmohan
 
Dc 12 Chiueh
Dc 12 ChiuehDc 12 Chiueh
Dc 12 Chiuehwollard
 
N_Asm Assembly system calls (sol)
N_Asm Assembly system calls (sol)N_Asm Assembly system calls (sol)
N_Asm Assembly system calls (sol)Selomon birhane
 
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT IV Designing Embedded System with 8051...
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT IV  Designing Embedded System with 8051...SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT IV  Designing Embedded System with 8051...
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT IV Designing Embedded System with 8051...Arti Parab Academics
 
Operating Systems 1 (11/12) - Input / Output
Operating Systems 1 (11/12) - Input / OutputOperating Systems 1 (11/12) - Input / Output
Operating Systems 1 (11/12) - Input / OutputPeter Tröger
 
Embedded system design process
Embedded system design processEmbedded system design process
Embedded system design processRayees CK
 
DEVICE FILE AND INPUT OUTPUT SUBSYSTEMS MANAGEMENT
DEVICE FILE AND INPUT OUTPUT SUBSYSTEMS MANAGEMENTDEVICE FILE AND INPUT OUTPUT SUBSYSTEMS MANAGEMENT
DEVICE FILE AND INPUT OUTPUT SUBSYSTEMS MANAGEMENTJOLLUSUDARSHANREDDY
 
C Programming For Embedded Systems
C Programming For Embedded SystemsC Programming For Embedded Systems
C Programming For Embedded SystemsGanesh Samarthyam
 
Chapter 13 - I/O Systems
Chapter 13 - I/O SystemsChapter 13 - I/O Systems
Chapter 13 - I/O SystemsWayne Jones Jnr
 

What's hot (20)

System calls
System callsSystem calls
System calls
 
ASIP (Application-specific instruction-set processor)
ASIP (Application-specific instruction-set processor)ASIP (Application-specific instruction-set processor)
ASIP (Application-specific instruction-set processor)
 
Embedded System-design technology
Embedded System-design technologyEmbedded System-design technology
Embedded System-design technology
 
IPTV Set-top box monitoring
IPTV Set-top box monitoringIPTV Set-top box monitoring
IPTV Set-top box monitoring
 
Device drivers and interrupt service mechanism
Device drivers and interrupt service mechanismDevice drivers and interrupt service mechanism
Device drivers and interrupt service mechanism
 
Central processing unit
Central processing unitCentral processing unit
Central processing unit
 
Embedded Systems Introdution
Embedded Systems IntrodutionEmbedded Systems Introdution
Embedded Systems Introdution
 
Embedded system-Introduction to development cycle and development tool
Embedded system-Introduction to development cycle and development  toolEmbedded system-Introduction to development cycle and development  tool
Embedded system-Introduction to development cycle and development tool
 
System Calls
System CallsSystem Calls
System Calls
 
Embedded system custom single purpose processors
Embedded system custom single  purpose processorsEmbedded system custom single  purpose processors
Embedded system custom single purpose processors
 
08 Operating System Support
08  Operating  System  Support08  Operating  System  Support
08 Operating System Support
 
Dc 12 Chiueh
Dc 12 ChiuehDc 12 Chiueh
Dc 12 Chiueh
 
System call
System callSystem call
System call
 
N_Asm Assembly system calls (sol)
N_Asm Assembly system calls (sol)N_Asm Assembly system calls (sol)
N_Asm Assembly system calls (sol)
 
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT IV Designing Embedded System with 8051...
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT IV  Designing Embedded System with 8051...SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT IV  Designing Embedded System with 8051...
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT IV Designing Embedded System with 8051...
 
Operating Systems 1 (11/12) - Input / Output
Operating Systems 1 (11/12) - Input / OutputOperating Systems 1 (11/12) - Input / Output
Operating Systems 1 (11/12) - Input / Output
 
Embedded system design process
Embedded system design processEmbedded system design process
Embedded system design process
 
DEVICE FILE AND INPUT OUTPUT SUBSYSTEMS MANAGEMENT
DEVICE FILE AND INPUT OUTPUT SUBSYSTEMS MANAGEMENTDEVICE FILE AND INPUT OUTPUT SUBSYSTEMS MANAGEMENT
DEVICE FILE AND INPUT OUTPUT SUBSYSTEMS MANAGEMENT
 
C Programming For Embedded Systems
C Programming For Embedded SystemsC Programming For Embedded Systems
C Programming For Embedded Systems
 
Chapter 13 - I/O Systems
Chapter 13 - I/O SystemsChapter 13 - I/O Systems
Chapter 13 - I/O Systems
 

Viewers also liked

Viewers also liked (8)

Micro p test
Micro p testMicro p test
Micro p test
 
Basic concepts of microprocessors jahid
Basic concepts of microprocessors jahidBasic concepts of microprocessors jahid
Basic concepts of microprocessors jahid
 
Difference between i3 and i5 and i7 and core 2 duo
Difference between i3 and i5 and i7 and core 2 duoDifference between i3 and i5 and i7 and core 2 duo
Difference between i3 and i5 and i7 and core 2 duo
 
8085 interrupts
8085 interrupts8085 interrupts
8085 interrupts
 
8085 interrupts
8085 interrupts8085 interrupts
8085 interrupts
 
Interrupts
InterruptsInterrupts
Interrupts
 
Interrupts
InterruptsInterrupts
Interrupts
 
Interrupts
InterruptsInterrupts
Interrupts
 

Similar to Os note

Principles of operating system
Principles of operating systemPrinciples of operating system
Principles of operating systemAnil Dharmapuri
 
Evolution of the Windows Kernel Architecture, by Dave Probert
Evolution of the Windows Kernel Architecture, by Dave ProbertEvolution of the Windows Kernel Architecture, by Dave Probert
Evolution of the Windows Kernel Architecture, by Dave Probertyang
 
Operating system 11 system calls
Operating system 11 system callsOperating system 11 system calls
Operating system 11 system callsVaibhav Khanna
 
Operating System 2
Operating System 2Operating System 2
Operating System 2tech2click
 
6.Resource Exhaustion
6.Resource Exhaustion6.Resource Exhaustion
6.Resource Exhaustionphanleson
 
LogChaos: Challenges and Opportunities of Security Log Standardization
LogChaos: Challenges and Opportunities of Security Log StandardizationLogChaos: Challenges and Opportunities of Security Log Standardization
LogChaos: Challenges and Opportunities of Security Log StandardizationAnton Chuvakin
 
Rpc (Distributed computing)
Rpc (Distributed computing)Rpc (Distributed computing)
Rpc (Distributed computing)Sri Prasanna
 
Lecture 3,4 operating systems
Lecture 3,4   operating systemsLecture 3,4   operating systems
Lecture 3,4 operating systemsPradeep Kumar TS
 
Lecture 3,4 operating systems
Lecture 3,4   operating systemsLecture 3,4   operating systems
Lecture 3,4 operating systemsPradeep Kumar TS
 
OSLecture1.ppt
OSLecture1.pptOSLecture1.ppt
OSLecture1.pptAkkiiDerp
 
Structure of operating system
Structure of operating systemStructure of operating system
Structure of operating systemRafi Dar
 
An introduction to digital signal processors 1
An introduction to digital signal processors 1An introduction to digital signal processors 1
An introduction to digital signal processors 1Hossam Hassan
 

Similar to Os note (20)

Principles of operating system
Principles of operating systemPrinciples of operating system
Principles of operating system
 
Mmp hotos2003-slides
Mmp hotos2003-slidesMmp hotos2003-slides
Mmp hotos2003-slides
 
Oct2009
Oct2009Oct2009
Oct2009
 
Evolution of the Windows Kernel Architecture, by Dave Probert
Evolution of the Windows Kernel Architecture, by Dave ProbertEvolution of the Windows Kernel Architecture, by Dave Probert
Evolution of the Windows Kernel Architecture, by Dave Probert
 
Embedded system
Embedded systemEmbedded system
Embedded system
 
Embeddedsystem
EmbeddedsystemEmbeddedsystem
Embeddedsystem
 
LINUX Device Drivers
LINUX Device DriversLINUX Device Drivers
LINUX Device Drivers
 
2337610
23376102337610
2337610
 
Operating system 11 system calls
Operating system 11 system callsOperating system 11 system calls
Operating system 11 system calls
 
Operating System 2
Operating System 2Operating System 2
Operating System 2
 
6.Resource Exhaustion
6.Resource Exhaustion6.Resource Exhaustion
6.Resource Exhaustion
 
LogChaos: Challenges and Opportunities of Security Log Standardization
LogChaos: Challenges and Opportunities of Security Log StandardizationLogChaos: Challenges and Opportunities of Security Log Standardization
LogChaos: Challenges and Opportunities of Security Log Standardization
 
01.osdoc
01.osdoc01.osdoc
01.osdoc
 
Rpc (Distributed computing)
Rpc (Distributed computing)Rpc (Distributed computing)
Rpc (Distributed computing)
 
Ch2
Ch2Ch2
Ch2
 
Lecture 3,4 operating systems
Lecture 3,4   operating systemsLecture 3,4   operating systems
Lecture 3,4 operating systems
 
Lecture 3,4 operating systems
Lecture 3,4   operating systemsLecture 3,4   operating systems
Lecture 3,4 operating systems
 
OSLecture1.ppt
OSLecture1.pptOSLecture1.ppt
OSLecture1.ppt
 
Structure of operating system
Structure of operating systemStructure of operating system
Structure of operating system
 
An introduction to digital signal processors 1
An introduction to digital signal processors 1An introduction to digital signal processors 1
An introduction to digital signal processors 1
 

Recently uploaded

Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 

Recently uploaded (20)

Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 

Os note

  • 1. System Calls & Libraries Vivek Pai Lecture 4, COS318 Sep 25, 2001
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8. x86 Protection Rings System Calls & Libraries Level 0 Level 1 Level 2 Level 3 Operating system kernel Operating system services Applications Privileged instructions Can be executed only When current privileged Level (CPR) is 0
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20. Interrupt and Exceptions (1) System Calls & Libraries Vector # Mnemonic Description Type 0 #DE Divide error (by zero) Fault 1 #DB Debug Fault/trap 2 NMI interrupt Interrupt 3 #BP Breakpoint Trap 4 #OF Overflow Trap 5 #BR BOUND range exceeded Trap 6 #UD Invalid opcode Fault 7 #NM Device not available Fault 8 #DF Double fault Abort 9 Coprocessor segment overrun Fault 10 #TS Invalid TSS
  • 21. Interrupt and Exceptions (2) System Calls & Libraries Vector # Mnemonic Description Type 11 #NP Segment not present Fault 12 #SS Stack-segment fault Fault 13 #GP General protection Fault 14 #PF Page fault Fault 15 Reserved Fault 16 #MF Floating-point error (math fault) Fault 17 #AC Alignment check Fault 18 #MC Machine check Abort 19-31 Reserved 32-255 User defined Interrupt
  • 22.
  • 23. OS Kernel: Trap Handler System Calls & Libraries HW Device Interrupt HW exceptions SW exceptions System Service Call Virtual address exceptions HW implementation of the boundary System service dispatcher Sys_call_table System services Interrupt service routines Exception dispatcher Exception handlers VM manager’s pager
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.