Browse papers
A

Section A: Long Answer Questions

Attempt all / any as specified.

4 questions
1long12 marks

(a) Define a process and explain the different states a process passes through during its lifetime with the help of a process state transition diagram. Clearly describe the events that cause each transition. (6)

(b) What information is stored in a Process Control Block (PCB)? Explain how the PCB is used by the operating system during a context switch between two processes. (6)

process-managementcpu-scheduling
2long12 marks

Consider the following set of processes with their arrival times and CPU burst times (in milliseconds):

ProcessArrival TimeBurst Time
P108
P214
P329
P435

(a) Draw the Gantt chart and compute the average waiting time and average turnaround time for (i) Shortest Remaining Time First (SRTF) and (ii) Round Robin scheduling with a time quantum of 3 ms. (8)

(b) Compare preemptive and non-preemptive scheduling, and explain the problem of starvation in priority scheduling along with one technique to overcome it. (4)

cpu-scheduling
3long12 marks

(a) State the four necessary conditions for a deadlock to occur and explain each one briefly. (4)

(b) Consider a system with five processes P0 through P4 and three resource types A (10 instances), B (5 instances) and C (7 instances). At a given instant the following snapshot is observed:

ProcessAllocation (A B C)Max (A B C)
P00 1 07 5 3
P12 0 03 2 2
P23 0 29 0 2
P32 1 12 2 2
P40 0 24 3 3

Given Available = (3 3 2), apply the Banker's Algorithm to determine whether the system is in a safe state. If it is, give a safe sequence. (8)

deadlocks
4long14 marks

(a) Explain the concept of paging. With a neat diagram, describe how a logical address is translated into a physical address using a page table, and explain the role of the Translation Look-aside Buffer (TLB) in speeding up this translation. (8)

(b) For a reference string 7, 0, 1, 2, 0, 3, 0, 4, 2, 3, 0, 3, 2 and a memory with 3 frames, find the number of page faults using the FIFO and Optimal (OPT) page replacement algorithms. Which algorithm performs better here, and does FIFO suffer from Belady's anomaly? (6)

memory-managementpagingvirtual-memory
B

Section B: Short Answer Questions

Attempt all / any as specified.

9 questions
5short8 marks

(a) State the critical section problem and list the three requirements any solution to it must satisfy. (3)

(b) Explain how counting and binary semaphores work, and show how semaphores can be used to solve the Producer-Consumer (bounded buffer) problem. (5)

process-synchronization
6short6 marks

Describe the Dining Philosophers problem. Explain why a naive solution where every philosopher picks up the left fork first can lead to deadlock, and suggest one method to prevent it.

process-synchronizationdeadlocks
7short6 marks

Suppose a disk has 200 cylinders numbered 0 to 199. The disk head is currently at cylinder 53 and the request queue (in order of arrival) is:

98, 183, 37, 122, 14, 124, 65, 67

Compute the total head movement (in number of cylinders) for the FCFS, SSTF, and SCAN disk scheduling algorithms (for SCAN, assume the head is moving towards higher cylinder numbers).

disk-scheduling
8short6 marks

Compare the contiguous, linked, and indexed methods of file allocation. For each method, state one advantage and one disadvantage, and comment on its suitability for sequential versus direct (random) access.

file-systems
9short6 marks

(a) What is thrashing? Explain its cause with reference to the degree of multiprogramming. (3)

(b) Explain how the working-set model helps the operating system detect and control thrashing. (3)

virtual-memory
10short6 marks

Explain the difference between internal and external fragmentation. Describe how the first-fit, best-fit, and worst-fit contiguous memory allocation strategies work, and discuss how compaction can reduce external fragmentation.

memory-management
11short6 marks

(a) Differentiate between a file and a directory, and explain the purpose of single-level, two-level, and tree-structured directory structures. (4)

(b) What is meant by RAID, and how does RAID level 1 (mirroring) improve reliability? (2)

file-systemsdisk-scheduling
12short5 marks

Differentiate between a process and a thread. Explain the advantages of multithreading and briefly describe the many-to-one, one-to-one, and many-to-many threading models.

process-managementcpu-scheduling
13short5 marks

Explain the three principal techniques used for performing I/O: programmed I/O, interrupt-driven I/O, and Direct Memory Access (DMA). State the main advantage of DMA over the other two methods.

io-systems