Docsity

CS 162 Operating Systems Quiz #2, Exams of Operating Systems

Toggle sidebar
bg1
University of California, Berkeley
CS 162 Operating Systems – Spring 2000
Prof. Michael Franklin
Quiz #2
Monday March 20, 2000
NAME: ________________________________ STUDENT ID:______________________
Circle the last two letters of your class account:
cs162 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
DISCUSSION SECTION DAY & TIME: ___________ TA NAME:_______________
Rules: 1) Closed Books and Notes
2) Answer in the space provided --- THERE IS MORE THAN SUFFICIENT SPACE
3) Make sure answers are clearly marked
4) There are 9 questions
Question 1 (10pts) For a preemptive CPU scheduling approach such as Round Robin, what is
the potential disadvantage of making the CPU time slice (i.e., the amount of time a job is allowed
to use the CPU before it is preempted) too small? and state how it could hurt throughput.
Too many CPU resources spent on context switching.
10 points for correct answer, 5 for a “glimmer” of hope, 0 otherwise
Question 2 (10pts) For a preemptive CPU scheduling approach such as Round Robin, what is a
potential disadvantage of making the CPU time slice too large? and state how it could hurt
average response time.
Short jobs have to wait for long jobs..
10 points for correct answer, 5 for a “glimmer” of hope, 0 otherwise
Question 3 (15pts) TRUE or FALSE (and briefly justify your answer), the multi-level
feedback approach prevents starvation of CPU-intensive jobs.
FALSE – if new short jobs keep entering the system the long-running jobs never get to
run. 5 points for FALSE and 10 for a reasonable explanation (5 for “glimmer” if said FALSE)) .
pf3

Partial preview of the text

Download CS 162 Operating Systems Quiz #2 and more Exams Operating Systems in PDF only on Docsity!

University of California, Berkeley CS 162 Operating Systems – Spring 2000 Prof. Michael Franklin

Quiz # Monday March 20, 2000

NAME : ________________________________ STUDENT ID:______________________

Circle the last two letters of your class account: cs162 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

DISCUSSION SECTION DAY & TIME: ___________ TA NAME:_______________

Rules: 1) Closed Books and Notes

  1. Answer in the space provided --- THERE IS MORE THAN SUFFICIENT SPACE
  2. Make sure answers are clearly marked
  3. There are 9 questions

Question 1 (10pts) For a preemptive CPU scheduling approach such as Round Robin, what is the potential disadvantage of making the CPU time slice (i.e., the amount of time a job is allowed to use the CPU before it is preempted) too small? and state how it could hurt throughput.

T oo many CPU resources spent on context switching. 10 points for correct answer, 5 for a “glimmer” of hope, 0 otherwise

Question 2 (10pts) For a preemptive CPU scheduling approach such as Round Robin, what is a potential disadvantage of making the CPU time slice too large? and state how it could hurt average response time.

S hort jobs have to wait for long jobs.. 10 points for correct answer, 5 for a “glimmer” of hope, 0 otherwise

Question 3 (15pts) TRUE or FALSE (and briefly justify your answer), the multi-level feedback approach prevents starvation of CPU-intensive jobs.

FALSE – if new short jobs keep entering the system the long-running jobs never get to run. 5 points for FALSE and 10 for a reasonable explanation (5 for “glimmer” if said FALSE)).

Question 4 (10pts) Which one of the following is not a mechanism for sharing data between threads in different address spaces: (no explanation necessary).

a) Message Passing (e.g., send/receive) b) Dual-mode operation c) File System reads and writes d) Shared Memory

Answer is “b” NO PARTIAL CREDIT.

Question 5 (15 pts) Briefly describe a technique for protecting programs from accessing each other’s memory that does not require hardware support.

Two options here --- Strong Typing and Compiler Checking. 15 points for getting give partial credit in 5 point increments as you see fit.

Question 6 (10 pts) TRUE or FALSE: One advantage of a segment-based memory management scheme over a “Base and Bounds” scheme is that it provides more protection against one program accessing the memory of another. (no explanation necessary)

Answer is FALSE, NO PARTIAL CREDIT

Question 7 (10 pts) Which one of the following is true about page-based memory allocation:

a) It requires the use of a best-fit strategy for memory allocation. b) It removes the possibility for external fragmentation. c) It removes the possibility for internal fragmentation. d) It removes the problems associated with “sparse” address spaces.

Answer is “B”. NO PARTIAL CREDIT

Question 8 (10 pts) Briefly describe the advantage of introducing a Translation Lookaside Buffer (TLB) into the address translation process when the page tables themselves are stored in virtual memory.