Consider the list of page references in the time line as below: 9 6 2 3 4 4 4…

2013

Consider the list of page references in the time line as below: 9 6 2 3 4 4 4 4 3 4 4 2 5 8 6 8 5 5 3 2 3 3 9 6 2 7 What is the working set at the penultimate page reference if ∆ is 5?

  1. A.

    {8,5,3,2,9,6}

  2. B.

    {4,3,6,2,5}

  3. C.

    {3,9,6,2,7}

  4. D.

    {3,9,6,2}

Attempted by 170 students.

Show answer & explanation

Correct answer: D

Step 1: Understand the concept

In Operating Systems, the working set at any time is the set of pages referenced in the last Δ (delta) references.

Here,

Δ = 5

We need the working set at the penultimate (second last) reference.

Step 2: Identify the penultimate reference

Given sequence:

9 6 2 3 4 4 4 4 3 4 4 2 5 8 6 8 5 5 3 2 3 3 9 6 2 7

Last element = 7

Penultimate element = 2 (second last)

Step 3: Take last 5 references up to that point

We consider 5 references ending at the penultimate element:

Sequence till that point:

... 3 3 9 6 2

Last 5 elements:

3, 3, 9, 6, 2

Step 4: Find unique pages

Working set = unique pages in these 5 references:

{2, 3, 6, 9}

Final Answer:

Working Set = {2, 3, 6, 9}

NOTE: Maximum possible working set size = Δ and Minimum possible working set size = 1

Explore the full course: Isro