Questions
8 questions per paper
Difficulty
Medium
Importance
High yield for HPCL/NTPC/BHEL
Overview
Operating Systems is a core pillar of computer science that dictates how hardware resources are managed and how processes interact with the CPU. It is a high-yield topic for PSU exams, requiring a deep understanding of resource allocation and scheduling algorithms. Mastery of this topic allows aspirants to solve complex quantitative problems regarding system throughput and performance.
Process Scheduling
Process scheduling determines which process in the ready queue is allocated to the CPU. Exams frequently test calculation of average waiting time and turnaround time for various scheduling algorithms.
- FCFS (First Come First Serve): Non-preemptive, susceptible to convoy effect
- SJF (Shortest Job First): Provides minimum average waiting time
- Round Robin: Preemptive, designed for time-sharing systems using a time quantum
- Priority Scheduling: Can lead to process starvation
- Turnaround Time = Completion Time - Arrival Time
- Waiting Time = Turnaround Time - Burst Time
Memory Management: Paging & Segmentation
Memory management techniques map logical addresses to physical addresses to ensure efficient utilization of RAM. Paging is fixed-size partitioning, while segmentation uses variable-size partitions based on logical units.
- Paging eliminates external fragmentation
- Segmentation causes external fragmentation
- TLB (Translation Look-aside Buffer) reduces memory access time
- Effective Access Time = (Hit Ratio * Access Time) + (Miss Ratio * (Access Time + Memory Time))
- Internal fragmentation occurs in fixed-size partitions
Deadlock Detection & Prevention
A deadlock occurs when a set of processes are waiting for each other to release resources. Understanding the four Coffman conditions is essential for identifying and preventing these system stalls.
- Four Necessary Conditions: Mutual Exclusion, Hold and Wait, No Preemption, Circular Wait
- Banker's Algorithm: Used for deadlock avoidance
- Resource Allocation Graph (RAG): Cycle implies deadlock if resources have single instances
- Deadlock Prevention: Deny any one of the four Coffman conditions
- Deadlock Detection: Wait-for graph approach
File Systems
File systems provide the mechanism for storing and retrieving data on disk. PSU exams often focus on allocation methods and directory structures.
- Contiguous Allocation: Leads to external fragmentation
- Linked Allocation: No external fragmentation, but poor random access
- Indexed Allocation: Uses index blocks, supports random access
- Inodes: Store file metadata and block pointers
Formula Sheet
Turnaround Time = Completion Time - Arrival Time
Waiting Time = Turnaround Time - Burst Time
Effective Access Time = (Hit Ratio * TLB Time) + (Miss Ratio * (TLB Time + Memory Time))
Throughput = Total Completed Processes / Total Time
Exam Tip
Always draw a Gantt chart for scheduling problems to avoid silly arithmetic errors under time pressure.
Common Mistakes
- Confusing internal fragmentation in paging with external fragmentation in segmentation.
- Forgetting to subtract arrival time when calculating turnaround time in preemptive scheduling.
- Assuming circular wait is sufficient for deadlock in multi-instance resource systems.
More Revision Notes
Ready to test yourself?
Play topic-wise Operating Systems questions in Aspirant Arcade — gamified MCQ practice.
Download Free