Probability Engine · CSC259

Operating System (BSc CSIT, CSC259): the questions likely to come

30 analyzed questions from 7 past papers (2074-2081), grouped by syllabus unit — each with its probability, how often it's been asked, and where to study the answer.

7
Papers analyzed
2074-2081
30
Analyzed questions
across 7 syllabus units
3
Very likely units
high-probability topics
4
Units = 80% of marks
study these first
Model answers for this subject are being written. Every question links to its original paper so you can study from the source meanwhile.
Pick a unit
U3 · Q1/9 · 208110 marks
Process Synchronization and Deadlocks

Explain the Critical Section problem. Describe Peterson's solution and the use of semaphores to achieve process synchronization.

34%
Possible to appearAppeared in 2 of the last 2 board papers
Seen in
How well do you know this?rating moves you on
MODEL ANSWERU3 · 10 marks

Critical Section Problem

When multiple processes share data, each process has a segment of code called the critical section (CS) in which it accesses the shared resource. The problem is to design a protocol so that no two processes execute their critical sections at the same time.

A correct solution must satisfy three requirements:

  1. Mutual Exclusion – if a process is in its CS, no other process may be in its CS.
  2. Progress – if no process is in its CS, only the processes not in their remainder section participate in deciding who enters next, and the decision cannot be postponed indefinitely.
  3. Bounded Waiting – there is a bound on the number of times other processes can enter their CS after a process has requested entry and before that request is granted (no starvation).

General structure of a process:

do {
    entry section
        critical section
    exit section
        remainder section
} while (true);

Peterson's Solution (two processes)

A classic software solution for two processes P0P_0 and P1P_1. It uses two shared variables:

  • int turn; – whose turn it is to enter.
  • boolean flag[2];flag[i] is true if PiP_i wants to enter.
// Process Pi  (j = the other process)
do {
    flag[i] = true;
    turn = j;
    while (flag[j] && turn == j);   // busy wait
        /* critical section */
    flag[i] = false;
        /* remainder section */
} while (true);

Why it works: PiP_i enters only when the other process does not want to enter (flag[j]==false) or it is PiP_i's turn (turn==i). Since turn can hold only one value, only one process passes the while test → mutual exclusion. Progress and bounded waiting also hold because a waiting process is admitted as soon as the other leaves. (Limitation: works for only 2 processes and assumes no instruction reordering.)

Semaphores

A semaphore SS is an integer variable accessed only through two atomic operations:

wait(S):  while (S <= 0);   // busy-wait (or block)
          S--;
signal(S): S++;

Mutual exclusion using a binary semaphore (initialised to 1):

wait(mutex);
    // critical section
signal(mutex);
    // remainder

The first process to call wait(mutex) makes mutex = 0; any other process blocks until the first calls signal(mutex). To avoid busy waiting, the OS implementation blocks the process on a waiting queue and wakes it on signal. Counting semaphores (initial value = number of available resources) generalise this to control access to a pool of identical resources.

Conclusion: The critical-section problem requires mutual exclusion, progress and bounded waiting. Peterson's solution provides a correct software solution for two processes, while semaphores offer a general, hardware-supported synchronization primitive usable for any number of processes.

AI-generated answer · unverifiedView in 2081 paper →
U3 · Question 1 of 9
Question Priority · U3ranked by appearance likelihood — study top-down

Process Synchronization and Deadlocks

Analyzed next52%
1
★ TOP PICK

Explain the Critical Section problem. Describe Peterson's solution and the use of semaphores to achieve process synchronization.

10 marksSEEN IN
34%
2

What is a resource allocation graph? Explain the process of detecting deadlock when there is a single instance of each resource type with a suitable example.

10 marksSEEN IN
32%
3

What is a deadlock? Explain the four necessary conditions for deadlock and describe deadlock avoidance using the Banker's algorithm with an example.

10 marksSEEN IN
31%
4

What is a semaphore? Differentiate between binary and counting semaphores.

5 marksSEEN IN
52%
5

Explain the concept of a monitor in process synchronization.

5 marksSEEN IN
52%
6

What is the producer-consumer problem? Explain in brief.

5 marksSEEN IN
50%
7

Explain the Dining Philosophers problem.

5 marksSEEN IN
50%
8

Distinguish between starvation and deadlock.

5 marksSEEN IN
48%
9

Can deadlock occur in the case of preemptive resources? List the conditions for deadlock.

5 marksSEEN IN
44%
03The mock

Sit a probable paper

A full mock exam built from the most likely questions, mirroring the real paper's structure. Every slot is a real past question.

Most Probable Paper

Mirrors the real structure · 60 marks · based on 7 past papers

Section A: Long Answer QuestionsAttempt any TWO questions.
  1. 1.

    Explain paging as a memory management technique. Discuss how logical addresses are translated to physical addresses using a page table and TLB.

    [10 marks]
    Memory ManagementVery likelyfrom 2081 paper →

    This question has recurred in 3 of 7 years; so far only in internal assessments, not the board; and its topic (Memory Management) appears in 86% of years.

  2. 2.

    Explain the Critical Section problem. Describe Peterson's solution and the use of semaphores to achieve process synchronization.

    [10 marks]
    Process Synchronization and DeadlocksVery likelyfrom 2081 paper →

    This question has recurred in 2 of 7 years; so far only in internal assessments, not the board; and its topic (Process Synchronization and Deadlocks) appears in 100% of years.

  3. 3.

    What is a resource allocation graph? Explain the process of detecting deadlock when there is a single instance of each resource type with a suitable example.

    [10 marks]
    Process Synchronization and DeadlocksVery likelyfrom 2080 paper →

    This question has recurred in 2 of 7 years; so far only in internal assessments, not the board; and its topic (Process Synchronization and Deadlocks) appears in 100% of years.

Section B: Short Answer QuestionsAttempt any EIGHT questions.
  1. 1.

    What is thrashing? How can it be prevented?

    [5 marks]
    Memory ManagementVery likelyfrom 2081 paper →

    This question has recurred in 5 of 7 years; so far only in internal assessments, not the board; and its topic (Memory Management) appears in 86% of years.

  2. 2.

    What is a semaphore? Differentiate between binary and counting semaphores.

    [5 marks]
    Process Synchronization and DeadlocksVery likelyfrom 2081 paper →

    This question has recurred in 4 of 7 years; so far only in internal assessments, not the board; and its topic (Process Synchronization and Deadlocks) appears in 100% of years.

  3. 3.

    Explain the concept of a monitor in process synchronization.

    [5 marks]
    Process Synchronization and DeadlocksVery likelyfrom 2081 paper →

    This question has recurred in 4 of 7 years; so far only in internal assessments, not the board; and its topic (Process Synchronization and Deadlocks) appears in 100% of years.

  4. 4.

    What is the producer-consumer problem? Explain in brief.

    [5 marks]
    Process Synchronization and DeadlocksVery likelyfrom 2081 paper →

    This question has recurred in 4 of 7 years; so far only in internal assessments, not the board; and its topic (Process Synchronization and Deadlocks) appears in 100% of years.

  5. 5.

    Explain the Dining Philosophers problem.

    [5 marks]
    Process Synchronization and DeadlocksVery likelyfrom 2081 paper →

    This question has recurred in 4 of 7 years; so far only in internal assessments, not the board; and its topic (Process Synchronization and Deadlocks) appears in 100% of years.

  6. 6.

    Distinguish between starvation and deadlock.

    [5 marks]
    Process Synchronization and DeadlocksVery likelyfrom 2080 paper →

    This question has recurred in 4 of 7 years; so far only in internal assessments, not the board; and its topic (Process Synchronization and Deadlocks) appears in 100% of years.

  7. 7.

    Differentiate between logical and physical address space.

    [5 marks]
    Memory ManagementVery likelyfrom 2081 paper →

    This question has recurred in 4 of 7 years; so far only in internal assessments, not the board; and its topic (Memory Management) appears in 86% of years.

  8. 8.

    Explain segmentation as a memory management scheme.

    [5 marks]
    Memory ManagementVery likelyfrom 2081 paper →

    This question has recurred in 4 of 7 years; so far only in internal assessments, not the board; and its topic (Memory Management) appears in 86% of years.

  9. 9.

    What is RAID? Explain any two RAID levels.

    [5 marks]
    I/O Systems and Mass-Storage ManagementLikelyfrom 2081 paper →

    This question has recurred in 4 of 7 years; so far only in internal assessments, not the board; and its topic recurs in 4 of 7 years.

04The receipts

Behind the numbers

The raw evidence the predictions are computed from: marks per unit per year, syllabus weights, trends, and coverage.

Show the heatmap, topic table and coverage analysis

The receipt: marks per unit, per year

Each row is a syllabus unit, each column an exam year, each cell the marks that unit earned that year. Click any cell to see the actual questions behind it.

Marks:nonefew → many
2074
2075
2077
2078
2079
2080
2081
Total
U3Process Synchronization and Deadlocks
175
U4Memory Management
135
U2Process Management
85
U1Operating System Overview
55
U6I/O Systems and Mass-Storage Management
50
U5File Management and Implementation
25
U7Protection, Security and Case Studies
0
#Syllabus unitProbabilityAppearedAvg marksSyllabus weightExam vs syllabusTrendQuestions
1U3Process Synchronization and DeadlocksVery likely100%2520%9 lecture hrsOver-examinedexam 33% · syllabus 20%Steady9 recurring9 total
2U4Memory ManagementVery likely86%22.520%9 lecture hrsOver-examinedexam 26% · syllabus 20%Steady6 recurring6 total
3U2Process ManagementVery likely100%12.118%8 lecture hrsBalancedexam 16% · syllabus 18%Steady4 recurring6 total
4U1Operating System OverviewLikely57%13.89%4 lecture hrsBalancedexam 10% · syllabus 9%Steady3 recurring4 total
5U6I/O Systems and Mass-Storage ManagementLikely57%12.511%5 lecture hrsBalancedexam 10% · syllabus 11%Steady3 recurring3 total
6U5File Management and ImplementationPossible43%8.313%6 lecture hrsUnder-examinedexam 5% · syllabus 13%Steady1 recurring2 total
7U7Protection, Security and Case StudiesOccasional0%
09%4 lecture hrsUnder-examinedexam 0% · syllabus 9%SteadyNone

Study smart, not hard

Drag the slider: studying the top 4 units in priority order covers ~86% of all observed marks.

  1. ~80% line

Lecture time vs exam marks

Where the exam pays more than the curriculum spends: ● lectures vs ● exam marks, as a share of the whole course. A long teal-leading bar = high-yield unit.

U3Process Synchronization and Deadlocks
20% of lectures → 33% of markshigh yield
U4Memory Management
20% of lectures → 26% of markshigh yield
U2Process Management
18% of lectures → 16% of marks
U1Operating System Overview
9% of lectures → 10% of marks
U6I/O Systems and Mass-Storage Management
11% of lectures → 10% of marks
U5File Management and Implementation
13% of lectures → 5% of markslow yield
U7Protection, Security and Case Studies
9% of lectures → 0% of markslow yield

Topics are the official CSC259 syllabus units. Predictions are data-driven probabilities computed from 7 past papers (2074-2081) by mapping each real question to its syllabus unit. They indicate what has historically been likely, not guaranteed questions. Always study the full syllabus.