Memory Address - Operating Systems and System Programming - Exams, Exams of Operating Systems

Main points of this exam paper are: Memory Address, Block Size, Maximum File, File Size, Mapped Cache, Direct Mapped, Lru Replacement, Replacement Policy, Address Translation, Memory Address

Typology: Exams

2012/2013

Uploaded on 04/02/2013

shaina_44kin
shaina_44kin 🇮🇳

3.9

(9)

64 documents

1 / 12

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Page 1/12
University of California, Berkeley
College of Engineering
Computer Science Division EECS
Fall 1999 Anthony D. Joseph
Midterm Exam #2
November 10, 1999
CS162 Operating Systems
Your Name:
SID:
Circle the letters
of your
CS162 login
(1 per line):
a b c d e f g h i j k l m n o p q r s t u v w x y z
a b c d e f g h i j k l m n o p q r s t u v w x y z
TA Name /
Section:
This is a closed book examination. You have two hours to answer as many questions as possible.
The number in parentheses at the beginning of each question indicates the number of points given
to the question; there are 100 points in all. You should read all of the questions before starting the
exam, as some of the questions are substantially more time consuming.
Write all of your answers directly on this paper. Make your answers as concise as possible. If there
is something in a question that you believe is open to interpretation, then please ask us about it!
Good Luck!!
Problem Possible Score
1
12
2
28
3
15
4
12
5
15
6
18
Total
100
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Memory Address - Operating Systems and System Programming - Exams and more Exams Operating Systems in PDF only on Docsity!

University of California, Berkeley College of Engineering Computer Science Division – EECS

Fall 1999 Anthony D. Joseph

Midterm Exam

November 10, 1999 CS162 Operating Systems

Your Name:

SID:

Circle the letters of your CS162 login (1 per line):

a b c d e f g h i j k l m n o p q r s t u v w x y z

a b c d e f g h i j k l m n o p q r s t u v w x y z

TA Name / Section:

This is a closed book examination. You have two hours to answer as many questions as possible. The number in parentheses at the beginning of each question indicates the number of points given to the question; there are 100 points in all. You should read all of the questions before starting the exam, as some of the questions are substantially more time consuming.

Write all of your answers directly on this paper. Make your answers as concise as possible. If there is something in a question that you believe is open to interpretation, then please ask us about it!

Good Luck!!

Problem Possible Score 1 12

2^28

3^15

4^12

Total 100

  1. (12 points total) True / False and Why. Circle the correct answer and provide a short reason for your answer: a. Doubling the block size in the UNIX 4.2 BSD file system will exactly double the maximum file size.

True / False

Why:

b. A direct mapped cache can sometimes have a higher hit rate than a fully associative cache with an LRU replacement policy (on the same reference pattern).

True / False

Why:

c. Virtual memory address translation is useful even if the total size of virtual memory (summed over all programs) is guaranteed to be smaller than physical memory.

True / False

Why:

b. (14 points) Specify how you implement a write-behind policy. Assume a write- behind occurs every 30 seconds. Assume that a file is only opened by one process at a time. You do not have to show how you would modify the read operation.

i) List the data structures, methods, or classes you would either use or modify:

ii) Provide the algorithm for the policy in pseudocode form. Your solution should take less than twenty lines of pseudocode. No optimizations are necessary, however your solution should handle any synchronization issues. You can use any Nachos functions that you would need (if they’re not standard, or are from your own project phases, explain their operation).

(This page intentionally left blank)

b. (5 points) The HAL Junior price sheet looks like this:

Item Specs Price Larger TLB Reduces the probability of a TLB miss to 0.05. Assume that there is sufficient memory that the page fault rate is unaffected.

Hard Disk-Drive II Transfers a page in 8 milliseconds $ 8 MByte more memory

Makes probability of a page fault, given a TLB miss, 0.

Suppose your friend has $1000. Which components should they buy if they want to maximize the performance of their HAL Junior? State the reasoning behind your choices.

No Credit – Problem X: (000000000000 points)

The news is not very good for Bill Gates. On Friday, the judge in the antitrust trial of Microsoft ruled that the software company has monopoly power in PC operating systems and that it has used that power to crush potential threats from competitors.

The Top 10 Things on Bill Gates's To-Do List

  1. Change menacing cackle to more of a charming titter.
  2. Stop payment on Satan's check.
  3. Search JobOptions.com: Field = "Technology" Salary > $25 Billion
  4. Put somebody else in charge temporarily; take the winter off and find Rosebud.
  5. Push own "Start" button. At prompt, choose "Shut Down" and then "Re-start Ego."
  6. Create new corporate division in charge of sending flowers and candy to Sandy O'Connor.
  7. Send message to mother ship: "My job here is done."
  8. Dedicate my life to finding the real monopolists.
  9. See how quickly the government can prepare for the "11/10/99 Bug."
  10. Halt global economy by taking all my money and going home.
  1. (15 points total) Virtual memory page replacement policies. You are given a program that repeatedly scans through the elements of a very large array in virtual memory. For example, if the array is 4 pages long, then its page reference pattern is ABCDABCDABCD...

For each of the following page replacement algorithms, sketch a graph showing the paging behavior. Assume that the program has been running for several iterations through the array. The y-axis of each graph is the number of page faults per referenced page , varying from 0 to 1; the x-axis is the size of the array being scanned, varying from smaller than physical memory to much larger than physical memory. Label any interesting points on the graph on both the x and y axes.

a. FIFO

Size of array

Number of page faults per referenced page

b. LRU

Size of array

Number of page faults per referenced page

c. MIN

Size of array

Number of page faults per referenced page