• retagged by
1,382 views
0 0 votes

Consider a system uses working-set model for frame allocations. Working-set window size is 7. Following is sequence of virtual page references:

5, 4, 3, 3, 4, 1, 2, 2, 1, 2, 1, 1, 5, 4, 3, 5

What will be the minimum number of elements in a working set on execution of the above sequence?

The question is from test series. Here according to their solution minimum number of elements will be 2.

But I think that after executing the above sequence in the beginning the working set will contain only frame 5 so the minimum number of elements will be 1.

 

2 Answers

2 2 votes

You have to check after  completely filling the window size (here it is 7)

so in the process of adding new element to the working set window and swapping out the first one from the left.

you will get  |1|2|2|1|2|1|1|   here only two distinct elements are present that’s why 

minimum number of elements in a working set on execution of the above sequence = 2.

1 1 vote

no, 

working set window means how many pages are there actively used together. There are page references it's different from other page replacement algorithm.

it's asked in question that in working set minimum number of elements means you will have to check in window size 7.

• edited by
Position:
Show:

Related questions

1 1 vote
1 1 answer
1.3k
1.3k views
cse23 asked Jun 4, 2016
1,299 views
1 1 vote
0 0 answers
751
751 views
dragonball asked Jan 11, 2018
751 views
What is working set algorithm with reference to paging .Give an example with diagram.How it is used for dynamic partitioning ?
2 2 votes
1 answers 1 answer
3.0k
3.0k views
Siramdas Vamshidhar asked Oct 15, 2014
3,002 views
suppose R=3,2,4,3,4,2,2,3,4,5,6,7,7,6,5,4,5,6,7,2,1 is a page reference stream.if the window size is 6 and assuming pure demand paging.how may page faults will it cause u...
1 1 vote
1 1 answer
2.0k
2.0k views
Aadesh asked Dec 19, 2021
1,989 views
Suppose we have virtual memory containing 8 pages with 512 bytes per page and physical memory with 16-page frames.Given the following page table ( where virtual page numb...