{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Computer Science 162 - Fall 1998 - Smith - Midterm 1

# Computer Science 162 - Fall 1998 - Smith - Midterm 1 -...

This preview shows pages 1–3. Sign up to view the full content.

Computer Science 162 - Fall 1998 - Smith - Midterm 1 UNIVERSITY OF CALIFORNIA College of Engineering Department of Electrical Engineering and Computer Sciences Computer Science Division CS 162 Alan Jay Smith Fall, 1998 Midterm 1, October 5, 1998 Part I You have until the time announced for this exam. The exam is closed book. All answers should be written on the exam paper. Anything that we can't read or understand won't get credit. Any question for which you give no answer at all will receive 25% par- tial credit. Please answer in standard English; illiterate or il- legible answers to essay questions will lose credit. Please watch the front board for corrections and other information. This exam has 7 questions on 6 pages and is in two parts. Name (last, first, middle):______________________________________ Student ID #_________________________ Class Account:____________________________________ 1. What is the difference between an open and a closed (queueing) system? In studying scheduling algorithms, why does it matter which one we use? Does the scheduling algorithm affect the throughput in an open system? Explain. (12) ---------------------------------- An open system is one in which the arrival rate is not related to the number of customers in the system. world -----> system -----> done A closed system is one in which the total number of customers in the "system"+"the world" is constant. Thus, typically, the arrival rate drops as the number of customers queued or in service increas- es. <-----world--------< | | | | >-----system------>^ The reason to use the open system is that it is easier to analyze and to say definite things about. The reason to use a closed sys- tem is that it is more realistic - almost any real system is closed. The behavior of the system under different queueing disci- plines may not be the same (at least in certain respects), so in some cases it is important to use a realistic model. In an open system, the throughput is invariant with the scheduling algorithm (as long as rho (=arrival rate/service rate) is <1. In such a case, all arriving jobs get processed and leave, so the throughput is exactly equal to the arrival rate. Since in (almost) Page 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Computer Science 162 - Fall 1998 - Smith - Midterm 1 any real system the throughput does vary with the scheduling algo- rithm, we can see that it does matter whether we use an open or closed system. ===================================================================== 2. Assume that a cafeteria has a person making sandwiches. In most cafeterias, FIFO scheduling is used. I.e. the person at the head of the line gives his/her order, and the sandwich maker makes the sandwich, gives it to that person, and then takes the next order. Please compare and explain the relative desirability of using SET, FIFO and RR scheduling for the sandwich making process. (12) --------------------------------- The point of this question was to realize that sandwich scheduling is NOT the same as CPU scheduling. A lot of people just recited what they learned about CPU scheduling (in some cases by making the unreasonable assumption that sandwich making times are highly skewed). The relative desirability of scheduling algorithms de- pends on the job processing time distribution (highly skewed for the CPU, very small skew for sandwich maker in a cafeteria) and the overhead of task switching (low for CPU, high for sandwiches).
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern