ANONYMOUS wrote:
Question 1:
In terms of disk initialization when saving all the 32 locations, should the pages be initialized in random order, or is it expected that the process pages will be initialized sequentially? For example, starting with process 0, page 0, page 1, and so on, then moving on to process 1, page 0, page 1, etc.
It can be initialized sequentially. So long as the disk starts with all the process pages inside. So, 0-3 pages for each of the 0-3 processes.
Question 2:
Regarding the page table, can I assume that each process will always have a page table, regardless of whether it has any pages currently loaded into RAM? Based on this assumption, I’m using a single array to represent all the page tables (4 x 4) and updating it as needed, rather than creating separate arrays for each process and only generating them when the process is called and its first page is loaded into RAM. Does this approach align with the project’s expectations?
Yes, as the spec states if a page of a process isn't in RAM its entry in the page table is 99. So, having one array to represent the page table is fine.