2009 S Pre Exam2 Review 6up PDF
2009 S Pre Exam2 Review 6up PDF
2009 S Pre Exam2 Review 6up PDF
Exam 2
Spring 2008
Page 1 Page 2
What problem with Lamport clocks to vector clocks solve? A client's clock reads 3:20:00. The server's clock reads 3:10:00
when they synchronize using the Berkeley algorithm. Assume
message delays are negligible. What is the time at the client after
synchronization?
With Lamport clocks, you cannot tell whether two
events are causally related or concurrent by looking at
the timestamps. Just because L(a) < L(b) does not mean The Berkeley algorithm averages clocks among the
that a->b. entire group. In this case, the group has two members:
the client and the server. The average of the two clocks
is (3:20:00 + 3:10:00)/2 = 3:15. Both the client and
Vector clocks allow you to compare two vector
server will be set to 3:15.
timestamps to determine whether the events are
concurrent or not.
Page 3 Page 4
A client's clock reads 3:20:00. The server's clock reads 3:10:00 Some networks, such as cable TV Internet service, provide an asymmetric
when they synchronize using Cristian's algorithm. Assume message bandwidth. For example, a cable modem may provide 12 Mbps downstream
delays are negligible. What is the time at the client after service but only 1 Mbps upstream. Cristian's algorithm assumes symmetric
synchronization? delays to and from the server.
(a) Reformulate the algorithm to accommodate asymmetric delays, where
TS is the server's time, Ta is the time the request was sent, Tb is the time
the response was received, U is the upstream bandwidth, and D is the
Cristian’s algorithm assumes that the server has an downstream bandwidth.
accurate clock. The client requests the time and sets its
clock to the server’s time + ½(round trip delay). In this Assume the message size is x. The best-case time to send a message is x/
case, the round-trip delay is negligible (i.e., 0), so the U. The best-case time to receive a response is x/D.
The total time is (x/U + x/D) = x(D+U)/DU.
client just sets its clock to the server’s time: 3:10:00.
The ratio of the time to get a response to the total time is:
[x/D] / [x(D+U)/DU] = xDU / x(D+U) = U/D+U. We assume that the
response was generated this long ago compared to the total time.
The special-case Cristian’s algorithm sets the clock to
Tclient = TS + (U/(D+U)) (Tb-Ta)
Page 5 Page 6
1
(b) You are on a network with a 9 Mbps downstream bandwidth and The Coda distributed file system does not support:
a 1 Mbps upstream bandwidth. Your client makes a request at (a) Tokens for file locking.
9:10:00.0 and gets a response 200 msec later. If the time on the (b) Disconnected clients.
server is 8:42:00.0, what would the time be set to on your client?
(c) Replicated servers.
(d) Session semantics.
From (a):
U = 1 Mbps, D = 9 Mbps
Tclient = TS + (U/(D+U)) (Tb-Ta)
Tclient = TS + (1/10) (Tb-Ta)
= 8:42:00.0 + 0.1 (0:00:00.200)
= 8:42:00.02
Page 7 Page 8
Page 9 Page 10
Opportunistic locks, or oplocks: Alice has a remote file open on her system with a Level 1 oplock.
(a) Tell the client how it may cache file data and attributes. Bob tries to open the file from another system. The most likely
(b) Are a first-come, first-served mechanism for locking a file. scenario is:
(c) Allow clients to grab locks on a remote file under CIFS. (a) Alice's oplock will be revoked and Bob will be able to share
the file.
(d) Guarantee exclusive access to a file once it is open.
(b) Bob's request will fail.
(c) Bob will be blocked until Alice releases her lock.
(d) Alice's oplock will be revoked and she will no longer have access
to the file.
Page 11 Page 12
2
A synchronization subnet is: IP multicast uses:
(a) The collection of NTP servers on the Internet. (a) Unreliable multicast.
(b) An IP multicast group used for clock synchronization (b) Reliable multicast.
(c) The set of machines addressed by an NTP server operating in (c) Atomic multicast.
multicast mode (d) User-selectable reliability.
(d) The set of NTP servers with which you are currently
synchronizing.
Page 13 Page 14
False sharing in a distributed shared memory system arises A distributed directory in a distributed shared memory system:
because: (a) Ensures cache coherence in a sequentially coherent memory
(a) Unrelated data is shared between multiple systems but system.
resides on the same memory page. (b) Allows concurrent queries and updates to a memory page.
(b) One distribute memory page is mapped onto two or more (c) Is necessary for systems that employ caching.
systems at the same time. (d) Distributes the load of looking up page owners.
(c) Two or more distributed memory pages are mapped onto the
same system.
(d) Bad message ordering makes it appear that data is shared when,
in reality, it is not.
Page 15 Page 16
The ring election algorithm works by: Which event is concurrent with the vector clock (2, 8, 4)?
(a) Having all nodes in a ring of processors send a message to a (a) (3, 9, 5)
coordinator who will elect the leader. (b) (3, 8, 4)
(b) Sending a token around a set of nodes. Whoever has the token (c) (1, 7, 3)
is the coordinator. (d) (4, 8, 2)
(c) Sending a message around all available nodes and choosing the
first one on the resultant list.
(d) Building a list of all live nodes and choosing the largest
numbered node in the list.
Page 17 Page 18
3
If a DES key is 56 bits, a triple-DES key is: Which statement about the Vigenère ciphers is not true?
(a) 56 bits (a) It is a block cipher that uses a secret key.
(b) 112 bits (b) It is a polyalphabetic substitution cipher.
(c) 144 bits (c) It is a collection of Cæsar ciphers.
(d) 224 bits (d) It attempts to be resilient to frequency analysis.
Page 19 Page 20
Exam 2
Spring 2008
Page 21 Page 22
The clock in the clock tower in the town of Chronos broke. It was The clock in the clock tower in the town of Chronos broke. It was
repaired but now the clock needs to be set. A train leaves for the repaired but now the clock needs to be set. A train leaves for the
nearest town, Temporis, 100 miles away. It returns 4½ hours later nearest town, Temporis, 100 miles away. It returns 4½ hours later
wth a report that the time according to the clock tower in wth a report that the time according to the clock tower in
Temporis is 4:05. Temporis is 4:05.
(a) To what value should the time be set on the (b) The maxiumum speed that the train can
clock tower? travel is 50 mph. What is the error of the
Cristian’s algorithm: Tserver + ½(round-trip delay)
clock?
Round-trip delay = 4:30 Best case: 100 miles @ 50 mph = 2 hours
4:05 + (4:30/2) = 4:05 + 2:15 = 6:20 Minimum time traveling: 4 hours
Uncertainty window: 4:30 - 4:00 = 30 min
Error = ±15 min
Page 23 Page 24
4
Event a has a Lamport timestamp of 4. Which event is concurrent with the vector
Event b has a Lamport timestamp of 8. timestamp (2, 4, 6) ?
What can we tell about events a and b ?
a) (3, 5, 7)
a) Events a and b are causally related. b) (1, 3, 5)
b) Events a and b are concurrent. c) (1, 4, 6)
c) Event a happened before event b. d) (1, 4, 7)
d) If events a and b are causally related, then
event a happened before event b.
Page 25 Page 26
A client has a time of 5:05 and a server has a Which offers the most fault-tolerant message
time of 5:25. Using the Berkeley algorithm, the delivery?
client’s clock will be set to:
Page 27 Page 28
a) All IP multicast packets use the same reserved 1110 XXXX Xxxx xxxx xxxx xxxx xxxx xxxx
ethernet address.
48-bit ethernet address: Multicast bit
b) ARP is also responsible for handling multicast
addresses. 0000 0001 0000 0000 0101 1110 0xxx xxxx xxxx xxxx xxxx xxxx
Page 29 Page 30
5
How does IP multicast achieve reliable packet A copyset is used:
delivery?
Page 31 Page 32
An ethernet card may support all of the If a frequency analysis of ciphertext reveals a
following mechanisms for multicast except: statistical equivalence to the corresponding
frequencies of plain English text, we can guess
a) Filtering packets based on a hash of the that the cipher is:
multicast address.
a) a monoalphabetic substitution cipher.
b) Searching through a small table for a
b) a polyalphabetic substitution cipher.
matching ethernet address.
c) a transposition cipher.
c) Searching through a larger table of ethernet
addresses in main memory. d) a rotor machine.
d) Accepting all multicast packets via multicast No substitution of characters takes place in
promiscuous mode. a transposition cipher. If the plaintext had
2,900 E’s and 310 Z’s, so will the ciphertext.
Page 33 Page 34
a) a monoalphabetic substitution cipher. a) an unwanted page being cached on another
b) a polyalphabetic substitution cipher. system
c) a transposition cipher. b) unrelated data being resident on the same
d) a one-time pad. page.
c) invalid data in the directory, leading the
system to falsely believe the page is shared.
d) two versions of the same page being present
on one system.
Page 35 Page 36
6
A bully election algorithm: Which mutual exclusion algorithm works wen the
membership of the group is unknown?
Page 37 Page 38
a. 6 d. 7
b. 7 e. 8
c. 6 f. 9
Page 41 Page 42
7
You have several computers cooperating on a parallel
11. Which set of events is concurrent (all events are
program. CPU 1 tries to write to page 302, which is
concurrent with each other)?
currently owned by CPU 0.
Explain the sequence of operations that takes place in a. (3, 1, 5, 7), (3, 2, 6, 7), (2, 1, 6, 8)
a DSM system. b. (2, 1, 3, 4), (2, 2, 3, 3), (3, 3, 2, 5)
c. (1, 2, 3, 4), (2, 3, 4, 5), (3, 4, 5, 6)
• CPU 1 attempts to write and get a page fault. d. (1, 5, 6, 7), (1, 4, 5, 7), (1, 3, 2, 2)
• Page fault handler contacts directory to find current owner of
page 302. If we do an element-by element comparison:
• CPU 1 fetches page from CPU 0 (CPU 0 sends page). (2, 1, 3, 4) is neither ≥ nor ≤ to (2,2,3,3)
• CPU 0 creates a free page frame and loads page 302 into it. 2=2; 1<2; 3=3, 4>3.
• CPU 0 adjusts PTE in MMU and restarts instruction. (2,2,3,3) is neither ≥ nor ≤ to (3,3,2,5)
• CPU 1 writes to page 302 successfully. 2<3; 2<3; 3>2; 3<5
Page 43 Page 44
13. A linear compensating function adjusts a clock to: 14. A client gets a timestamp of 4:12:30.500 from a
a. Tick at constantly decreasing or increasing time server. The elapsed time between the request
intervals until synchronization is achieved. and response was 20 msec (0.020 sec). The current
time on the client is 4:12:30.510. Using Cristian’s
b. Compensate for variations in a clock’s frequency algorithm, what is the time set to on the client?
to make it appear to tick at a constant rate.
a. 4:12:30.480
c. Tick at a constant faster or slower interval.
b. 4:12:30.490 Cristian’s algorithm sets the time
d. Compensate for sudden changes such as leap
seconds or daylight savings time. c. 4:12:30.510 to:
d. 4:12:30.520 server time + ½(elapsed time)
= 3:12:30.500 + 0.020/2
= 3:12:30.500 + 0.010
= 3:12:30.510
Page 45 Page 46
15. Which mutual exclusion algorithm is useful when the 16. How does IP multicast achieve reliable packet
membership of the group is unknown? delivery?
a. Centralized. a. It doesn’t.
b. Lamport’s. b. Via best-effort multicast.
c. Token ring. c. Via atomic multicast.
d. All of the above. d. Via IGMP (Internet Group Management Protocol).
Lamport’s requires reliable group multicast.
Token ring requires the ability to construct a logical
ring of processes based on the group.
Centralized doesn’t require you to know about any
other process.
Page 47 Page 48
8
17. A copyset is used:
a. In a DSM system that employs page caching.
b. In a DSM system as an alternative to page
caching.
c. To implement lazy release consistency.
d. To implement entry consistency. The End.
A copyset is nothing more than a list of processors
that have a copy of a particular shared memory page.
Page 49 Page 50