Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Traps and System Calls in Operating System (OS)

  • Difficulty Level : Hard
  • Last Updated : 08 Oct, 2021

On the off chance that Operating System (OS) is secured, how does program request administrations from OS? 
Client programs can’t call capacities inside working framework’s memory, since it can’t see those territories of memory. 

An extraordinary client mode machine guidance, known as TRAP guidance, causes an exemption, switches CPU mode to Kernal mode, and starts handler for TRAP guidance. 

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.

 

To request specific help from OS, client program places esteem in machine registers to show what administration it requires. At that point, it executes TRAP guidance, which changes CPU mode to advantaged mode, and moves execution to TRAP handler in OS’s memory. 
 



OS checks solicitation, and performs it, utilizing dispatch table to pass control to one of lot of OS administration schedules. At the point when administration has been played out, OS returns control to the program, bringing down benefits back to client mode. Hence, activity just approaches favored OS through solitary, all around ensured section point. 

This component for acquiring OS administrations is known as System Call. The arrangement of accessible framework calls is known as the Operating System’s Application Program Interface or API.
 

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!