0% found this document useful (0 votes)
28 views

System Calls

This document provides an overview of system calls from a lecture on operating systems. It defines system calls as the programming interface to services provided by the OS. It discusses how system calls are implemented via a system call number table and describes common system call APIs. It also categorizes different types of system calls such as process control, file management, device management, protection, information maintenance, and communications. The document aims to provide learners a deep understanding of system calls and their role in operating systems.

Uploaded by

Udita Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

System Calls

This document provides an overview of system calls from a lecture on operating systems. It defines system calls as the programming interface to services provided by the OS. It discusses how system calls are implemented via a system call number table and describes common system call APIs. It also categorizes different types of system calls such as process control, file management, device management, protection, information maintenance, and communications. The document aims to provide learners a deep understanding of system calls and their role in operating systems.

Uploaded by

Udita Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 9

UNIVERSITY INSTITUTE OF ENGINEERING

Bachelor of Engineering (Computer


Science & Engineering)
Operating System (CST-328)

Subject Coordinator: Er. Puneet kaur(E6913)

DISCOVER . LEARN . EMPOWER


Lecture 4

System calls
&
Types of system calls
System Calls
• Programming interface to the services provided by the OS
• Typically written in a high-level language (C or C++)
• Mostly accessed by programs via a high-level Application Programming
Interface (API) rather than direct system call use
• Three most common APIs are Win32 API for Windows, POSIX API for
POSIX-based systems (including virtually all versions of UNIX, Linux,
and Mac OS X), and Java API for the Java virtual machine (JVM)

Note that the system-call names used throughout this text are generic
System Call Implementation

• Typically, a number associated with each system call


– System-call interface maintains a table indexed with this number
• The system call interface invokes the intended system call in OS kernel
and returns status of the system call and any return values
• The caller need know nothing about how the system call is implemented
– Just needs to obey API and understand what OS will do as a result
call
– Most details of OS interface hidden from programmer by API
• Managed by run-time support library (set of functions built into
libraries included with compiler)
Types of System Calls
• Process control
– create process, terminate process
– end, abort
– load, execute
– get process attributes, set process attributes
– wait for time
– wait event, signal event
– allocate and free memory
– Dump memory if error
– Debugger for determining bugs, single step execution
– Locks for managing access to shared data between processes
Types of System Calls
• File management
– create file, delete file
– open, close file
– read, write, reposition
– get and set file attributes
• Device management
– request device, release device
– read, write, reposition
– get device attributes, set device attributes
– logically attach or detach devices
• Protection
– Control access to resources
– Get and set permissions
– Allow and deny user access
Types of System Calls (Cont.)
• Information maintenance
– get time or date, set time or date
– get system data, set system data
– get and set process, file, or device attributes
• Communications
– create, delete communication connection
– send, receive messages if message passing model to host name or
process name
• From client to server
– Shared-memory model create and gain access to memory regions
– transfer status information
– attach and detach remote devices
Conclusion
This topic gives the learner a deep insight to system calls, system calls
interface, system calls implementation and system calls types.
References
https://www.includehelp.com/c-programming-questions/

https://www.studytonight.com/operating-system/

https://computing.llnl.gov/tutorials/

https://www.tutorialspoint.com/operating_system/index.htm#:~:text=An%20operating%20system%
20(OS)%20is,software%20in%20a%20computer%20system.

https://www.javatpoint.com/os-tutorial

https://www.guru99.com/operating-system-tutorial.html
https://www.geeksforgeeks.org/operating-systems/

You might also like