Does time stamp increase when you ignore a page? I have seen some conflicting answers on the forum, and would like to confirm before submitting.
For example, if you don't increase time when ignoring a page, output for
0 0 0 0 1 0 0 2 3 1 0 2 3 3 2
would be:
0, 1, 2, 3
4, 7, 99, 99
99, 99, 5, 99
99, 99, 6, 99
0,0,0; 0,0,0; 0,1,1; 0,1,1; 0,2,2; 0,2,2; 0,3,3; 0,3,3; 1,0,4; 1,0,4; 2,2,11; 2,2,11; 3,2,10; 3,2,10; 1,1,7; 1,1,7;
whereas if you continue to increase the time stamp, the output would be:
0, 1, 2, 3
4, 7, 99, 99
99, 99, 5, 99
99, 99, 6, 99
0,0,0; 0,0,0; 0,1,1; 0,1,1; 0,2,2; 0,2,2; 0,3,3; 0,3,3; 1,0,4; 1,0,4; 2,2,14; 2,2,14; 3,2,13; 3,2,13; 1,1,9; 1,1,9;
is there a single correct solution, or will we be marked based off our assumptions?
> Does time stamp increase when you ignore a page? I have seen some conflicting answers on the forum, and would like to confirm before submitting.
>
> For example, if you don't increase time when ignoring a page, output for
> 0 0 0 0 1 0 0 2 3 1 0 2 3 3 2
>
> would be:
>
> 0, 1, 2, 3
> 4, 7, 99, 99
> 99, 99, 5, 99
> 99, 99, 6, 99
shouldn't the page table here be:
0 2 4 6
8 14 99 99
10 99 99 99
12 99 99 99
because of each page taking up to spaces in RAM, or am I being dumb?
You are getting confused with the location in the RAM array and the page frame in the RAM.
Page tables print which page frame the process page is in, NOT the array index the page starts at.
From the project description:
"We have a computer whose RAM is an array of size 16. It is an array
of pointers. There are 8 page frames in the RAM, each consisting of two
contiguous locations in the array. Hence, the page size of this computer is 2.
...
Each process has a page table, which is an integer array,
entry of a process page table indicates whether the page is in RAM or in the
virtual memory (on disc), k if the page is in RAM (k is the frame number,
between 0 . . . 7), and 99 if the page is in disc (99 cannot be a frame number).
"
As Anon said this is incorrect. The page table is the slot in RAM the page occupies. A slot is of size 2. So, it should be:
0, 1, 2, 3
4, 7, 99, 99
99, 99, 5, 99
99, 99, 6, 99
> Does time stamp increase when you ignore a page? I have seen some conflicting answers on the forum, and would like to confirm before submitting.
>
> For example, if you don't increase time when ignoring a page, output for
> 0 0 0 0 1 0 0 2 3 1 0 2 3 3 2
>
> would be:
>
> 0, 1, 2, 3
> 4, 7, 99, 99
> 99, 99, 5, 99
> 99, 99, 6, 99
>
>
> 0,0,0; 0,0,0; 0,1,1; 0,1,1; 0,2,2; 0,2,2; 0,3,3; 0,3,3; 1,0,4; 1,0,4; 2,2,11; 2,2,11; 3,2,10; 3,2,10; 1,1,7; 1,1,7;
>
>
> whereas if you continue to increase the time stamp, the output would be:
>
> 0, 1, 2, 3
> 4, 7, 99, 99
> 99, 99, 5, 99
> 99, 99, 6, 99
>
>
> 0,0,0; 0,0,0; 0,1,1; 0,1,1; 0,2,2; 0,2,2; 0,3,3; 0,3,3; 1,0,4; 1,0,4; 2,2,14; 2,2,14; 3,2,13; 3,2,13; 1,1,9; 1,1,9;
>
>
> is there a single correct solution, or will we be marked based off our assumptions?
My other post was incorrect. Don't increase the time stamp when you ignore a page.