Homework 4 Coursera 07 PDF
Homework 4 Coursera 07 PDF
TOTAL POINTS 25
1. A Cassandra deployment with 6 (N1 through N6) nodes across three racks: N1 and 1 point
N6 are in rack 1; N2 and N5 in rack 2; N3 and N4 in rack 3. The Cassandra ring has
the nodes in the following clockwise order: N1, N2, N3, N4, N5, N6. The
NetworkTopologyStrategy is attempting to place 2 replicas of a given key. The first
replica is placed by the partitioner at N3. The second replica will be placed at node:
(1 point)
N5
N1
N2
N6
3. A Cassandra-like key-value store system uses write consistency level of size W 1 point
and read level of size R. There are N replicas of each key, and N is an even integer
that is large enough. You are told that to maintain the strong consistency needed
by your application, all conflicting writes must be detected by at least one replica
(i.e., any two sets of written replicas must overlap) and a read must return the value
of the latest acknowledged write (i.e., a read replica set must overlap with every
written replica set). Which of the following combinations does NOT maintain strong
consistency? (1 point)
W=N/2+1, R=N/2-1
W=N/2+2, R=N/2-1
W=N-1; R=2
W=N/2+1, R=N/2+1
4. A BASE system implements implies: (1 point) 1 point
Meaningful consistency
Eventual consistency
Sequential consistency
No consistency
If writes stop to a key, then all replicas of the key will eventually reflect the same
value
If reads stop to a key, then all replicas of the key will eventually reflect the same
value
HRegionServer
MemStore
Store
StoreFiles
8. Someone gives you an arbitrary run (execution) trace from a system that 1 point
implements eventual consistency. It is impossible that this run: (1 point)
Returns an answer for a read from a write which was acknowledged at a client after
the read result was received at the client
Returns an answer for a read from a write that was issued by a client after the read
was issued by the client
9. A system using Lamport timestamps executes the following run shown in below. 1 point
Initially, all four processes start with sequence numbers containing all zeros. An
arrow shows a message, and each darkened circle shows a process instruction.
In this run (execution), the total number of events summed across all processes
is:
25
10. A system using Lamport timestamps executes the following run shown in below. 1 point
Initially, all four processes start with sequence numbers containing all zeros. An
arrow shows a message, and each darkened circle shows a process instruction.
Answer the following question. (1 point)
The Lamport timestamp carried by the first message sent from P0 to P2 is:
11. A system using Lamport timestamps executes the following run shown in below. 1 point
Initially, all four processes start with sequence numbers containing all zeros. An
arrow shows a message, and each darkened circle shows a process instruction.
The Lamport timestamp carried by the first message sent from P0 to P2 is:
12. A system using Lamport timestamps executes the following run shown in below. 1 point
Initially, all four processes start with sequence numbers containing all zeros. An
arrow shows a message, and each darkened circle shows a process instruction.
13
13. A system using Lamport timestamps executes the following run shown in below. 1 point
Initially, all four processes start with sequence numbers containing all zeros. An
arrow shows a message, and each darkened circle shows a process instruction.
The process with the highest Lamport timestamp at the end of this run is:
P2
P0
P1
P3
14. A system using Lamport timestamps executes the following run shown in below. 1 point
Initially, all four processes start with sequence numbers containing all zeros. An
arrow shows a message, and each darkened circle shows a process instruction.
Answer the following question. (1 point)
15. A system using Lamport timestamps executes the following run shown in below. 1 point
Initially, all four processes start with sequence numbers containing all zeros. An
arrow shows a message, and each darkened circle shows a process instruction.
8, 12, 13
16. A system using vector timestamps executes the following run. Initially, all four 1 point
processes start with vectors containing all zeros, i.e., each process starts at
0,0,0,0. An arrow shows a message, and each darkened circle shows a process
instruction.
Answer the following question. Note: Please represent your vector timestamps as a
comma-separated list (without the brackets). (1 point)
5, 8, 6, 5
17. A system using vector timestamps executes the following run. Initially, all four 1 point
processes start with vectors containing all zeros, i.e., each process starts at
0,0,0,0. An arrow shows a message, and each darkened circle shows a process
instruction.
Answer the following question. Note: Please represent your vector timestamps as a
comma-separated list (without the brackets). (1 point)
1, 0, 4, 0
18. A system using vector timestamps executes the following run. Initially, all four 1 point
processes start with vectors containing all zeros, i.e., each process starts at
0,0,0,0. An arrow shows a message, and each darkened circle shows a process
instruction.
Answer the following question. Note: Please represent your vector timestamps as a
comma-separated list (without the brackets). (1 point)
4, 2, 9, 1
19. A system using vector timestamps executes the following run. Initially, all four 1 point
processes start with vectors containing all zeros, i.e., each process starts at
0,0,0,0. An arrow shows a message, and each darkened circle shows a process
instruction.
Answer the following question. Note: Please represent your vector timestamps as a
comma-separated list (without the brackets). (1 point)
7, 2, 8, 6
20. A system using vector timestamps executes the following run. Initially, all four 1 point
processes start with vectors containing all zeros, i.e., each process starts at
0,0,0,0. An arrow shows a message, and each darkened circle shows a process
instruction.
The number of events concurrent with the send event of the only message sent
from P1 to P2 is:
21. Your boss loves Bloom filters. To impress her, you start implementing one. Your 1 point
Bloom filter uses m=32 bits and 3 hash functions h1, h2, and h3, where hi(x) =
((x2 +x3)*i) mod m.
Starting from an empty Bloom filter, you’ve inserted the following two elements:
2010, 2013. Note the bits in the Bloom filter have positions numbered 0 through
31. At the end of these insertions, which of the following bits IS NOT set to 1?
24
10
16
12
22. Your boss loves Bloom filters. To impress her, you start implementing one. Your 1 point
Bloom filter uses m=32 bits and 3 hash functions h1, h2, and h3, where hi(x) =
((x2 +x3)*i) mod m.
10
24
23. Your boss loves Bloom filters. To impress her, you start implementing one. Your 1 point
Bloom filter uses m=32 bits and 3 hash functions h1, h2, and h3, where hi(x) =
((x2 +x3)*i) mod m.
Starting from an empty Bloom filter, you’ve inserted the following elements:
2013, 2010, 2007, 2004, 2001, 1998. If someone checks for membership of the
element 0, it will be found to be:
A false negative
24. Your boss loves Bloom filters. To impress her, you start implementing one. Your 1 point
Bloom filter uses m=32 bits and 3 hash functions h1, h2, and h3, where hi(x) =
((x2 +x3)*i) mod m.
Starting from an empty Bloom filter, you’ve inserted the following elements:
2013, 2010, 2007, 2004, 2001, 1998. If someone checks for membership of the
element 3200, it will be found to be:
A false negative
Not in the Bloom filter
25. Calibrations on a recent version of an operating system showed that on the client 1 point
side, there is a delay of at least 0.5 ms for a packet to get from an application to the
network interface and a delay of 1.4 ms for the opposite path (network interface to
application buffer). The corresponding minimum delays for the server are 0.20 ms
and 0.30 ms, respectively.
What would be the accuracy of a run of the Cristian's algorithm between a client
and server, both running this version of Linux, if the round trip time measured at
the client is 6.6 ms?
0.2 ms
0.3 ms
4.2 ms
2.1 ms
I understand that submitting work that isn’t my own may result in permanent failure of this course or
deactivation of my Coursera account.
Learn more about Coursera’s Honor Code