2. It provides the interface between a process and
the operating system.
A system call is just a mechanism.
User programme receives operating system
services through the set of system calls.
It controls processes.
3. System calls’ process
First the programme executes the system call instructions.
The hardware saves the current instructiion and PSW register
in the i and iPSW register.
0 value is loaded into PSW register by hardware. It keeps the
machine in system mode with interrupt disabled.
The hardware loads the i register from the system call
interrupt vector location. This completes the execution of the
system call instruction by the hardware.
Instruction execution continues at the beginning of the
system call interrupt handler.
The process that executed the system call instruction
continues at the instruction after the system call.
5. • A system call is made using the system call
machine language instruction. System calls
can be grouped into five major categories.
1. File management
2. Interprocess communication
3. Process management
4. I/O device management
5. Information maintenance
TYPES OF SYSTEM CALL
6. FILE MANAGEMENT
Create Create a new file and open it
Delete Delete a file
Open Open a file to read or write
Close Close a file(no longer using it)
Read Read a byte from an open file
Write Write a byte to an open file
Stat Get information about a file
Unlink Remove a file from a directory
7. INTERPROCESS COMMUNICATION
Create a message queue Create a queue to hold message
Send message Send a message to a message queue
Receive message Receive a message from a message queue
Close connection Terminates the communication
8. I/O DEVICE SYSTEM CALLS
Request
device
To ensure exclusive use of device
Release device Release the device after finished with the device
Read, write Same as file system call
Stat Get information about an I/O device
Read Read a byte from an open file
Write Write a byte to an open file
Stat Get information about a file
Unlink Remove a file from a directory
9. INFORMATION MAINTENANCE
Get time and date
Set time and date
Set process, file or device attributes
Get process, file or device attributes
Get system data
Set system data