It's UWAweek 42 (2nd semester, week 12)

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 selected article
Showing 1 of 738 articles.
Currently 11 other people reading this forum.


 UWA week 42 (2nd semester, week 12) ↓
SVG not supported

Login to reply

👍?
helpful
4:23pm Tue 15th Oct, ANONYMOUS

"Anthony Stewart" <24*0*5*9@s*u*e*t*u*a*e*u*a*> wrote:
> Hi, I know the memory struct given to us is an unnamed struct but is it okay if we make a new type called struct memory? > This is how I have defined my struct: > > struct memory { > int process_id; > int page_num; > int last_accessed; > }; > > Also can you verify this output: > > in.txt > 0 0 0 0 1 0 0 2 3 1 0 2 3 3 2 > > out.txt > 0, 1, 2, 3, > 4, 7, 99, 99, > 99, 99, 5, 99, > 99, 99, 6, 99, > 0,0,5; 0,0,5; 0,1,6; 0,1,6; 0,2,10; 0,2,10; 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;
I got the same output, so it's probably correct. In case anyone is looking at this later and wants to know the output for not allowing process pages to be read more than once, the output should be something like this: 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

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