sign in
 
   
 
 
 
OPERATING SYSTEM _ INTRODUCTION
System Calls:
System calls provide an interface to the services made available by an operating system. These calls are generally available as routines written in C and C++ or using some assembly-language instructions. Processes are using operating systems calls heavily for its proper execution.

Application programming Interface (API) specifies a set of functions that are available to an application programmer, including parameters that are passed to each function and the return values the programmer can expect.

Examples are:

Win32 API – for Windows Systems
   
POSIX API – for Unix, Linux and Mac OS X
   
Java API – for Java Virtual Machine
   
The functions that make up an API typically invoke the actual system calls on behalf of the application programmer. For example, the Win32 function CreateProcess() actually calls the NTCreateProcess() system call in the Windows kernel.

The run-time support system for most programming languages provides a system-call interface that serves as the link to system calls made available by the operating system. The system-call interface intercepts function calls in the API and invokes the necessary system call within the operating system.

The handling of a user application invoking the open( ) system call
The caller needs to know nothing about how the system call is implemented or what it does during execution. It just needs to obey the API and understand what the operating system will do as a result of the execution of that system call.
Types of System Calls:
System calls can be grouped roughly into five major categories:

Process Control
 
end, abort
 
load, execute
 
create process, terminate process
 
get process attributes, set processes attributes
 
wait for time
 
wait event, signal event
 
allocate and free memory
File Management
 
create file, delete file
 
open, close
 
read, write, reposition
 
get file attributes, set file attributes
Device Management
 
request device, release device
 
read, write, reposition
 
get device attributes, set device attributes
 
logically attach or detach devices
Information Maintenance
 
get time or date, set time or date
 
get system data, set system data
 
get process, file, or device attributes
 
set process, file, or device attributes
Communications
 
create, delete communication connection
 
send, receive messages
 
transfer status information
 
attach or detach remote devices

Previous Page Previous