ANONYMOUS wrote
It is incorrect, the first 1 will be loaded at time 4 (for both ignore and not) while the second 1 will be loaded at time 7 if you ignore and 9 if you don't.
As Amitava said in the email "Some frames in the memory may remain unoccupied, there is nothing wring in that. The project asks you to print the process page table, and a frame that does not appear is assumed to be empty." Is that means we do not nee...
ANONYMOUS wrote
Is the above line correct, because I'm getting the output, which is different
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,5; 1,0,5; 2,2,15; 2,2,15; 3,2,14; 3,2,14; 1,1,10; 1,1,10
ANONYMOUS wrote
These are correct. C
Clarification for if anyone else looks at this. OP has decided to ignore calls if all has been loaded. It would look different if you chose to load it again.
Hi, before I accidentally posted these in someone elses article so I'll post it here instead I would like to see if these test outputs are correct
in.txt 0 0 0 0 0 1 1 0 0 0 1 1 2 3 3 2 1 2
out.txt
99, 99, 2, 3
4, 5, 6, 7
99, 99, 0, 99
99, 1, 99, 99...
ANONYMOUS wrote
This isn't correct because we are using the "Local" Least Recently Used (LRU) algorithm to evict processes. You seem to be using "global".
1. At time 0,1,2,3 0 0 0 0 is loaded.
2. At time 4 The fifth zero is ignored.
3. At time 5,6,7,8...
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, 9...
ANONYMOUS wrote
You wouldn't gain marks since it isn't asked for in the specification. Whether you lose marks or not would be up to the discretion of whoever marks your code (usually, you wouldn't be marked down for having extra code that exists for ...
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 verif...
How come it is correct, if the replacement is ignored?
Because in the example in the given input last sequence of numbers are "1 1 2 2 3 3 2 2 1 1" and because of that all the pages of process 0 will definitely be replaced by the new pages of all the ...
"You have to write a C program in a single file called simulation.c, and
compiled as an executable called simulation. It will read two file names from
the command line, in.txt and out.txt. The first file is the one mentioned
above, for reading process i...
I have code throughout the project that generates an optional log file.
Assuming the debug code is done well, I was wondering if there would be marks taken off for having extra code, marks added for having good debug functionality, or no difference t...