ERODD HOME

Operating Systems CPSC 304
Homework on Memory Management
Earl Rodd erodd@malone.edu Extension 8546 www.malone.edu/erodd

Name: ______________________________________

  1. What two kinds of systems do not use virtual memory?

    ______________________ _______________________

  2. Why don't they use virtual memory?

    __________________________________________________________________

  3. We load a program two different times. We are using a debugger which shows us that the program loaded at different addresses in memory each time. What is this called?

    ________________________________________________

  4. In the example in the text in section 17.3.1, assume that at a point in time the status is:
    PageDirty BitAccessed Bit
    1(*)01
    211
    311
    400
    501
    611
    700
    811
    911
    1011
    1111
    1201
    1311
    1411
    1511
    1600

    (*) Page 1 is virtual = real and cannot be used for other programs.
    If we load a Program 4 which actively uses 5 pages, which 5 pages are most likely to be selected?

    ___ ___ ___ ___ ___ ___

    Which pages would be written to the swap file? ___ ___ ___ ___ ___

  5. Write the PMT for Program 4 at this point. Use the format of the other PMTs in section 15.3.1.
    Virtual PageReal Page
    ____________
    ____________
    ____________
    ____________
    ____________
    ____________
    ____________
    ____________
    ____________
    ____________
    ____________

  6. Which measurement in this list would indicate possible thrashing?
    1. ___ 4 page faults per minute.
    2. ___ 20 reads from the swap file per minute.
    3. ___ 5 writes to the swap file per minute.
    4. ___ Average of 1 free page.
    5. ___ 20 page faults per second.
    6. ___ Machine has 256 Meg. The swap file has 350 Meg used.

    Explain your answer:

    _____________________________________________________________________________

  7. If a program cycles through a large array, reading all the values to perform a mathematical calculation, which bit(s) will be turned on for all the pages? ___________ _________

  8. If a program cycles through a large array, changing every other element as part of a mathematical calculation, which bit(s) will be turned on for all the pages? ___________ ____________

  9. If a program has code of 30 Meg and data areas of 80 Meg, but a working set of only 10 Meg, where is all the extra code and data stored?

    ____________________________________________________________________

    ____________________________________________________________________

  10. Explain what happens if you write a rogue program which attempts to overwrite the interrupt table in low memory in order to gain control of the system.

    __________________________________________________________________________

    __________________________________________________________________________