2024 question paper

Operating System

26 questions

  1. Q1a. Which of the following is an advantage of using threads? (i) Increased hardware costs (ii) Lower throughput (iii) Efficient utilization of CPU resources (iv) Increased memory consumption20242m

    Module 2: Processes & Scheduling

    Which of the following is an advantage of using threads?
    (i) Increased hardware costs
    (ii) Lower throughput
    (iii) Efficient utilization of CPU resources
    (iv) Increased memory consumption

    View this question on its own page →
    Worked Solution

    Answer: (iii) Efficient utilization of CPU resources

    Threads are lightweight processes sharing the same address space.
    Advantages: lower context-switch overhead, shared memory communication, improved throughput & CPU utilization, responsiveness. Costs actually decreased are memory and creation time, not increased. Options (i), (ii), (iv) list disadvantages which are incorrect.

  2. Q1b. Under direct communication, each process that wants to communicate must explicitly name the recipient or sender of the communication. This mechanism is known as ______ (i) Naming (ii) Message Passing (iii) Mailboxes (iv) Chatting20242m

    Module 3: Inter-process Communication

    Under direct communication, each process that wants to communicate must explicitly name the recipient or sender of the communication. This mechanism is known as ______
    (i) Naming
    (ii) Message Passing
    (iii) Mailboxes
    (iv) Chatting

    View this question on its own page →
    Worked Solution

    Answer: (i) Naming (Direct Naming / Direct Communication)

    In IPC, direct communication requires sender/receiver to explicitly name each other (send(P,message), receive(Q,message)). This is called naming / direct addressing. Indirect uses mailboxes/ports. Message Passing is the overall category, Naming is the specific mechanism for direct.

  3. Q1c. A variety of disk-organization techniques, collectively called RAIDs, are commonly used to address the performance and reliability issues. RAIDs stand for? (i) Reduced array of independent disks (ii) Redundant array of individual disks (iii) Reduced array of individual disks (iv) Redundant array of independent disks20242m

    Module 6: I/O & File Management

    A variety of disk-organization techniques, collectively called RAIDs, are commonly used to address the performance and reliability issues. RAIDs stand for?
    (i) Reduced array of independent disks
    (ii) Redundant array of individual disks
    (iii) Reduced array of individual disks
    (iv) Redundant array of independent disks

    View this question on its own page →
    Worked Solution

    Answer: (iv) Redundant Array of Independent Disks

    RAID originally Redundant Array of Inexpensive Disks, now Independent. Techniques (RAID 0-6) combine multiple disks for performance (striping) and reliability (mirroring/parity). Options i-iii misword it.

  4. Q1d. What does a virtual machine do? (i) Manages only hardware devices (ii) Replaces the operating system (iii) Acts as a real machine but is implemented in software (iv) Removes the need for file systems20242m

    Module 1: Introduction to Operating Systems

    What does a virtual machine do?
    (i) Manages only hardware devices
    (ii) Replaces the operating system
    (iii) Acts as a real machine but is implemented in software
    (iv) Removes the need for file systems

    View this question on its own page →
    Worked Solution

    Answer: (iii) Acts as a real machine but is implemented in software

    VM virtualizes CPU, memory, devices via hypervisor, presenting illusion of dedicated hardware to guest OS. Does not replace OS or remove file systems.

  5. Q1e. Which of the following mechanisms is NOT typically used to achieve mutual exclusion? (i) Strict alternation (ii) Event counters (iii) Message passing (iv) Virtual memory20242m

    Module 3: Inter-process Communication

    Which of the following mechanisms is NOT typically used to achieve mutual exclusion?
    (i) Strict alternation
    (ii) Event counters
    (iii) Message passing
    (iv) Virtual memory

    View this question on its own page →
    Worked Solution

    Answer: (iv) Virtual memory

    Mutual exclusion solutions: busy-wait (Peterson, strict alternation), hardware (TSL, swap), semaphores, monitors, message passing, event counters. Virtual memory is memory management, not synchronization.

  6. Q1f. Which of the following is a potential result of bad blocks on a disk? (i) Faster access time (ii) Increased storage capacity (iii) Data loss or corruption (iv) Improved disk scheduling20242m

    Module 6: I/O & File Management

    Which of the following is a potential result of bad blocks on a disk?
    (i) Faster access time
    (ii) Increased storage capacity
    (iii) Data loss or corruption
    (iv) Improved disk scheduling

    View this question on its own page →
    Worked Solution

    Answer: (iii) Data loss or corruption

    Bad blocks are physically damaged sectors. If used, data is unreadable; FS must mark them and relocate. Does not improve performance or capacity.

  7. Q1g. In demand paging, pages are: (i) Loaded only when they are required during execution (ii) Loaded all at once before execution begins (iii) Never removed from main memory (iv) Loaded in random order20242m

    Module 5: Memory Management

    In demand paging, pages are:
    (i) Loaded only when they are required during execution
    (ii) Loaded all at once before execution begins
    (iii) Never removed from main memory
    (iv) Loaded in random order

    View this question on its own page →
    Worked Solution

    Answer: (i) Loaded only when they are required during execution

    Demand paging loads pages on fault, not preloaded. Reduces startup time and memory use, relying on locality.

  8. Q1h. What is the main problem that the "Critical Section" concept aims to solve in concurrent programming? (i) Memory overflow (ii) Infinite loop termination (iii) Race condition between processes (iv) Lack of CPU resources20242m

    Module 3: Inter-process Communication

    What is the main problem that the "Critical Section" concept aims to solve in concurrent programming?
    (i) Memory overflow
    (ii) Infinite loop termination
    (iii) Race condition between processes
    (iv) Lack of CPU resources

    View this question on its own page →
    Worked Solution

    Answer: (iii) Race condition between processes

    Critical section is code segment accessing shared data. Mutual exclusion ensures only one process executes CS at a time to prevent race where outcome depends on timing.

  9. Q1i. Which of the following is a valid free-space management technique in file systems? (i) Bit Vector (ii) File Mapping (iii) Page Swapping (iv) Disk Fragmentation20242m

    Module 6: I/O & File Management

    Which of the following is a valid free-space management technique in file systems?
    (i) Bit Vector
    (ii) File Mapping
    (iii) Page Swapping
    (iv) Disk Fragmentation

    View this question on its own page →
    Worked Solution

    Answer: (i) Bit Vector

    Valid free-space techniques: Bit vector, Linked list, Grouping, Counting. File Mapping/Page Swapping/Disk Fragmentation are not free-space management.

  10. Q1j. In Peterson's solution for two processes, which condition ensures mutual exclusion? (i) Both processes wait infinitely (ii) Only one process enters the critical section at a time (iii) Both processes enter the critical section together (iv) The process with a higher ID always wins20242m

    Module 3: Inter-process Communication

    In Peterson's solution for two processes, which condition ensures mutual exclusion?
    (i) Both processes wait infinitely
    (ii) Only one process enters the critical section at a time
    (iii) Both processes enter the critical section together
    (iv) The process with a higher ID always wins

    View this question on its own page →
    Worked Solution

    Answer: (ii) Only one process enters the critical section at a time

    Peterson's flags+turn ensures mutual exclusion, progress, bounded waiting for 2 processes without hardware support.

  11. Budget App•POCKETLY

    Pocketly on Android

    Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.

    Install Pocketly
  12. Q2a. What do you understand by the term Process in Operating System? Contrast the types of Interprocess Communication models.20247m

    Module 2: Processes & Scheduling

    What do you understand by the term Process in Operating System? Contrast the types of Interprocess Communication models.

    View this question on its own page →
    Worked Solution

    Process

    Program in execution — includes code, data, stack, heap, PCB, open files. States: New→Ready→Running→Waiting→Terminated (+suspended).

    IPC Models

    • Shared Memory: processes share region; fast, needs sync (mutex/semaphore) to avoid race. E.g., POSIX shm.
    • Message Passing: kernel-mediated send/receive via direct naming or mailbox/ports. No shared state, good for distributed, overhead due to syscalls. Indirect mailbox decouples.
      Contrast: Shared memory = speed but synchronization burden, tight coupling; Message passing = isolation, suitability for network, automatic sync but copy overhead. Modern hybrids use both.
  13. Q2b. What are the two differences between user-level thread and kernel level thread? Under what circumstance is one type better than the other?20247m

    Module 2: Processes & Scheduling

    What are the two differences between user-level thread and kernel level thread? Under what circumstance is one type better than the other?

    View this question on its own page →
    Worked Solution

    User vs Kernel threads

    1. Management: ULT by user library (kernel unaware), KLT by kernel.
    2. Scheduling: ULT many-to-one, KLT one-to-one/many-to-many.
    3. Blocking: one ULT blocks entire process; KLT can schedule another thread of same process.
    4. Overhead: ULT lightweight, fast context switch; KLT heavier but true parallelism.

    When better: ULT when threads are cooperative, low concurrency, need fast creation (e.g., user-level task pool). KLT when needing blocking I/O, multicore parallelism, priority scheduling.

  14. Q3a. Describe the fundamental role of "Process Scheduling" in a multiprogramming operating system. Identify and explain at least three scheduling criteria.20247m

    Module 2: Processes & Scheduling

    Describe the fundamental role of "Process Scheduling" in a multiprogramming operating system. Identify and explain at least three scheduling criteria.

    View this question on its own page →
    Worked Solution

    Process Scheduling Role

    Maximize CPU utilization, throughput, fairness, response time for multiprogramming.

    Three Criteria

    1. CPU Utilization (% busy)
    2. Throughput (jobs/sec)
    3. Turnaround / Waiting / Response Time (minimize)
    4. Fairness (no starvation)
      Explain tradeoffs: batch favors throughput, interactive favors response.
  15. Q3b. Consider the following set of processes with the length of the CPU Burst given in milliseconds: | Process | Burst Time | Priority | | :--- | :--- | :--- | | A | 10 | 3 | | B | 1 | 1 | | C | 2 | 3 | | D | 1 | 4 | | E | 5 | 2 | The processes are assumed to have arrived in order A, B, C, D, E all at time 0. Draw the Gantt charts that illustrate the execution of FCFS and SJF scheduling algorithm. Show which algorithm results in the minimum average waiting time.20247m

    Module 2: Processes & Scheduling

    Consider the following set of processes with the length of the CPU Burst given in milliseconds:

    Process Burst Time Priority
    A 10 3
    B 1 1
    C 2 3
    D 1 4
    E 5 2

    The processes are assumed to have arrived in order A, B, C, D, E all at time 0.
    Draw the Gantt charts that illustrate the execution of FCFS and SJF scheduling algorithm. Show which algorithm results in the minimum average waiting time.

    View this question on its own page →
    Worked Solution

    FCFS vs SJF for A(10),B(1),C(2),D(1),E(5) arrival 0

    FCFS order A,B,C,D,E: Gantt A0-10,B10-11,C11-13,D13-14,E14-19. WT: A0,B10,C11,D13,E14 => Avg WT=9.6, Avg TAT=13.4
    SJF (non-preemptive, sorted by burst): order B(1),D(1),C(2),E(5),A(10): Gantt B0-1,D1-2,C2-4,E4-9,A9-19. WT: B0,D1,C2,E4,A9 => Avg WT=3.2, Avg TAT=7.0
    Conclusion: SJF gives minimum avg waiting (3.2 vs 9.6). SJF is optimal for avg WT.

  16. Q4a. What is virtual memory? How is it implemented? Explain TLB in virtual memory with neat diagram.20247m

    Module 5: Memory Management

    What is virtual memory? How is it implemented? Explain TLB in virtual memory with neat diagram.

    View this question on its own page →
    Worked Solution

    Virtual Memory & TLB

    Virtual memory illusions large logical space via paging + disk. Implemented by page table (logical page → frame) + demand paging (fault handler). TLB is associative cache of recent page translations (page → frame). On access: check TLB hit → frame directly, miss → page table then load TLB (with replacement). Diagram: CPU logical address → (page#, offset) → TLB lookup → frame + offset → physical address. Effective access ~ hit*(TLB+mem)+miss*(TLB+2*mem).

  17. Q4b. What is the difference between fixed partition and variable partition also explains the need of compaction.20247m

    Module 5: Memory Management

    What is the difference between fixed partition and variable partition also explains the need of compaction.

    View this question on its own page →
    Worked Solution

    Fixed vs Variable Partition & Compaction

    • Fixed: equal sized partitions, simple, internal fragmentation, no compaction needed.
    • Variable: partitions sized to process, no internal waste but external fragmentation as holes scattered.
      Compaction shifts occupied partitions to consolidate free space into one large hole, eliminating external fragmentation at cost of copying. Needed for variable partition longevity.
  18. Q5a. Explain the core principle behind Deadlock Avoidance. Draw a Resource-allocation graph with a cycle but no deadlock.20247m

    Module 4: Deadlocks

    Explain the core principle behind Deadlock Avoidance. Draw a Resource-allocation graph with a cycle but no deadlock.

    View this question on its own page →
    Worked Solution

    Deadlock Avoidance Principle

    Requires safe state check before grant. Resource allocation graph with cycle but no deadlock: use multiple instances. Example: 2 instances of R1, P1 holds R1, P2 holds R1, P1 requests R2, P2 requests R2 held elsewhere — cycle exists but extra instance breaks deadlock. Draw RAG with cycle and extra resource free.

  19. Q5b. Consider a system with five processes P0 through P4 and four resources type A, B, C and D. Using the Banker's algorithm answer that the system is in a safe state? | | Allocation | Max | Available | | :--- | :--- | :--- | :--- | | | A B C D | A B C D | A B C D | | P0 | 0 0 1 2 | 0 0 1 2 | 1 5 2 0 | | P1 | 1 0 0 0 | 1 7 5 0 | | | P2 | 1 3 5 4 | 2 3 5 6 | | | P3 | 0 6 3 2 | 0 6 5 2 | | | P4 | 0 0 1 4 | 0 6 5 6 | |20247m

    Module 4: Deadlocks

    Consider a system with five processes P0 through P4 and four resources type A, B, C and D. Using the Banker's algorithm answer that the system is in a safe state?

    Allocation Max Available
    A B C D A B C D A B C D
    P0 0 0 1 2 0 0 1 2 1 5 2 0
    P1 1 0 0 0 1 7 5 0
    P2 1 3 5 4 2 3 5 6
    P3 0 6 3 2 0 6 5 2
    P4 0 0 1 4 0 6 5 6
    View this question on its own page →
    Worked Solution

    Same as Q113 — Banker's safe sequence P0→P3→P1→P2→P4, system is safe. Need = Max-Alloc, check Available 1,5,2,0. P0 need 0 passes, then P3 etc. Detailed as previous.

  20. Q6a. What is Semaphore? Explain with algorithm the Dining-Philosophers Solution using Monitors.20247m

    Module 3: Inter-process Communication

    What is Semaphore? Explain with algorithm the Dining-Philosophers Solution using Monitors.

    View this question on its own page →
    Worked Solution

    Semaphore

    Integer sync variable. Dining Philosophers with Monitor: monitor with 5 condition vars, state[] = thinking/hungry/eating, test(i) checks neighbors not eating, pickup puts hungry then test, putdown sets thinking then tests neighbors. Monitor ensures mutex, prevents deadlock/starvation vs semaphore solution with deadlock risk.

  21. Q6b. What is Belady's Anomaly? Why LRU and Optimal Page Replacement algorithm doesn't suffer from this problem.20247m

    Module 5: Memory Management

    What is Belady's Anomaly? Why LRU and Optimal Page Replacement algorithm doesn't suffer from this problem.

    View this question on its own page →
    Worked Solution

    Belady's Anomaly

    Increasing frames increases faults (FIFO only). LRU/Optimal are stack algorithms: set of pages in n frames subset of n+1 frames, so faults non-increasing. FIFO not stack, so anomaly possible.

  22. Budget App•POCKETLY

    Pocketly on Android

    Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.

    Install Pocketly
  23. Q7a. What is Thrashing? When does it occur? How can one avoid it?20247m

    Module 5: Memory Management

    What is Thrashing? When does it occur? How can one avoid it?

    View this question on its own page →
    Worked Solution

    Thrashing as before: high paging, low CPU, cause degree multiprogramming high, avoid via working set, PFF, local replacement, suspend.

  24. Q7b. Consider the main memory with the capacity of 4 page frames. Assume that the page of process are referenced in the order as given below: 1, 3, 4, 4, 3, 2, 1, 7, 5, 6, 4, 2, 1, 2 Which of FIFO or LRU would be better in this case as a page replacement policy? Why?20247m

    Module 5: Memory Management

    Consider the main memory with the capacity of 4 page frames. Assume that the page of process are referenced in the order as given below:
    1, 3, 4, 4, 3, 2, 1, 7, 5, 6, 4, 2, 1, 2
    Which of FIFO or LRU would be better in this case as a page replacement policy? Why?

    View this question on its own page →
    Worked Solution

    Same as Q117 — LRU better, faults ~8 vs 10, due to locality.

  25. Q8a. Explain the Address Translation mechanism in Paging. Why is the page size normally some power of two?20247m

    Module 5: Memory Management

    Explain the Address Translation mechanism in Paging. Why is the page size normally some power of two?

    View this question on its own page →
    Worked Solution

    Paging Address Translation

    Logical (p,d) → page table base + p → frame → physical (f,d). Page size power of 2 allows split via bits: low bits offset, high bits page; enables fast masking/shifting, no division. Example 4KB=2^12.

  26. Q8b. Given five memory partition of 100 KB, 500 KB, 200 KB, 300 KB, and 600 KB(in order), how would the first-fit and best-fit algorithms place processes of 212 KB, 417 KB, 112 KB, and 426 KB (in order)? Which algorithm makes the most efficient use of memory?20247m

    Module 5: Memory Management

    Given five memory partition of 100 KB, 500 KB, 200 KB, 300 KB, and 600 KB(in order), how would the first-fit and best-fit algorithms place processes of 212 KB, 417 KB, 112 KB, and 426 KB (in order)? Which algorithm makes the most efficient use of memory?

    View this question on its own page →
    Worked Solution

    First-fit vs Best-fit partitions 100,500,200,300,600. Processes 212,417,112,426

    First-fit: 212→500(288 left),417→600(183),112→288? Actually 500 left 288, so 112→288, 426→183 fail? Need 600 now 183, none → wait for 417? Detailed: 212→500,417→600,112→200,426→300 fails (300<426). So 426 waits.
    Best-fit: 212→300(88),417→500(83),112→200? Actually 112→200(88) leaves, 426→600(174). Best-fit places all, more efficient. Best-fit uses memory better here.

  27. Q9a. Compare and contrast between linked and indexed disk allocation strategies.20247m

    Module 6: I/O & File Management

    Compare and contrast between linked and indexed disk allocation strategies.

    View this question on its own page →
    Worked Solution

    Linked vs Indexed Allocation

    Linked: each block holds pointer to next, no external fragmentation, sequential access ok, random slow, pointer overhead, reliability if pointer lost.
    Indexed: index block holds pointers to all blocks, supports direct access, overhead index block, size limited. Indexed better for large random files, linked simpler for sequential.

  28. Q9b. Suppose that a disk drive has 5000 cylinders, numbered 0 to 4999. The drive is currently serving a request at cylinder 143, and the previous request was at cylinder 125. The queue of pending request, in FIFO order, is: 86, 1470, 913, 1774, 948, 1509, 1022, 1750, 130 Starting from the current head position, applying Shortest-seek-time-first algorithm find what is the total distance (in cylinders) that the disk arm moves to satisfy all the pending requests.20247m

    Module 6: I/O & File Management

    Suppose that a disk drive has 5000 cylinders, numbered 0 to 4999. The drive is currently serving a request at cylinder 143, and the previous request was at cylinder 125. The queue of pending request, in FIFO order, is:
    86, 1470, 913, 1774, 948, 1509, 1022, 1750, 130
    Starting from the current head position, applying Shortest-seek-time-first algorithm find what is the total distance (in cylinders) that the disk arm moves to satisfy all the pending requests.

    View this question on its own page →
    Worked Solution

    SSTF total as Q115: 1745 cylinders (same request set 86,1470,913,1774,948,1509,1022,1750,130 from 143) → 1745.

Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.