Modules 1–3 · Midterm Examination · 15% of final grade
Midterm Examination
This examination covers Modules 1, 2, and 3 of the course — operating-system foundations, Linux and UNIX fundamentals, processes, threads, CPU scheduling, synchronization, deadlocks, main memory management, and virtual memory. It is a two-hour, closed-book examination worth 15% of the final grade. The paper consists of four parts: a multiple-choice section, a short-answer section, a problem-solving section, and a design-and-analysis section. A complete instructor answer key with model answers and a marking guide is provided after the examination paper.
01 Examination details
| Course | COMP 3150 / CMIS 3150 — Operating Systems |
|---|---|
| Weight | 15% of the final grade |
| Coverage | Modules 1–3 (Units 1–9) |
| Duration | 2 hours (120 minutes) |
| Total marks | 100 marks |
| Format | Closed book. One A4 formula sheet (handwritten or printed, both sides) is permitted. Non-programmable calculator permitted. |
| Sections | Part A — Multiple choice (20 marks) Part B — Short answer (24 marks) Part C — Problems (36 marks) Part D — Design and analysis (20 marks) |
| CLOs assessed | CLO1, CLO2, CLO3, CLO4, CLO5, CLO7 |
02 Instructions to candidates
- Write your name and student number on every answer sheet.
- Answer all questions. There is no choice within any part.
- The marks for each question are shown in brackets. Use the marks as a guide to the length and depth of your answer.
- For multiple-choice questions, write the letter of the best answer (A, B, C, or D) in the answer box. Only one answer per question. No marks are deducted for incorrect answers.
- For calculation questions, show all working. Answers without working receive at most half the marks even if the final answer is correct.
- For design and analysis questions, write in clear prose. Bullet points are acceptable for enumerations but the analysis must be in sentences.
- Time management: approximately 20 minutes for Part A, 30 minutes for Part B, 45 minutes for Part C, and 25 minutes for Part D.
- The examination is closed book. Any attempt to use unauthorised materials will be handled according to the university's academic integrity policy.
03 Formula sheet (permitted reference)
The following formulas may be reproduced on your one-page formula sheet. They are provided here for reference during practice.
Turnaround time = completion time − arrival time
Waiting time = turnaround time − burst time
Response time = first CPU allocation − arrival time
Throughput = processes completed / elapsed time
CPU utilisation = (busy time) / (elapsed time)
Speedup(n) = 1 / ((1 − p) + p / n) (Amdahl's Law)
Effective access time
= (1 − p) × memory_access_time
+ p × page_fault_service_time
Maximum file size (inode with d direct, s single-indirect,
t double-indirect, q triple-indirect pointers)
= (d + s·P + t·P² + q·P³) × block_size
where P = block_size / pointer_size
Page-fault rate p
= page_faults / total_references
Working-set size W(t, Δ)
= number of distinct pages referenced in (t − Δ, t)
04 Examination paper
Begin your answers now. Do not turn to the instructor answer key (Part 06) until you have completed the paper or the time has expired.
05 Part A — Multiple choice (20 marks)
Each question is worth 1 mark. Choose the best answer.
A1
Which of the following is the best description of the operating system as an "extended machine"?
A2
Which Linux directory contains the device files?
A3
In the process state model, which transition is caused by a timer interrupt?
A4
Which of the following is not stored in a process control block (PCB)?
A5
Which threading model multiplexes many user-level threads onto a smaller or equal number of kernel threads?
A6
Which of the following is not a benefit of threads over processes?
A7
Which scheduling algorithm provably minimises average waiting time for a given set of processes?
A8
What is the "convoy effect"?
A9
Which of the following is not one of the three classical requirements for a correct critical-section solution?
A10
Which primitive is best suited to implementing a bounded buffer between a producer and a consumer?
A11
Which of the following is not one of the four necessary conditions for deadlock?
A12
In the Banker's algorithm, what does a "safe state" mean?
A13
Which memory allocation algorithm selects the smallest hole that is large enough for the request?
A14
Which of the following is an example of external fragmentation?
A15
A page fault occurs when:
A16
Which page-replacement algorithm can exhibit Belady's anomaly?
A17
In a system with a 4 KB page size and a 32-bit virtual address, how many bits are used for the page offset?
A18
What does the translation lookaside buffer (TLB) cache?
A19
Which of the following best describes thrashing?
A20
Which scheduling algorithm gives the best response time for interactive processes?
06 Part B — Short answer (24 marks)
Each question is worth 3 marks. Answer in 3–5 sentences.
B1
Explain the difference between a process and a thread. State one resource that is shared between threads of the same process and one resource that is private to each thread.
B2
What is the purpose of the fork()
system call? Explain how copy-on-write makes
fork() efficient.
B3
Explain the difference between preemptive and non-preemptive scheduling. Give one advantage of each.
B4
What is a race condition? State the three conditions that must all hold for a race condition to occur.
B5
Explain why pthread_cond_wait must be
called inside a while loop rather than
an if statement.
B6
List the four necessary conditions for deadlock and give a one-sentence explanation of each.
B7
Explain the difference between internal fragmentation and external fragmentation. Which does paging eliminate, and which does it not?
B8
What is the TLB, and why is it important for performance? Explain what happens on a TLB miss.
07 Part C — Problems (36 marks)
C1
Process state transitions (6 marks). The diagram below shows a five-state process model. Identify each of the five labelled transitions (T1–T5) and give one cause of each.
┌──────┐ ┌───────┐ ┌────────┐
│ New │──T1────▶│ Ready │──T2────▶│Running │
└──────┘ └───────┘ └────────┘
▲ │
│ │
T5 T3
│ │
│ ▼
┌───────┐ ┌────────┐
│Blocked│◀───T4────│Running │
└───────┘ └────────┘
C2
Scheduling (8 marks). Four processes arrive at a single-CPU system as follows:
| Process | Arrival time | Burst time |
|---|---|---|
| P1 | 0 | 7 |
| P2 | 2 | 4 |
| P3 | 4 | 1 |
| P4 | 5 | 4 |
For each of the following algorithms, draw a Gantt chart, and compute the average waiting time, the average turnaround time, and the average response time:
- FCFS (2 marks)
- SJF, non-preemptive (3 marks)
- Round Robin with quantum = 3 (3 marks)
C3
Bounded buffer with semaphores (8 marks).
A bounded buffer of size B is shared by
a single producer and a single consumer. The
solution uses three semaphores:
empty (initially B),
full (initially 0), and
mutex (initially 1).
- Write the producer's sequence of semaphore operations for inserting one item. (3 marks)
- Write the consumer's sequence of semaphore operations for removing one item. (3 marks)
- A student modifies the producer to acquire
mutexbeforeempty. Explain the deadlock that results when the buffer is full. (2 marks)
C4
Banker's algorithm (8 marks). A system has five processes (P0–P4) and three resource types (A, B, C) with total instances (10, 5, 7). The current state is:
| Process | Allocation (A B C) | Max (A B C) |
|---|---|---|
| P0 | 0 1 0 | 7 5 3 |
| P1 | 2 0 0 | 3 2 2 |
| P2 | 3 0 2 | 9 0 2 |
| P3 | 2 1 1 | 2 2 2 |
| P4 | 0 0 2 | 4 3 3 |
Currently available: (3, 3, 2).
- Compute the
Needmatrix. (2 marks) - Is the state safe? If so, give a safe sequence and show the intermediate
Workvalues. (4 marks) - P1 requests (1, 0, 2). Can the request be granted immediately? Justify your answer with the safety check. (2 marks)
C5
Page replacement (6 marks). A system uses demand paging with three physical frames. The reference string is:
1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5
- Compute the number of page faults under FIFO with 3 frames. (2 marks)
- Compute the number of page faults under FIFO with 4 frames. (2 marks)
- What does the difference between (a) and (b) demonstrate? Name the phenomenon and explain it in one sentence. (2 marks)
08 Part D — Design and analysis (20 marks)
D1
Sleeping barber (10 marks). A barber shop has one barber, one barber's chair, and N waiting chairs. Customers arrive at random; if a waiting chair is free, the customer sits; if the barber is asleep, the customer wakes him; if no chair is free, the customer leaves. The barber cuts hair, then sleeps if there are no customers.
Design a solution using semaphores. Your answer must include:
- The semaphores you use, their initial values, and the shared variables they protect. (3 marks)
- The pseudocode for the barber thread and for the customer thread. (4 marks)
- An argument that your solution is free of race conditions, deadlock, and starvation. (3 marks)
D2
Scheduling policy analysis (10 marks). A server runs a mix of two kinds of processes: interactive processes that perform many short CPU bursts and block frequently on I/O, and batch processes that perform long CPU-bound computations with few I/O operations. The system administrator is considering three scheduling policies:
- Policy 1 — FCFS (non-preemptive).
- Policy 2 — Round Robin with a quantum of 10 ms.
- Policy 3 — Multilevel Feedback Queue with three levels: level 0 (quantum 8 ms), level 1 (quantum 16 ms), and level 2 (FCFS with aging). New processes enter at level 0; a process that exhausts its quantum is demoted; a process that blocks before exhausting its quantum remains at its current level; processes in level 2 are promoted after waiting longer than a threshold.
Write an analysis that addresses:
- The effect of each policy on the response time of interactive processes. (3 marks)
- The effect of each policy on the throughput of batch processes. (3 marks)
- The risk of starvation under each policy, and how each policy (or the MLFQ's aging mechanism) addresses it. (2 marks)
- A recommendation for a server with this mixed workload, with a justification that refers to the trade-offs you have identified. (2 marks)
End of examination paper
If you are attempting this paper under exam conditions, stop here. The instructor answer key follows in § 09.
09 Instructor answer key
The following material is for instructors and for students who have completed the paper. Each model answer is accompanied by a marking guide showing the allocation of marks.
Part A — Multiple choice (20 marks, 1 mark each)
A1
Show answer
A2
Show answer
/dev. /etc holds configuration files; /proc is the virtual process and kernel information file system; /bin holds essential user binaries.
A3
Show answer
A4
Show answer
A5
Show answer
A6
Show answer
A7
Show answer
A8
Show answer
A9
Show answer
A10
Show answer
A11
Show answer
A12
Show answer
A13
Show answer
A14
Show answer
A15
Show answer
A16
Show answer
A17
Show answer
A18
Show answer
A19
Show answer
A20
Show answer
Part B — Short answer (24 marks, 3 marks each)
B1
Show answer
Shared resource: the address space (text, data, heap), or the open file descriptor table. Private resource: the stack (and with it the local variables and call frames), or the register set including the program counter.
Marking: 1 mark for the process/thread distinction; 1 mark for a correct shared resource; 1 mark for a correct private resource.
B2
Show answer
fork() creates a new process by duplicating the calling process. The child is an exact copy of the parent (same code, data, and open files) and executes from the point after the fork() call. The parent and child can distinguish themselves by the return value of fork() (0 in the child, the child's PID in the parent).
Copy-on-write makes
fork() efficient because the kernel does not physically copy the parent's address space. Instead, the parent's writable pages are marked read-only and shared with the child. When either process writes to a shared page, a protection fault occurs, and the kernel copies just that page. Because many children immediately call exec() (which discards the copied address space), the copy is often never made.
Marking: 1 mark for the purpose of
fork(); 1 mark for the copy-on-write explanation; 1 mark for the connection to exec() or for noting that only written pages are copied.
B3
Show answer
Advantage of preemptive: it guarantees that a CPU-bound process cannot monopolise the CPU, so interactive processes get timely service. It is essential for fairness and responsiveness. Advantage of non-preemptive: simpler to implement, and it avoids the overhead of frequent context switches. It is appropriate for batch systems where throughput matters more than response time.
Marking: 1 mark for the distinction; 1 mark for the preemptive advantage; 1 mark for the non-preemptive advantage.
B4
Show answer
The three conditions that must all hold are:
- Two or more threads (or processes) access the same shared resource concurrently.
- At least one of the accesses is a write.
- The accesses are not synchronised.
Marking: 1 mark for the definition; 2 marks for the three conditions (they must all be present and correct).
B5
Show answer
pthread_cond_wait may return without any thread having signalled the condition variable. If the code used if, a spurious wakeup would lead the thread to proceed as if the predicate were true. Second, even a legitimate signal does not guarantee that the signalled thread is the one that should proceed: if multiple threads are waiting, the signal may wake an arbitrary thread, and the woken thread may find that another thread has already consumed the condition (a "stolen wakeup").
The
while loop re-checks the predicate after every wakeup, so the thread only proceeds when the predicate is genuinely true. The general rule is: the condition variable must always be used with a predicate, and the predicate must be re-checked after the wait.
Marking: 1 mark for spurious wakeups; 1 mark for stolen wakeups; 1 mark for the re-check rule.
B6
Show answer
- Mutual exclusion: at least one resource is non-shareable; only one process may hold it at a time.
- Hold and wait: a process holding at least one resource is waiting to acquire additional resources held by other processes.
- No preemption: a resource can be released only voluntarily by the process holding it.
- Circular wait: there is a closed chain of processes, each waiting for a resource held by the next.
Marking: 3 marks for all four conditions correctly listed and explained; 2 marks if three are correct; 1 mark if only one or two are correct.
B7
Show answer
Paging eliminates external fragmentation because any free frame can satisfy any page request — physical memory need not be contiguous. Paging does not eliminate internal fragmentation: the last page of a process is partly unused, and the waste is on average half a page per process.
Marking: 1 mark for the internal definition; 1 mark for the external definition; 1 mark for correctly stating which paging eliminates and which it does not.
B8
Show answer
On a TLB miss, the MMU (or the kernel, depending on the architecture) walks the page table to find the translation, loads it into the TLB (possibly evicting an existing entry), and then completes the access. On x86-64 the page-table walk is done in hardware; on some architectures it traps to the kernel, which performs the walk in software.
Marking: 1 mark for the TLB definition; 1 mark for the performance explanation; 1 mark for the TLB-miss behaviour.
Part C — Problems (36 marks)
C1
Show answer
T2 — Ready → Running (dispatched). Cause: the short-term scheduler selects the process and gives it the CPU.
T3 — Running → Ready (preempted). Cause: the process's time quantum expires (timer interrupt), or a higher-priority process becomes ready.
T4 — Running → Blocked (wait). Cause: the process issues an I/O request or waits for an event.
T5 — Blocked → Ready (wakeup). Cause: the awaited I/O completes or the awaited event occurs.
(A sixth transition, Running → Terminated, is not shown but is also correct if a student mentions it.)
Marking: 6 marks total — 1 mark for each transition correctly identified and with a correct cause. Half marks for a correct transition with a vague cause.
C2
Show answer
Gantt: | P1 | P2 |P3| P4 |
0 7 11 12 16
Completion: P1=7, P2=11, P3=12, P4=16
Waiting: P1=0, P2=5, P3=7, P4=7 → avg = 4.75
Turnaround: P1=7, P2=9, P3=8, P4=11 → avg = 8.75
Response: same as waiting → avg = 4.75
(b) SJF, non-preemptive (3 marks):
Gantt: | P1 |P3| P2 | P4 |
0 7 8 12 16
Completion: P1=7, P2=12, P3=8, P4=16
Waiting: P1=0, P2=6, P3=3, P4=7 → avg = 4.00
Turnaround: P1=7, P2=10, P3=4, P4=11 → avg = 8.00
Response: same as waiting → avg = 4.00
(c) Round Robin, quantum = 3 (3 marks):
Gantt: |P1|P2 |P3|P4 |P1 |P2|P4|P1|
0 3 6 7 10 13 14 15 16
Completion: P1=16, P2=14, P3=7, P4=15
Waiting: P1=9, P2=8, P3=2, P4=6 → avg = 6.25
Turnaround: P1=16, P2=12, P3=3, P4=10 → avg = 10.25
Response: P1=0, P2=1, P3=2, P4=2 → avg = 1.25
Marking: For each algorithm, 1 mark for the correct Gantt chart and 1–2 marks for the correct metrics. Award partial marks for a correct Gantt chart with an arithmetic error in the metrics, and vice versa.
C3
Show answer
sem_wait(&empty); /* claim an empty slot */
sem_wait(&mutex); /* enter critical section */
/* insert item into buffer */
sem_post(&mutex); /* leave critical section */
sem_post(&full); /* signal a filled slot */
(b) Consumer (3 marks):
sem_wait(&full); /* claim a filled slot */
sem_wait(&mutex); /* enter critical section */
/* remove item from buffer */
sem_post(&mutex); /* leave critical section */
sem_post(&empty); /* signal an empty slot */
(c) Deadlock (2 marks): If the producer acquires
mutex before empty, then when the buffer is full the producer blocks on empty while holding mutex. The consumer cannot proceed because it needs mutex to remove an item — but the producer holds it. The consumer cannot remove an item, so it cannot signal empty, so the producer waits forever. Deadlock. This is the classic "hold-and-wait with the wrong order" failure.
Marking: (a) 3 marks — 1 for
sem_wait(&empty) before sem_wait(&mutex), 1 for the critical section and sem_post(&mutex), 1 for sem_post(&full). (b) 3 marks — symmetric. (c) 2 marks — 1 for identifying the deadlock, 1 for the explanation of the hold-and-wait cycle.
C4
Show answer
Need (A B C)
P0 7 4 3
P1 1 2 2
P2 6 0 0
P3 0 1 1
P4 4 3 1
Need = Max − Allocation. 1 mark for the correct method, 1 mark for the correct values.
(b) Safety (4 marks): Available = (3, 3, 2). Safe sequence: P1, P3, P4, P0, P2.
Work = 3 3 2
P1 need 1 2 2 ≤ 3 3 2 → Work = 3 3 2 + 2 0 0 = 5 3 2
P3 need 0 1 1 ≤ 5 3 2 → Work = 5 3 2 + 2 1 1 = 7 4 3
P4 need 4 3 1 ≤ 7 4 3 → Work = 7 4 3 + 0 0 2 = 7 4 5
P0 need 7 4 3 ≤ 7 4 5 → Work = 7 4 5 + 0 1 0 = 7 5 5
P2 need 6 0 0 ≤ 7 5 5 → Work = 7 5 5 + 3 0 2 = 10 5 7
All processes finish; the state is safe.
Marking: 1 mark for stating that the state is safe; 2 marks for a valid safe sequence with the correct Work values; 1 mark for the final Work vector (10, 5, 7) or for a complete and consistent trace.
(c) P1 request (1, 0, 2) (2 marks): Check against Need[P1] = (1, 2, 2): (1, 0, 2) ≤ (1, 2, 2) ✓ Check against Available = (3, 3, 2): (1, 0, 2) ≤ (3, 3, 2) ✓ Pretend to allocate:
Allocation[P1] = (2,0,0) + (1,0,2) = (3, 0, 2)
Need[P1] = (1,2,2) − (1,0,2) = (0, 2, 0)
Available = (3,3,2) − (1,0,2) = (2, 3, 0)
Safety check on the new state with Work = (2, 3, 0):
P1 need 0 2 0 ≤ 2 3 0 → Work = 2 3 0 + 3 0 2 = 5 3 2
P3 need 0 1 1 ≤ 5 3 2 → Work = 5 3 2 + 2 1 1 = 7 4 3
P4 need 4 3 1 ≤ 7 4 3 → Work = 7 4 3 + 0 0 2 = 7 4 5
P0 need 7 4 3 ≤ 7 4 5 → Work = 7 4 5 + 0 1 0 = 7 5 5
P2 need 6 0 0 ≤ 7 5 5 → Work = 7 5 5 + 3 0 2 = 10 5 7
The resulting state is safe, so the request can be granted.
Marking: 1 mark for the two preliminary checks; 1 mark for the safety check that shows the resulting state is safe (with a valid sequence).
C5
Show answer
1: F [1]
2: F [1 2]
3: F [1 2 3]
4: F evict 1 → [2 3 4]
1: F evict 2 → [3 4 1]
2: F evict 3 → [4 1 2]
5: F evict 4 → [1 2 5]
1: H
2: H
3: F evict 1 → [2 5 3]
4: F evict 2 → [5 3 4]
5: H (5 is still in frames)
Faults: 9.
(b) FIFO with 4 frames (2 marks):
1: F [1]
2: F [1 2]
3: F [1 2 3]
4: F [1 2 3 4]
1: H
2: H
5: F evict 1 → [2 3 4 5]
1: F evict 2 → [3 4 5 1]
2: F evict 3 → [4 5 1 2]
3: F evict 4 → [5 1 2 3]
4: F evict 5 → [1 2 3 4]
5: F evict 1 → [2 3 4 5]
Faults: 10.
(c) The phenomenon (2 marks): The difference demonstrates Belady's anomaly: increasing the number of frames from 3 to 4 increases the number of page faults (from 9 to 10). It occurs because FIFO does not satisfy the stack property — the set of pages retained with n+1 frames is not a superset of the set retained with n frames — so a larger frame set can produce a worse sequence of evictions. LRU and Optimal do satisfy the stack property and are not subject to this anomaly.
Marking: (a) 2 marks for the correct fault count (9) with the trace shown; (b) 2 marks for the correct fault count (10) with the trace shown; (c) 2 marks — 1 for naming Belady's anomaly, 1 for the explanation.
Part D — Design and analysis (20 marks)
D1
Show answer
sem_t customers; /* init 0 — counts waiting customers */
sem_t barber; /* init 0 — barber is ready to cut */
sem_t mutex; /* init 1 — protects the waiting count */
int waiting = 0; /* number of customers currently waiting */
const int CHAIRS = N; /* number of waiting-room chairs */
(b) Thread pseudocode (4 marks):
void *barber_thread(void *) {
while (1) {
sem_wait(&customers); /* sleep until a customer arrives */
sem_wait(&mutex);
waiting--;
sem_post(&barber); /* barber ready for this customer */
sem_post(&mutex);
cut_hair();
}
}
void *customer_thread(void *) {
sem_wait(&mutex);
if (waiting < CHAIRS) {
waiting++;
sem_post(&customers); /* wake the barber */
sem_post(&mutex);
sem_wait(&barber); /* wait until barber is ready */
get_haircut();
} else {
sem_post(&mutex); /* no chair, leave */
}
}
(c) Correctness argument (3 marks): Race conditions: the
mutex protects the shared variable waiting; every read and write of waiting is inside a critical section guarded by mutex.
Deadlock: the semaphores are acquired in a consistent order (mutex is always released before barber or customers is acquired by the customer; the barber acquires customers before mutex and releases mutex before signalling). No thread holds one semaphore while waiting for another in a way that could form a cycle. A customer that cannot get a chair releases mutex and leaves rather than waiting while holding it.
Starvation: the customers semaphore is a FIFO queue of waiters (POSIX semaphores wake waiters in an unspecified order, but in practice the queue is FIFO on Linux). Each customer that obtains a chair signals customers and eventually waits on barber; the barber serves customers in the order they arrive. A customer that does not obtain a chair is not starved — it simply leaves. No customer waits indefinitely while others are served.
Marking: (a) 3 marks — 1 for the three semaphores with correct initial values, 1 for the shared variable, 1 for identifying the number of chairs as a parameter. (b) 4 marks — 2 for the barber, 2 for the customer. (c) 3 marks — 1 for race freedom, 1 for deadlock freedom, 1 for starvation freedom.
D2
Show answer
(b) Throughput of batch processes (3 marks): FCFS gives the best raw throughput for batch processes because it minimises context switches: each batch process runs to completion (or until it blocks) without interruption. Round Robin reduces throughput because the frequent context switches consume CPU time; with a 10 ms quantum and a context-switch cost of, say, 0.1 ms, the overhead is about 1%, which is modest. MLFQ reduces batch throughput further because batch processes are demoted to the lowest level and receive less CPU than interactive processes. However, MLFQ does not starve batch processes because of the aging mechanism: a batch process in level 2 that waits longer than the threshold is promoted, so it eventually runs. The throughput is lower than FCFS but the system as a whole is better utilised because the CPU is never idle while a batch process holds it.
(c) Starvation risk (2 marks): FCFS has no starvation risk: every process eventually reaches the head of the queue. Round Robin has no starvation risk for the same reason — every process gets a turn within one quantum round. MLFQ can starve low-priority processes if the aging mechanism is absent: a continuous stream of short interactive processes keeps the high-priority queues full, and batch processes are demoted and never promoted. The aging mechanism solves this: a process that waits longer than the threshold in a lower queue is promoted to a higher queue, guaranteeing that it eventually receives CPU time.
(d) Recommendation (2 marks): Policy 3 — MLFQ is the best choice. It gives interactive processes the quick response they need (they stay in the high-priority queues) while still allowing batch processes to make progress (they are demoted but not starved, thanks to aging). Round Robin is a reasonable second choice for a system where all processes are roughly equal in importance, but it penalises batch processes unnecessarily. FCFS is unacceptable for this workload: the convoy effect would make the server feel unresponsive to interactive users whenever a batch job is running. The MLFQ's aging mechanism directly addresses the starvation concern, and the multi-level design matches the natural priority of interactive work over batch work.
Marking: (a) 3 marks — 1 for FCFS analysis, 1 for RR analysis, 1 for MLFQ analysis. (b) 3 marks — symmetric. (c) 2 marks — 1 for identifying the starvation risk in MLFQ (or the absence of it in FCFS/RR), 1 for explaining the aging mechanism. (d) 2 marks — 1 for the recommendation, 1 for the justification.
10 Marking summary
| Part | Content | Questions | Marks each | Total | CLOs |
|---|---|---|---|---|---|
| A | Multiple choice | 20 | 1 | 20 | CLO1, CLO2, CLO3, CLO4 |
| B | Short answer | 8 | 3 | 24 | CLO2, CLO3, CLO4, CLO7 |
| C | Problems | 5 | 6–8 | 36 | CLO2, CLO3, CLO4 |
| D | Design and analysis | 2 | 10 | 20 | CLO3, CLO5, CLO8 |
| Total | 100 | ||||
| Band | Marks | Descriptor |
|---|---|---|
| A | 90–100 | Demonstrates comprehensive understanding of all topics; quantitative answers are correct and well-justified; design and analysis are insightful. |
| B | 80–89 | Demonstrates solid understanding; most answers correct; design and analysis are sound but not exhaustive. |
| C | 70–79 | Demonstrates adequate understanding; some answers are incomplete or have minor errors; design and analysis are present but shallow. |
| D | 60–69 | Demonstrates limited understanding; several answers are incorrect or missing; design and analysis are superficial. |
| F | <60 | Does not demonstrate the required understanding; most answers are incorrect or missing. |
11 Academic integrity
This examination is closed-book and individual. You may bring one A4 formula sheet (handwritten or printed, both sides) and a non-programmable calculator. You must not communicate with any other person during the examination, and you must not access any electronic resource (phone, laptop, tablet, smartwatch, or any other device) unless it is the device on which the examination is being delivered and no other application is open.
Suspected violations are handled according to the university's academic integrity policy. The penalty for a first offence is a grade of zero on the examination; a second offence results in a grade of F in the course.
12 Preparation resources
- All course quizzes (Units 1–9) — the self-check quizzes cover the same material as the multiple-choice and short-answer sections.
- Labs 1–8 — the calculation questions in Part C are similar to the exercises in Labs 4, 5, 6, 7, and 8.
- Textbook chapters: Silberschatz et al., Chapters 1–10; Arpaci-Dusseau, Chapters 1–23; Tanenbaum & Bos, Chapters 1–3.
- The formula sheet in § 03 — practise reproducing it from memory, and work through each formula on a sample problem.
- Office hours — bring your worked solutions to the sample problems and ask for feedback.