








Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!









think clearly about a problem, you will probably have time to write your answer legibly.
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
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:
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.
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).
boolean waiting[2] = { false, false }; int turn = 0;
(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.