Functions of OS
Functions of OS
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.
DMA
What is OS?
• Acts as an intermediary between user and computer hardware.
• File-System management
• Files usually organized into directories
• Access control on most systems to determine who can access what
• OS activities include
• Creating and deleting files and directories
• Primitives to manipulate files and directories
• Mapping files onto secondary storage
• Backup files onto stable (non-volatile) storage media
Mass-Storage Management
• Usually disks used to store data that does not fit in main memory or data
that must be kept for a “long” period of time
• Proper management is of central importance
• Entire speed of computer operation hinges on disk subsystem and its
algorithms
• OS activities
• Free-space management
• Storage allocation
• Disk scheduling
• Some storage need not be fast
• Tertiary storage includes optical storage, magnetic tape
• Still must be managed – by OS or applications
• Varies between WORM (write-once, read-many-times) and RW (read-write)
Performance of Various Levels of Storage
.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( )