Docsity

Understanding OS Concepts & ClusterF Networking: Mid-Term Exam 15-410, Spring 2005, Exams of Operating Systems

Toggle sidebar
bg1
Computer Science 15-410: Operating Systems
Mid-Term Exam (B), Spring 2005
1. Please read the entire exam before starting to write. This should help you
avoid getting bogged down on one problem.
2. Be sure to put your name and Andrew ID below and also put your Andrew ID at the top of
each following page.
3. This is a closed-book in-class exam. You may not use any reference materials during the
exam.
4. If you have a clarification question, please write it down on the card we have provided. Please
don’t ask us questions of the form “If I answered like this, would it be ok?” or “Are you
looking for ...?”
5. The weight of each question is indicated on the exam. Weights of question parts are estimates
which may be revised during the grading process and are for your guidance only.
6. Please be concise in your answers. You will receive partial credit for partially correct answers,
but truly extraneous remarks may count against your grade.
7. Write legibly even if you must slow down to do so!. If you spend some time to
think clearly about a problem, you will probably have time to write your answer legibly.
Andrew
Username
Full
Name
Question Max Points Grader
1. 10
2. 20
3. 10
4. 15
5. 20
75
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download Understanding OS Concepts & ClusterF Networking: Mid-Term Exam 15-410, Spring 2005 and more Exams Operating Systems in PDF only on Docsity!

Computer Science 15-410: Operating Systems

Mid-Term Exam (B), Spring 2005

1. Please read the entire exam before starting to write. This should help you

avoid getting bogged down on one problem.

  1. Be sure to put your name and Andrew ID below and also put your Andrew ID at the top of each following page.
  2. This is a closed-book in-class exam. You may not use any reference materials during the exam.
  3. If you have a clarification question, please write it down on the card we have provided. Please don’t ask us questions of the form “If I answered like this, would it be ok?” or “Are you looking for ...?”
  4. The weight of each question is indicated on the exam. Weights of question parts are estimates which may be revised during the grading process and are for your guidance only.
  5. Please be concise in your answers. You will receive partial credit for partially correct answers, but truly extraneous remarks may count against your grade.

7. Write legibly even if you must slow down to do so!. If you spend some time to

think clearly about a problem, you will probably have time to write your answer legibly.

Andrew

Username

Full

Name

Question Max Points Grader

I have not received advance information on the content of this 15-410 mid-term exam by dis- cussing it with anybody who took part in a conflict exam session or via any other avenue.

Signature: Date

Give a brief definition of each of the following terms as they apply to this course. You may add a sentence providing an example or a clarification if you wish, but there is no need for long answers.

(b) 2 points runnable

(c) 2 points progress

(d) 2 points bus lock

  1. 20 points Deadlock

A new server clustering architecture, named ClusterF (a successor to the ill-fated ClusterA through ClusterE protocols), is developed. ClusterF connects up to 32 machines via a high-speed ring- shaped network (each node is connected to a clockwise neighbor and a counter-clockwise neighbor). The ring allows traffic in both directions.

A small switch connects each node to its two neighbors; its primary job is to scan incoming traffic from both directions to decide whether each incoming packet is addressed to its node and should be captured or should instead be forwarded onward to the neighbor on the other side.

Due to DWDM, fiber optics, and other network mumbo-jumbo, the link speed is effectively limitless, but the switching hardware connecting each node to its two neighbors can handle only a total of 10Gb/s traffic (as a total in both directions). Control messages use a special low-throughput, high- reliability, high-priority channel, so you may assume that control messages always arrive at their destinations and are processed immediately.

The ClusterF networking protocol allows reservation of fixed one-directional “circuits” between any pair of machines. Any circuit established by this protocol can run in either direction around the ring, can specify a guaranteed bandwidth up to the maximum bandwidth possible through the ring (10Gb/s) and is guaranteed to stay connected until the originating node releases the circuit or something catastrophic happens (e.g., server room catches fire, melting optical fiber). If a circuit is established at a given bandwidth it cannot be closed by the system nor can its bandwidth be reduced. These properties of the system are part of the ClusterF API and must be guaranteed.

In order to establish a one-directional circuit between two machines, the protocol works as follows:

Protocol to establish a circuit from node Nstart to node N with bandwidth guarantee B:

  1. Determine the appropriate direction around the network ring (shortest path; clockwise if distance around network ring is a tie).
  2. Set next node to be node Nstart
  3. If next node is node N , return success
  4. Set next node to be next node’s neighbor in the direction determined in the first step.
  5. Send a request to next node to allow our existing partially-set-up circuit to add an in- coming leg with bandwidth B to next node. next node will grant our request if its switch has enough remaining processing ability (i.e., wouldn’t be processing more than a total of 10 Gb/s worth of incoming traffic) and will reject it otherwise. (a) If next node grants our request, go to Step 3 (success check). (b) If next node denies our request, sleep for a short period and return to Step 5 (“Send a request”).

It is observed that the ClusterF system frequently deadlocks, and your manager asks you to inves- tigate the feasibility of fixing the problem using deadlock prevention.

(a) 4 points What are the four deadlock prevention methods?

(b) 16 points For each of the four methods, describe whether it can feasibly be used to prevent deadlocks in the ClusterF system as it is described above. You may outline changes to the circuit-setup protocol but you may not change the definition of the ClusterF API (for example, you may not allow the system to reduce bandwidth of connections or break guaranteed connections). For some of the methods you need provide only one to three sentences of explanation; for others a paragraph or two should suffice (and it should be clear to you which are which).

You may use this page as extra space for the ClusterF question if you wish.

  1. 15 points Process model

As you were working away in the cluster on your Project 3 implementation yesterday, you overheard two other 15-410 students discussing the exploits of the renowned hacker Claire Tokar. Apparently in her spare time she “ported” her Project 0 traceback() code into the Project 1 run-time environ- ment just for fun. As your classmates tell the story, while Claire needed to make some unauthorized changes to the P1 Makefile to link in the traceback library and invoke symtabgen.pl on the kernel executable, the bottom line is that one ELF binary is much like another.

Later in the day, you find it increasingly difficult to concentrate on P3 and start to wonder if you might be able to justify “investing” a little time to get traceback() running in the P3 environment, or at least trying to add it to your P1 assignment as a stepping-stone toward a possible deployment later in your kernel project. Just before the urge to start typing sweeps you away, you realize that there’s a problem: a critical part of your traceback() code won’t just drop into your P1 code base.

(a) 5 points Briefly summarize which critical part of a working Linux-process traceback() implementation would be challenging to port to the P1 run-time environment. If you can think of multiple parts which would be difficult, choose the most important one or two (no more).

(b) 10 points Explain how you would achieve or approximate the same result in the P1 run- time environment. If you can’t provide an exactly correct solution, be sure to identify where you are making an approximation (and strive to make a good one).

  1. 20 points Consider the following critical-section protocol:

boolean waiting[2] = { false, false }; int turn = 0;

  1. do {
  2. waiting[i] = true;
  3. while (waiting[j]) {
  4. waiting[i] = false;
  5. while (turn == j)
  6. continue;
  7. waiting[i] = true;
  8. }
  9. ...begin critical section...
  10. ...end critical section...
  11. turn = j;
  12. waiting[i] = false;
  13. ...begin remainder section...
  14. ...end remainder section...
  15. } while (1);

(This protocol is presented in the standard form, i.e., if process 0 is running this code, i == 0 and j == 1; if process 1 is running this code, i == 1 and j == 0.) There is a problem with this protocol. That is, it does not ensure that all three requirements (mutual exclusion, progress, and bounded waiting) are always met. Identify a requirement which is not met and lay out a scenario which demonstrates your claim. Use the format presented in class, i.e., P0 P waiting[0] = false; turn = 0;

You may use this page as extra space for the critical-section protocol question if you wish.