System Calls
System Calls
UNIT I
UNIT I OPERATING SYSTEM OVERVIEW 7
Computer System Overview-Basic Elements, Instruction Execution,
Interrupts, Memory Hierarchy, Cache Memory, Direct Memory Access,
Multiprocessor and Multicore Organization.
Operating system overview-objectives and functions, Evolution of
Operating System. - Computer System Organization Operating System
Structure and Operations- System Calls, System Programs, OS
Generation and System Boot.
System Call
• Way for a user program to interface with the operating system
.k
return 0;
}
Output
rit@rit-OptiPlex-3010:~/Documents$ gcc forktest.c
rit@rit-OptiPlex-3010:~/Documents$ ./a.out
Parent process:
Process id: 4177
Child process:
Child's Process id: 4178
Parent's Process id: 4177
wait() System Call
wait( )
• The parent waits for the child process to complete using the wait
system call.
• The wait system call returns the process identifier of a terminated
child, so that the parent can tell which of its children has terminated.
Syntax : wait( NULL)
exit( )