Problem 1
Consider the memory management methods of contiguous allocation, paging, and segmentation. Briefly compare these methods with respect to the following: external fragmentation and code sharing among processes (1-2 sentences per method are sufficient).
Problem 2
Suppose a computer that supports virtual memory and has 32-bit virtual addresses and uses page size of 8KB.
- How much space does its page table require if a single-level page table is used? Assumeeach table entry occupies 4 bytes.
- If the physical addresses are 28 bits, what is the physical memory size in MB?
- How many pages does the physical memory have?
Problem 3
(12 points) Consider the following page reference string: 1, 2, 3, 4, 2, 1, 5, 2, 1, 2, 3
How many page faults would occur if there are 3 frames allocated for a process for the page replacement algorithms: LRU, FIFO, Optimal in the following cases? Show your work. Remember all frames are initially empty, so your first unique pages will all cost one fault each.
Problem 4
(12 points) Consider the working-set model with the working set window being 7. Given the following system with 3 independent processes and their corresponding reference strings as shown below:
1
COMP 304- Operating Systems ( Spring 2020): Assignment 3 PROBLEM5
Time | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
P1 | 2 | 5 | 7 | 4 | 4 | 1 | 2 | 3 | 7 | 3 | 3 |
P2 | 1 | 1 | 1 | 3 | 3 | 4 | 4 | 3 | 5 | 6 | 7 |
P3 | 4 | 9 | 3 | 2 | 9 | 8 | 7 | 7 | 7 | 1 | 2 |
- According to the given data above, what is the working set and working set size for eachprocess at time 9 (inclusive)?
- Does the system suffer from trashing at time 9 (inclusive) if there are total 10 frames inthe physical memory? Why or why not? Show your work for credit.
- How many frames should be in the physical memory so that the system doesnt sufferfrom trashing at time 7 (inclusive)? Show your work for credit.
Problem 5
(14 pts) Perform the Programming Problem (12.21) in page 534 in Chapter 11 (if you have the online version of the book, then it is in page 583 in Chapter 12) in edition 9. If you do not have the book, we have provided the related pages on Blackboard and necessary input files.
This part of the project does not require you to implement any program. Instead you have to run some commands to get familiar with the file system in Unix.
- Perform the commands on your system. Include snapshots of your runs in your submission.
- Answer the questions in the text book.
Student Name:
Reviews
There are no reviews yet.