| MUSO | About FIT2022 | Assessment | Contacts | Laboratories | Lectures | Resources | Timetables | Tutorials |
| Last modified: 20070823:105806/initial version | FIT2022 AJH-2007-17 |
Objectives and Outcomes | Lab 4: Memory Management | The Exam Questions Basics | Any Other Issues
(From the Lab4 lab sheet: read this and discuss any aspects that you find unclear.)
Memory management is about making sure that there is enough memory available within the system to run the various processes on offer. Each process needs memory to run, and some processes require more than others to run. It is the role of the memory management algorithm to allocate memory to processes in such a way as to satisfy one or more policies. Those policies may give priority to such things as simplicity, fairness, performance, efficiency, etc., and often these goals may be in conflict. Operating systems design is a compromise!
We will demonstrate memory management by building a simple high level operating system. This system is high level, because it executes Python programs directly, rather than compiling them into machine code. It is simple, because we do not deal with data management issues, but focus only upon the memory management of the code space. Nevertheless, it does demonstrate some vital principles, not the least being the use of processes (threads in our implementation) at the operating system level as well as the user level.
Our simple model is this:
Each of the above components is modelled as a Python class, called respectively: read_progs, load_progs, JobQ, and memory_alloc. A further class, Process, models each user-level process in execution.
Why is compaction only possible if relocation is dynamic?
Why is is relocation a problem for I/O operations?
Why must a program be loaded into memory before it can be executed?
Explain the difference between dynamic linking and dynamic loading.
Explain the difference between internal fragmentation and external fragmentation.
Explain how a two-level paging scheme improves the basic paging memory management strategy by reducing the memory demands of the logical to physical address mapping process. If two-level paging schemes are useful in this respect, would a two level segmentation scheme give any advantage over a one-level paging scheme? Why (not)?
Consider a demand-paged computer system where the degree of multiprogramming is currently fixed at 4. The system was measured to determine utilization of the CPU and the paging disk. The results on three different occasions were
Explain the working set model of virtual memory. On a given system, the following measurements were made:
| Number of instructions | Working Set size (pages) |
|---|---|
| 1000 | 6 |
| 2000 | 10 |
| 4000 | 12 |
| 6000 | 13 |
| 8000 | 18 |
| 10000 | 26 |
| 12000 | 27 |
Sketch the shape of this curve and explain what is happening as the number of instructions in the working set window increases
(Exercise 9.11, Silberschatz and Galvin) Consider the following page reference string:
1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6.
How many page faults would occur for the following replacement algorithms, assuming one, two, three, four, five, six, or seven frames? Remember that all frames are initially empty, so your first unique pages will all cost one fault each.
Are there any other issues you would like to discuss?
| 20070823:105806 | 1.0.0 | ajh | initial version |
| This page maintained by John Hurst. Copyright Monash University Copyright Policy |
| ||
Generated at 20090708:0710 from an XML file modified on 20070904:1512 | |||