Skip to content
IT-501 · Operating System/Unsolved PYQ Paper

IT-501 Operating System - Nov 2023 Question Paper

Under each question, How to answer lists the points an answer should cover, outlined by CampusPrep from the syllabus. Check the details against your textbook.

  1. 6 Marks
    aMention the difference(s) between single-processor and multi-processor systems? What are the major advantages of multi-processor?
    How to answer
    • Definition of single-processor vs multiprocessor architecture
    • Differences: number of CPUs, throughput, reliability, cost, complexity
    • Advantages of multiprocessor: increased throughput, economy of scale, increased reliability
  2. 8 Marks
    bExplain the operating system functions that are specific to (i) users and (ii) computing systems. Clearly explain the significance of each functionality with respect to the user/system itself.
    How to answer
    • OS functions for users: UI, program execution, I/O, file, communication
    • OS functions for system: resource allocation, accounting, protection, security
    • Significance of each functionality with example
  3. 6 Marks
    aGiven $n$ CPUs, what is the maximum no of processes that can be in ready state? Does the size of the ready queue depends on the number of CPUs available in a system?
    How to answer
    • Ready state definition and ready queue
    • Maximum number of processes in ready state is unbounded / independent of n
    • Ready queue size does not depend on number of CPUs
  4. 8 Marks
    bYou are given an arbitrary set of CPU bound processes with unequal CPU burst lengths that are submitted at the same time to a computer system. In this scenario, which process scheduling algorithm would minimize the average waiting time in the ready queue? Justify your answer in terms of average waiting time and turn-around time for choosing the right scheduling algorithm.
    How to answer
    • SJF is optimal for minimizing average waiting time for same arrival
    • Calculation of average waiting and turnaround time
    • Justification vs FCFS, Priority, RR
  5. 6 Marks
    aWhat is critical section problem? Mention the conditions that a critical section solution must satisfy.
    How to answer
    • Definition of critical section and race condition
    • Three requirements: mutual exclusion, progress, bounded waiting
    • Brief explanation of each condition
  6. 8 Marks
    bGiven a non-negative counting semaphore S. The operation P(S) decrements S and V(S) increments S. During an execution, 20 P(S) operations and 12 V(S) operations are issued in some order. Find the largest initial value of S for which at least one P(S) operation will remain blocked.
    How to answer
    • Semaphore semantics: P blocks when S<=0, V wakes/increments
    • Net effect = initial + 12 - 20 = initial - 8
    • Largest initial value causing block is 7
  7. 14 Marks
    Consider the given set of processes with length of CPU burst, arrival time and priority. You are required to draw the (i) Gantt chart to show the schedule. Also, find out (ii) normalized turn-around time for each process and (iii) average waiting time for the following scheduling algorithms.
    1. a)Preemptive priority
    2. b)Round-Robin with time quantum of 4 units
    Given: Table: Process | Burst Time | Priority | Arrival Time; P1 8 (hand-corrected),12,4; P2 6,4,3; P3 5,10,0; P4 3,5,2; P5 4,6,1
    How to answer
    • Draw Gantt charts for preemptive priority and RR q=4
    • Compute completion, turnaround, waiting and normalized turnaround
    • Compute average waiting time for both algorithms
  8. 6 Marks
    aA system shares 9 tape drives. The current allocation and maximum requirement of tape drives for three processes are shown below. Find if there exist a deadlock in the system. In case the deadlock is not found, write the safe sequence.
    Given: Table: Process | Current Allocation | Maximum Requirement; P1 3|7; P2 1|6; P3 3|5. Total system shares 9 tape drives.
    How to answer
    • Total resources =9, allocated =7, available =2
    • Need matrix = Max - Allocation
    • Apply Banker's safety algorithm to find safe sequence or deadlock
  9. 8 Marks
    bGiven a graph where a set of vertices P = {P1, P2, P3} represents all active processes in the system and R = {R1, R2, R3, R4} depicts resource types. The association between elements of P and R is given as E = {P1 -> R1, P2 -> R3, R1 -> P2, R2 -> P2, R2 -> P1, R3 -> P3}. Considering this situation, draw the resource allocation graph. Also, figure out if there is any cycle that leads to deadlock in the entire system? Would there be a deadlock if a new association P3 -> R2 is added to the given graph?
    How to answer
    • Construct resource allocation graph with P nodes and R nodes and E edges
    • Check for cycle in graph
    • Analyze effect of adding edge P3 -> R2 on deadlock
  10. 6 Marks
    aWhat do mean by file attributes and operations? Briefly explain file access methods.
    How to answer
    • Definition of file attributes (name, type, size, protection etc.)
    • File operations: create, read, write, delete, etc.
    • File access methods: sequential, direct, indexed
  11. 8 Marks
    bConsider a disk queue with requests for I/O to blocks on cylinders ordered 98, 183, 37, 122, 14, 124, 65, 67. If the disk head is initially at cylinder 53, write the total head movement using FCFS, SSTF, SCAN, and C-SCAN disk scheduling algorithms.
    How to answer
    • Order of service for FCFS, SSTF, SCAN, C-SCAN from head 53
    • Sum of absolute cylinder differences for each algorithm
    • Total head movement values comparison
  12. 6 Marks
    aWhat is the difference between starvation and deadlock? Describe necessary conditions for a deadlock.
    How to answer
    • Definitions of starvation vs deadlock
    • Differences: blocking vs indefinite postponement
    • Four necessary Coffman conditions for deadlock
  13. Marks
    bConsider the following snapshots of a system having four processes (P0 to P3) and three resources (E, F, and G). The availability vector [E, F, G] is: [3, 3, 0] is:
    1. i)Find the need matrix.
    2. ii)Is the system currently in safe or unsafe state? Why? In case it is in safe state give the safe sequence.
    Given: Tables: Max Claim (P0-P3 x E,F,G), Allocation (P0-P3 x E,F,G), Availability vector [E=3,F=3,G=0]
    How to answer
    • Need = Max - Allocation for P0-P3
    • Available vector [3,3,0]
    • Apply safety algorithm to test safe/unsafe and give safe sequence
  14. 4 Marks
    aWhat is optimal page replacement algorithm? Explain the reason for its consideration as the best page replacement?
    How to answer
    • Optimal replaces page used farthest in future
    • Lowest page-fault rate, theoretical optimum
    • Used as benchmark, impossible without future knowledge
  15. 4 Marks
    bDescribe demand paging. Let $m$ and $p$ represent the memory-access time and probability of a page fault, how to calculate the effective access time?
    How to answer
    • Demand paging loads pages only on reference
    • Valid-invalid bit, page fault handling steps
    • EAT = (1-p)*m + p*page fault time
  16. 6 Marks
    cConsider six memory partitions of size 200 KB, 400 KB, 600 KB, 500 KB, 300 KB and 250 KB, where KB refers to kilobyte. These partitions need to be allotted to four processes of size 357 KB, 210KB, 468 KB and 491 KB in that order. If the Best Fit algorithm is used, which partitions are NOT allotted to any process?
    How to answer
    • List partitions 200,400,600,500,300,250 KB
    • Allocate 357->400, 210->250, 468->500, 491->600 in Best Fit order
    • Unallocated partitions are 200 KB and 300 KB
Go to where you left off?

Quick Add to Notes

Save questions, your own notes and screenshots into notes filed by unit. It takes a free account.

Create free account

Have an account? Log in