Professional Documents
Culture Documents
Homework #7
Due February 7, 2007
Name: _______David Oguns__________________Section:
______02____________________
1. Given five memory partitions of 100 KB, 500 KB, 200 KB, 300 KB, and 600 KB (in
order), how would each of the first-fit, best-fit, and worst-fit algorithms place processes
of 212 KB, 417 KB, 112 KB, and 426 KB (in order)?
Which algorithm makes the most efficient use of memory?
The best fit algorithm makes the most efficient use of memory
Answer:
a. First-fit:
100KB -200KB
600KB 417KB
500KB 417KB
300KB 212KB
500KB 417KB
300KB
2. On a system with paging, a process cannot access memory that it does not own. How
does the operating system use paging to enforce this? How could the operating system
modify the paging scheme to allow a process to access another process memory? What
are reasons for and against allowing this?
The operating system uses a page table that labels if the frame is valid or
invalid page to use for the current process. To allow the process to use another
processes memory, the operating system could create a second page table for
external processes it has access to and associate a valid or invalid bit for each entry
there. The reason for allowing it is so that processes running on the operating
system can allow access to each others memory when they allow it. The problem is
that since page tables resides in memory which processes may be able to access
illegally, they can gain further illegal access to other processes in memory. It is a
security risk.