1/11
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
Key services provided by an OS
UI: CLI, GUI
Program Execution: Loads and runs programs
I/O Operations: Manages devices
File-System Manipulation: Creates/deletes files, enforces permissions
Communication: Shared memory or message passing between processes
Error Detection: Handles hardware/software errors
Resource Allocation: Manages CPU, memory
Accounting & Security: Tracks usage and enforces access control.
System call
A programming interface to request OS services (e.g. open(), fork()).
Parameters passed to system calls
Via registers, memory blocks or the stack.
Windows system calls
CreateProcess(), ReadFile().
Unix system calls
fork(), read().
Parts of a process
Text: Code + program counter
Stack: Temporary data
Data: Global variables
Heap: Dynamically allocated memory.
Process states
New: Created
Ready: Waiting for CPU
Running: Executing
Waiting: Blocked
Terminated: Finished
Stored in a PCB
Process state, PC, registers, scheduling info, memory limits, I/O status.
Key queues in process scheduling
Job Queue: All processes
Ready Queue: Processes in memory ready to execute
Device Queue: Processes waiting for I/O
Short-term scheduler
Selects next process for CPU (frequent, fast).
Long-term scheduler
Controls multiprogramming by loading processes into memory (infrequent, slow).
Process Lifecycle example
Ready -> Running: Dispatched by short-term scheduler
Running -> Waiting: I/O request or event wait
Waiting -> Ready: I/O completion
Running -> Terminated: Process exits.