Operating Systems: Foundations and Functions
An operating system (OS) acts as the crucial intermediary between user applications and computer hardware. It facilitates program
execution and resource management, ensuring an efficient and secure computing environment.
What is an OS? Goals Key Functions
Interface for user applications and Ease of use, efficient resource Process, memory, resource, and file
hardware. allocation, modularity, abstraction, management; protection and security.
debuggability.
Types of Operating Systems
Batch OS Multi-programmed/Multi-tasking OS
Groups similar jobs; sequential execution. Multiple jobs in memory; time-sharing.
Increased CPU idleness. Increased CPU utilization.
Decreased throughput. Improved throughput and response time.
Real-time OS Distributed OS
Strict time constraints (hard/soft). Jobs across networked processors.
System failure if constraints violated. Resource sharing, speed, reliability.
Dual Mode Operations & System Calls
Dual Mode Operations System Calls
Processor supports User and Kernel modes for protection. Provide OS services to user programs, acting as kernel entry
points.
Mode bit 0: Kernel mode: Direct hardware access, privileged
instructions (I/O, context-switching). fork() system call: Creates child processes.
Mode bit 1: User mode: No hardware access, limited Returns 0 to child.
instructions (read clock, generate trap). Returns child PID to parent on success.
Returns negative on failure.
Number of child processes: For 'n' fork() calls, 2^n - 1.