It's UWAweek 47

help2002

This forum is provided to promote discussion amongst students enrolled in CITS2002 Systems Programming.
Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.
Displaying the 4 articles in this topic
Showing 4 of 828 articles.
Currently 102 other people reading this forum.


 UWA week 41 (2nd semester, week 11) ↓
SVG not supported

Login to reply

👍?
helpful

Hi there! Just a few questions to clarify if I'm understanding correctly 1.
>From an earlier forum question it is stated that
[help2002] in.txt 0 1 2 3 0 1 2 3 0 1 2 3 out.txt 99, 4, 0, 99 99, 5, 1, 99 99, 6, 2, 99 99, 7, 3, 99 RAM Contents: 0,2,8; 0,2,8; 1,2,9; 1,2,9; 2,2,10; 2,2,10; 3,2,11; 3,2,11; 0,1,4; 0,1,4; 1,1,5; 1,1,5; 2,1,6; 2,1,6; 3,1,7; 3,1,7; is the correct answer, the question is if we add another 0 after like (0 1 2 3 0 1 2 3 0 1 2 3 0) will it then load the first page of process 0 (4, 99, 0, 99) or last page of process 0 (99, 99, 0, 4)? 2. For initialization, it is stated RAM has 16 pointers, Virtual Memory (DISK) has 32 pointers, are they disjoint or are they union together with RAM being with the Virtual Memory Thanks so much for your help and good luck on project 2 everyone!


SVG not supported

Login to reply

👍?
helpful

ANONYMOUS wrote:
> Hi there! Just a few questions to clarify if I'm understanding correctly > > 1. > >From an earlier forum question it is stated that > [help2002] > in.txt > 0 1 2 3 0 1 2 3 0 1 2 3 > > out.txt > 99, 4, 0, 99 > 99, 5, 1, 99 > 99, 6, 2, 99 > 99, 7, 3, 99 > RAM Contents: > 0,2,8; 0,2,8; 1,2,9; 1,2,9; 2,2,10; 2,2,10; 3,2,11; 3,2,11; 0,1,4; 0,1,4; 1,1,5; 1,1,5; 2,1,6; 2,1,6; 3,1,7; 3,1,7; > > is the correct answer, the question is if we add another 0 after like (0 1 2 3 0 1 2 3 0 1 2 3 0) > will it then load the first page of process 0 (4, 99, 0, 99) or last page of process 0 (99, 99, 0, 4)?
Answered here: [help2002]
> 2. > For initialization, it is stated RAM has 16 pointers, Virtual Memory (DISK) has 32 pointers, are they disjoint or are they union together with RAM being with the Virtual Memory
Their contents are not disjoint (e.g. for the example you gave, after the first-time step the pointer for page 0, process 0 will be in both RAM and Virtual Memory), but they are two separate data structures if that is what you're asking (two separate arrays).
> Thanks so much for your help and good luck on project 2 everyone!
Thanks.


SVG not supported

Login to reply

👍?
helpful

"Joshua Noble" <22*6*9*8@s*u*e*t*u*a*e*u*a*> wrote:
> ANONYMOUS wrote: > > > Hi there! Just a few questions to clarify if I'm understanding correctly > > > > 1. > > >From an earlier forum question it is stated that > > [help2002] > > in.txt > > 0 1 2 3 0 1 2 3 0 1 2 3 > > > > out.txt > > 99, 4, 0, 99 > > 99, 5, 1, 99 > > 99, 6, 2, 99 > > 99, 7, 3, 99 > > RAM Contents: > > 0,2,8; 0,2,8; 1,2,9; 1,2,9; 2,2,10; 2,2,10; 3,2,11; 3,2,11; 0,1,4; 0,1,4; 1,1,5; 1,1,5; 2,1,6; 2,1,6; 3,1,7; 3,1,7; > > > > is the correct answer, the question is if we add another 0 after like (0 1 2 3 0 1 2 3 0 1 2 3 0) > > will it then load the first page of process 0 (4, 99, 0, 99) or last page of process 0 (99, 99, 0, 4)? > > Answered here: > [help2002] > > > 2. > > For initialization, it is stated RAM has 16 pointers, Virtual Memory (DISK) has 32 pointers, are they disjoint or are they union together with RAM being with the Virtual Memory > > Their contents are not disjoint (e.g. for the example you gave, after the first-time step the pointer for page 0, process 0 will be in both RAM and Virtual Memory), but they are two separate data structures if that is what you're asking (two separate arrays). >
I see! So when we remove it from RAM we just remove the pointer to it in the RAM while the pointer in the Virtual Memory never changes? And yes, I was asking if they were separate arrays. Thanks for the help Joshua!
> > Thanks so much for your help and good luck on project 2 everyone! > Thanks.


SVG not supported

Login to reply

👍?
helpful

> I see! So when we remove it from RAM we just remove the pointer to it in the RAM while the pointer in the Virtual Memory never changes?
Yes, Virtual Memory doesn't change. We are just moving pointers in and out of RAM (and updating the page table to keep record of where the pages are in RAM).
> And yes, I was asking if they were separate arrays. Thanks for the help Joshua!
np

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  8:08AM Aug 25 2024
Privacy policy