Berkeley COMPSCI 162 - CS 162 Problem Set 2 (2 pages)

Previewing page 1 of 2 page document View the full content.
View Full Document

CS 162 Problem Set 2



Previewing page 1 of actual document.

View the full content.
View Full Document
View Full Document

CS 162 Problem Set 2

88 views


Pages:
2
School:
University of California, Berkeley
Course:
Compsci 162 - Operating Systems and System Programming
Operating Systems and System Programming Documents

Unformatted text preview:

UNIVERSITY OF CALIFORNIA College of Engineering Department of Electrical Engineering and Computer Sciences Computer Science Division CS 162 Prof Alan J Smith Problem Set 2 Please place the work for this assignment online and submit in the usual manner 1 Suppose a system has a virtual address containing 28 bits Suppose that the page size is 1024 bytes that physical addresses contain 24 bits and that the system uses a segmented and paged scheme with 256 segments and a segment size of one megabyte a Describe the address translation mechanism using a picture to show the relevant tables and operations Don t worry about a TLB Be sure to show the exact size of each table how many entries how many bits wide b Suppose that a byte of physical memory is to be shared by two processes Describe how the tables could be arranged to permit this c Suppose that a particular segment in this system contains 4800 bytes How much memory will the segment cause to be wasted in internal and external fragmentation Consider only the memory allocated to the segment itself do not worry about memory used in the mapping tables d Now suppose that the owner of the 4800 byte segment wishes to expand it by 200 bytes What must the operating system do in order to increase its size Compare this to a system based on pure segmentation e Suppose that the segment is expanded again from 5000 bytes to 5500 bytes What must the operating system do to accomplish this 2 Consider a program that generates the following set of page references AAAABBCACBBDDAEBCEAEDE Assuming that the program is given 3 page frames how many page faults are generated using the following replacement algorithms a FIFO b MIN c LRU d Working Set Tau 6 if six references have been made without accessing a page then it is no longer in the working set For this case the program may need to use more than 3 page frames Indicate how large the working set is at each point in time Assume that pages are thrown out of memory as soon as they leave the



View Full Document

Access the best Study Guides, Lecture Notes and Practice Exams

Loading Unlocking...
Login

Join to view CS 162 Problem Set 2 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view CS 162 Problem Set 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?