Cloud Computing Concepts Part 1 | Week 4

                     

Quiz 1: Homework 4

Q1. A Cassandra deployment with 6 (N1 through N6) nodes across three racks: N1 and 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: ( )

  • N4
  • N5
  • N1
  • N3

Q2. A Cassandra deployment uses the RackInferringSnitch. Two addresses 1.2.3.4 and 1.2.4.5: ( )

  • None of these options
  • Are the same machine
  • Belong to the same datacenter but different racks
  • Belong to different datacenters

Q3. A Cassandra-like key-value store system uses write consistency level of size W 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? ( )

  • W=N/2+1, R=N/2+1
  • W=N/2+1, R=N/2-1
  • W=N/2+2, R=N/2-1
  • W=N-1; R=2

Q4. A BASE system implements implies: ( )

  • Sequential consistency
  • No consistency
  • Meaningful consistency
  • Eventual consistency

Q5. Eventual consistency does imply: ( )

  • The set of replicas is always trying to catch up and converge to the latest writes
  • All replicas of a key will reflect the same value within a time bound
  • A read will be answered eventually
  • A read from a client will return the latest written value by that client

Q6. In HBase, in order to guarantee that updates are not lost due to a crash, which of the following needs to be written before an update is added to MemStore? ( )

  • Store
  • MemStore
  • StoreFiles
  • HLog

Q7. In Cassandra, when a write comes in at a replica, it is immediately: ( )

  • Stored in memory into a Memtable
  • Stored in memory into an SSTable
  • Stored on disk into an SSTable
  • Used to directly update the key-value pair, as expected

Q8. Someone gives you an arbitrary run (execution) trace from a system that implements BASE. It is possible that this run: ( )

  • Satisfies sequential consistency
  • Satisfies per-key sequential consistency
  • All of these options are correct
  • Returns a value/ack for every write and read operation issued during the run

Q9. A system using Lamport timestamps executes the following run shown in below. Initially, all four processes start with sequence numbers containing all zeros. An arrow shows a message, and each darkened circle shows a process instruction. ngcb33

Answer the following question.

  • In this run (execution), the total number of events summed across all processes is:

A system using Lamport timestamps executes the following run shown in below. Initially, all four processes start with sequence numbers containing all zeros. An arrow shows a message, and each darkened circle shows a process instruction

Cloud Computing Concepts Part 1 | Week 3

Q10. A system using Lamport timestamps executes the following run shown in below. Initially, all four processes start with sequence numbers containing all zeros. An arrow shows a message, and each darkened circle shows a process instruction.

Lamport timestamps1  Cloud Computing Concepts Part 1 | Week 3

Answer the following question. (1 point)

  • The Lamport timestamp of the only process instruction at P3 is:

A system using Lamport timestamps executes the following run shown in below. Initially, all four processes start with sequence numbers containing all zeros. An arrow shows a message, and each darkened circle shows a process instruction

Q11. A system using Lamport timestamps executes the following run shown in below. Initially, all four processes start with sequence numbers containing all zeros. An arrow shows a message, and each darkened circle shows a process instruction.

Lamport timestamps2  Cloud Computing Concepts Part 1 | Week 3

Answer the following question.

  • The Lamport timestamp of the only process instruction at P3 is:

A system using Lamport timestamps executes the following run shown in below. Initially, all four processes start with sequence numbers containing all zeros. An arrow shows a message, and each darkened circle shows a process instruction

Q12. A system using Lamport timestamps executes the following run shown in below. Initially, all four processes start with sequence numbers containing all zeros. An arrow shows a message, and each darkened circle shows a process instruction. Lamport timestamps2

Answer the following question.

  • The ending Lamport timestamp at process P1 is:

A system using Lamport timestamps executes the following run shown in below. Initially, all four processes start with sequence numbers containing all zeros. An arrow shows a message, and each darkened circle shows a process instruction

Q13. A system using Lamport timestamps executes the following run shown in below. Initially, all four processes start with sequence numbers containing all zeros. An arrow shows a message, and each darkened circle shows a process instruction. ngcb33

Answer the following question.

  • The process with the highest Lamport timestamp at the end of this run is:
  • P1
  • P0
  • P3
  • P2

Q14. A system using Lamport timestamps executes the following run shown in below. Initially, all four processes start with sequence numbers containing all zeros. An arrow shows a message, and each darkened circle shows a process instruction. Lamport timestamps2

Answer the following question.

  • The number of events with a Lamport timestamp of 9 is:

A system using Lamport timestamps executes the following run shown in below. Initially, all four processes start with sequence numbers containing all zeros. An arrow shows a message, and each darkened circle shows a process instruction

Q15. A system using Lamport timestamps executes the following run shown in below. Initially, all four processes start with sequence numbers containing all zeros. An arrow shows a message, and each darkened circle shows a process instruction. ngcb33

Answer the following question.

  • The comma-separated list of Lamport timestamps to the last 3 events at P3 is:

Please ensure you enter answers in increasing order of integers.

A system using Lamport timestamps executes the following run shown in below. Initially, all four processes start with sequence numbers containing all zeros. An arrow shows a message, and each darkened circle shows a process instruction

Cloud Computing Concepts Part 1 | Week 3

Q16. A system using vector timestamps executes the following run. Initially, all four 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.

Cloud Computing Concepts Part 1 | Week 3

Answer the following question. Note: Please represent your vector timestamps as a comma-separated list (without the brackets).

  • The ending vector timestamp at P1 is:

A system using Lamport timestamps executes the following run shown in below. Initially, all four processes start with sequence numbers containing all zeros. An arrow shows a message, and each darkened circle shows a process instruction

Q17. A system using vector timestamps executes the following run. Initially, all four 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.ngcb33

Answer the following question. Note: Please represent your vector timestamps as a comma-separated list (without the brackets).

  • The vector timestamp of the only process instruction at P3 is

A system using Lamport timestamps executes the following run shown in below. Initially, all four processes start with sequence numbers containing all zeros. An arrow shows a message, and each darkened circle shows a process instruction

Q18. A system using vector timestamps executes the following run. Initially, all four 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.ngcb33

Answer the following question. Note: Please represent your vector timestamps as a comma-separated list (without the brackets).

  • The receipt vector timestamp of the last message received at P2 is:

A system using Lamport timestamps executes the following run shown in below. Initially, all four processes start with sequence numbers containing all zeros. An arrow shows a message, and each darkened circle shows a process instruction

Q19. A system using vector timestamps executes the following run. Initially, all four 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.ngcb33

Answer the following question. Note: Please represent your vector timestamps as a comma-separated list (without the brackets).

  • The receipt timestamp of the last message received at P1 is:

A system using Lamport timestamps executes the following run shown in below. Initially, all four processes start with sequence numbers containing all zeros. An arrow shows a message, and each darkened circle shows a process instruction

Q20. A system using vector timestamps executes the following run. Initially, all four 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. Lamport timestamps3

Answer the following question.

A system using Lamport timestamps executes the following run shown in below. Initially, all four processes start with sequence numbers containing all zeros. An arrow shows a message, and each darkened circle shows a process instruction

Q21. Your boss loves Bloom filters. To impress her, you start implementing one. Your Bloom filter uses m=32 bits and 3 hash functions h1, h2, and h3, where hi(x) = ((x2 +x3)*i) mod m.

In this case, answer the following question.

  • Starting from an empty Bloom filter, you’ve inserted the following three elements: 2013, 2010, 2007. Note the bits in the Bloom filter have positions numbered 0 through 31. At the end of these insertions, the positions of the bits that are set, in a comma-separated list are:

Please ensure you enter answers in increasing order of integers.

A system using Lamport timestamps executes the following run shown in below. Initially, all four processes start with sequence numbers containing all zeros. An arrow shows a message, and each darkened circle shows a process instruction

Q22. Your boss loves Bloom filters. To impress her, you start implementing one. Your Bloom filter uses m=32 bits and 3 hash functions h1, h2, and h3, where hi(x) = ((x2 +x3)*i) mod m.

In this case, answer the following  . ( )

  • Starting from an empty Bloom filter, you’ve inserted the following three elements: 2010, 2013, 2007. Now some bits are set. Now, you insert the fourth element 2004. Note the bits in the Bloom filter have positions numbered 0 through 31. The bits whose values will change when the fourth element 2004 is inserted INCLUDE:
  • 8
  • 0
  • 28
  • 24

Q23. Your boss loves Bloom filters. To impress her, you start implementing one. Your Bloom filter uses m=32 bits and 3 hash functions h1, h2, and h3, where hi(x) = ((x2 +x3)*i) mod m.

In this case, answer the following  . ( )

  • Starting from an empty Bloom filter, you’ve inserted the following elements: 2010, 2013, 2007, 2004. If someone checks for membership of the element 2004, it will be found to be:
  • Indeterminate since it was never inserted into the Bloom filter
  • In the Bloom filter and not a false positive
  • A false negative
  • In the Bloom filter and hence a false positive

Q24. Your boss loves Bloom filters. To impress her, you start implementing one. Your Bloom filter uses m=32 bits and 3 hash functions h1, h2, and h3, where hi(x) = ((x2 +x3)*i) mod m.

In this case, answer the following  . ( )

  • Starting from an empty Bloom filter, you’ve inserted the following four elements: 2010, 2013, 2007, 2004. If someone checks for membership of the element 3200, it will be found to be:
  • In the Bloom filter and hence a false positive
  • Not in the Bloom filter
  • In the Bloom filter and not a false positive
  • Indeterminate since it was never inserted into the Bloom filter

Q25. Calibrations on a recent version of an operating system showed that on the client 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?

  • 2.1 ms
  • 0.3 ms
  • 4.2 ms
  • 2.4 ms

Cloud Computing Concepts Part 1 | Week 3

Check all from Cloud computing concepts here https://progies.in/answers/summer-training-2022/cloud-computing-concepts-part-1


* The material and content uploaded on this website are for general information and reference purposes only. Please do it by your own first. COPYING MATERIALS IS STRICTLY PROHIBITED.


More from PROGIEZ