1.
Operating System
Operating System (OS) is software that acts as an interface between the user and computer
hardware. It manages hardware resources like CPU, memory, and devices, and provides services
to application programs. Example: Windows, Linux.
2. Functions of OS
OS performs process management (creation, scheduling), memory management
(allocation/deallocation), file management (files & directories), I/O management (devices), and
security (protecting system).
3. Types of OS
Batch OS executes jobs in batches. Multiprogramming runs multiple programs to maximize CPU
usage. Time-sharing allows multiple users simultaneously. Distributed OS connects multiple
systems. RTOS handles real-time tasks with deadlines.
4. Process Concept
A process is a program in execution. It includes program code, current activity, memory, and
resources. States: New (created), Ready (waiting for CPU), Running, Waiting (for I/O), Terminated.
5. PCB
Process Control Block stores all information about a process like state, program counter, CPU
registers, memory allocation, and I/O status. It helps OS manage processes efficiently.
6. Scheduling Algorithms
FCFS executes processes in arrival order. SJF selects shortest job. Priority scheduling uses priority
levels. Round Robin gives equal CPU time using time quantum (most used in real systems).
7. Scheduling Criteria
OS tries to maximize CPU utilization and throughput, while minimizing waiting time, turnaround
time, and response time.
8. Threads
Thread is a lightweight process. Multiple threads in a process share memory and resources,
making execution faster and efficient.
9. IPC
Inter Process Communication allows processes to communicate. Methods: Shared memory (fast
but complex) and Message passing (safe and simple).
10. Synchronization
Used to avoid race conditions when multiple processes access shared data. Critical section rules
ensure safe execution.
11. Semaphores
Semaphore is a synchronization tool using wait() and signal() operations. It controls access to
shared resources.
12. Deadlock
Deadlock is a situation where processes wait indefinitely. It occurs when four conditions are
satisfied: mutual exclusion, hold & wait, no preemption, circular wait.