GATE CSE Operating System
OPERATING SYSTEMS (OS)
└─► Goals: Abstraction • Resource Management • Isolation • Convenience • Performance
1) BASICS OF OS
├─► Functions
│ ├ Device management
│ ├ Process & thread management
│ ├ Memory management
│ ├ File & I/O management
│ └ Protection & security
├─► System Calls
│ ├ Process control: fork, exec, wait, exit
│ ├ File ops: open, read, write, close
│ ├ Device & I/O: ioctl, read/write
│ └ Info & communication: getpid, pipe, shm
└─► Types of OS
├ Batch • Multiprogramming • Time-sharing
├ Real-time (hard/soft) • Embedded
├ Networked • Distributed • Multiprocessor
└ Monolithic • Microkernel • Hybrid
2) PROCESSES
├─► Process Concept
│ ├ PCB • States (new, ready, running, blocked, terminated)
│ ├ Context switch • Process vs program
│ └ Process creation & termination
├─► Scheduling (ready queue) → see (3) CPU Scheduling
├─► IPC (Inter-Process Communication)
│ ├ Message passing: direct/indirect, sync/async
│ └ Shared memory: regions, synchronization need
├─► Threads
│ ├ User-level vs Kernel-level
│ └ Thread models (1:1, M:1, M:N)
└─► Multithreading
├ Concurrency vs parallelism
└ Scalability, affinity, overheads
3) CPU SCHEDULING
├─► Scheduling Algorithms
│ ├ FCFS • SJF/Shortest-Remaining-Time
│ ├ Priority (preemptive/non-preemptive)
│ ├ Round Robin (quantum)
│ └ Multilevel queue / feedback queue
└─► Performance Criteria
├ Throughput • CPU utilization
├ Waiting time • Turnaround time • Response time
└ Fairness • Starvation (aging to prevent)
4) PROCESS SYNCHRONIZATION
├─► Critical Section Problem
│ ├ Requirements: Mutual exclusion • Progress • Bounded waiting
│ └ Software: Peterson’s • Bakery (assumptions)
├─► Semaphores
│ ├ Counting vs binary • wait/signal
│ └ Correct usage • deadlock risk if misused
├─► Monitors
│ └ Condition variables: wait • signal • broadcast
└─► Deadlocks
├ Conditions: Mutual exclusion • Hold & wait • No preemption • Circular wait
├ Detection: Wait-for graph • Banker's-like checks
├ Prevention: Break at least one necessary condition
├ Avoidance: Banker's algorithm • Safe state
└ Recovery: Preemption • Rollback • Process kill
5) MEMORY MANAGEMENT
├─► Contiguous Allocation
│ ├ Fixed & variable partitions
│ └ Fragmentation: internal vs external • compaction
├─► Non-contiguous Allocation
│ ├ Paging: frames, pages, page table, TLB
│ └ Segmentation: segments, tables, protection
├─► Virtual Memory
│ ├ Demand paging • Page fault handling
│ ├ Effective Access Time (with TLB)
│ └ Working set • Thrashing • Local vs global replacement
└─► Page Replacement
├ FIFO • OPT • LRU • LFU • Clock/Second-chance
└ Belady’s anomaly (FIFO)
6) FILE SYSTEMS
├─► File Concept
│ ├ Attributes • Operations • File types
│ └ Access control lists (ACLs) • Permissions
├─► Access Methods
│ ├ Sequential • Direct (random) • Indexed
├─► Directory Structure
│ ├ Single-level • Two-level • Tree • DAG
│ └ Pathnames • Links (hard/symbolic)
├─► Allocation Methods
│ ├ Contiguous • Linked • Indexed (single/multi-level)
└─► File System Implementation
├ On-disk structures: superblock, inode/FAT, free-space mgmt
├ Caching & buffering • Journaling/Log-structured FS
└ Mounting • Consistency checks
7) I/O SYSTEMS
├─► I/O Hardware
│ ├ Controllers • DMA • Memory-mapped I/O
├─► Interrupts
│ ├ ISR • Interrupt vector/priority
├─► Disk Scheduling
│ ├ FCFS • SSTF • SCAN • C-SCAN • LOOK • C-LOOK
│ └ Seek time • Rotational latency • Transfer time
└─► RAID
├ Levels 0–6: striping, mirroring, parity
└ Reliability vs performance trade-offs
8) PROTECTION & SECURITY
├─► Goals
│ ├ Confidentiality • Integrity • Availability
├─► Mechanisms
│ ├ Access matrix • Capabilities • ACLs
│ ├ Reference monitor • Domains • Sandboxing
│ └ Authentication • Encryption • Auditing
└─► Policies
├ Discretionary (DAC) • Mandatory (MAC) • Role-based (RBAC)
└ Least privilege • Need-to-know
9) MISCELLANEOUS
├─► Case Studies
│ ├ Linux: monolithic modular kernel, ext4, CFS, procfs
│ └ Windows: hybrid kernel, NTFS, I/O manager, scheduler
└─► Distributed Systems Basics
├ Models: client–server • peer-to-peer
├ Naming • Transparency • RPC/RMI • Sockets
└ Synchronization & clocks • Fault tolerance (brief)
CROSS-LINKS (How modules connect)
Processes ─► CPU Scheduling
Processes + Threads ─► Synchronization ─► Deadlocks
Processes ─► Memory Management ─► Virtual Memory ─► Page Replacement
Files ─► File System Implementation ─► I/O Systems (disks, RAID) ─► Disk Scheduling
Protection & Security ─► Applies to Processes, Memory, Files, I/O
System Calls ─► Interface to all subsystems (process, file, memory, device)
Case Studies / Distributed Basics ─► Illustrate design choices across all modules
Comments
Post a Comment