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


 UWA week 40 (2nd semester, week 10) ↓
SVG not supported

Login to reply

👍?
helpful
9:16pm Mon 30th Sep, Joshua N.

"Samuel Lewis" <23*6*5*7@s*u*e*t*u*a*e*u*a*> wrote:
> Hi, > > Q1. > In the project briefing, it mentions > ``` > each proces can have 4 pages > ``` > Does that mean that each process can have up to 4 pages, or exactly 4 pages.
Each process has exactly 4 pages in VMEM which can be loaded to RAM.
> Q2. > Is the Virtual Memory an array of memory structs, or an array of memory struct pointers. > I'm aware that the briefing says that the VMEM should be an array of pointers, however, that begs the question where we should be storing the actual memory structs.
Memory of struct pointers. When you store the pointers in VMEM you are storing the structs there also.
> Q3. > If a page is not in RAM, then we need to store its address as 99, however, where should I be looking in the VMEM for it? And as such, how do I know what page pointer to copy into RAM?
>From the in.txt file you know the process to load onto RAM. You load the **next** process page of **that** process onto RAM. I.e. You copy the next available page that isn't in RAM. E.g. If page 0 is in RAM you copy page 1.
Honestly you don't even need to look at the VMEM, just look at the page table and determine which page isn't in RAM and add the next one to RAM. Could just modify the structs in RAM to make the changes.
> Thanks
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