[an error occurred while processing this directive]
CS 5631 Study Questions and Homework
Memory Management (Chapters 9 and 10)
Homework 4
Homework (5 points) due Tuesday, March 9, 2004.
For Homework 4, turn in your answers for the following study questions:
2, 3 (2 points), 4, and 6.
Homework 5
Homework (6 points) due Tuesday, March 24, 2004.
For Homework 5, turn in your answers for the following study questions:
8, 9 (2 points), and 12 (2 points).
Study questions
-
List three algorithms for allocation of memory in systems using
variable-size partitions?
-
What is the difference between internal and external fragmentation?
When do you get internal fragmentation and when do you get external
fragmentation?
-
An operating system that uses demand paging with a global replacement
algorithm will usually need to maintain both a global table and a table
for each process.
-
Are the global tables indexed by logical page number or physical
frame number?
-
Are the process tables indexed by logical page number or physical
frame number?
-
In general terms, describe what must be done when replacing a page.
-
Why is it necessary to know what process is using a frame?
-
What is the purpose of the global tables?
-
What is the purpose of the per-process tables?
-
What is a translation look-aside buffer?
Why is it needed?
-
How is memory protection accomplished in a paged memory environment?
-
How can two processes share memory in a paged memory environment?
-
What are some advantages of using virtual memory?
- What are the two main types of virtual memory systems?
Which is more commonly used in a pure form?
-
Suppose we are using demand-paged memory with a memory access time of 100
nanoseconds, and it takes 8 milliseconds to service a page fault without a
dirty-page write and 20 milliseconds with dirty-page write.
Assuming that a dirty-page write occurs on 70 percent of all page faults,
what is the maximum page fault rate for an effective access time of 200
nanoseconds?
-
Consider the following page reference string
1,2,7,8,3,4,2,1,4,2,5,6,2,1,2,4,7,3,6,3,2,1,2,3,6.
How many page faults would occur for the following page
replacement algorithms assuming an allocation of 3 frames?
-
LRU
-
FIFO
-
Optimal
-
Define what it means for a process to be thrashing?
-
You are given the following information about a paged virtual memory system
with 2 level page tables:
- The CPU uses byte addressing with 32 bit addresses.
- Pages are 4KB.
- There are 2K entries in each low-level page table.
- All page table entries are 4B.
A process is using 12MB of memory for program and data in low memory and
1MB for stack in high memory.
- How large are top-level page tables?
- How large are low-level page tables?
- What is the total page table size for the process?
-
A computer manufacturer announced a new computer model that will have a
page size of 4K bytes instead of 512 bytes.
Discuss how this will affect the sizes of the following:
-
Memory fragmentation
-
Page table size
Which is more important?
-
How are paging and segmentation combined in Pentium processors?
-
In a paged virtual memory system that provides copy-on-write
pages, the operating system initially makes copy-on-write pages unwritable.
Why?
-
Processors that support virtual memory have special instructions for
modifying the translation-lookaside buffer.
Why?
Would these instructions be executable in user mode?
-
Some operating systems reserves a portion of each process's logical address
space, making it illegal for the process to access that data.
What must the operating system do in order to access this data?
Why might it be desirable for an operating system to reserve this address
space?
[an error occurred while processing this directive]