Test_2 Flashcards
- [SEE QUESTION] a.(2 points) E1 and E6?
Transitively E1 happened before E6. P1 send message to P2 at E3. The corresponding receipt is E6 msg-received from E1.
- [SEE QUESTION] (b) (2 points) E4 and E6?
Concurrent, e4 is a local event so it happened after e3 but we don’t know if e6 happened before e4 because we don’t know what time P2 received the message sent in e3.
- [SEE QUESTION] (c) (2 points) E6 and E8?
E6 happened before E8, since both the events belong to same program and are executed sequentially.
- [SEE QUESTION] (d) (2 points) E3 and E10?
E3 happened before E10. E3-> E6 -> E8 -> E9 -> E10.
PIAZZA: E3 happened before E10. E3 happened before E6 (communication pair), E6 happened before E9 (Same Process), and E9 happened before E10 (communication pair). Therefore, by the transitive property, E3 happened before E10.
- [SEE QUESTION] (e) (2 points) E5 and E10?
PIAZZA: E5 and E10 are Concurrent Events - they’re separate events occurring in different processes that are not part of a communication pair and do not have a transitive relationship.
- [SEE QUESTION] (a) What additional machinery would you need to make sure the algorithm will work correctly if the first assumption is relaxed?
From Spring 2020 Final:
- Every node maintains a distinct sequence number for each peer
- Sending a message will include the relevant sequence number for that peer, in addition the current information (lock requested, timestamp). After sending a message, the sequence number is incremented
- When receiving a message, if sequence number is one greater than the previous message then the message is in order and can be processed. Otherwise the message is out of order and must be buffered locally until the earlier message(s) arrive.
- [SEE QUESTION] (b) What additional machinery would you need to make sure the algorithm will work correctly if the second assumption is relaxed?
- Include sequence number machinery above as a starting point
- Introduce network packet acknowledgment (different from the normal ACK for Lamport’s M.E) mechanism similar to that which is seen in TCP
- When receiving a packet:
- If the message has not been seen before (determined from the sequence number) process the packet.
- If it’s a duplicate message (perhaps the previous network ack was lost so the sender retransmitted), just drop the packet
- In either case, send a network ack
- When sending a packet:
- buffer the message until a network ack is received for the packet
- Retransmit the message if no network ack received within a timeout period, which could indicate a lost message
- Even if this ends up sending a duplicate message, the sequence number uniquely identifies it and the receiver will ignore the duplicate
- [SEE QUESTION] (10 points, 7 mins) (Latency Reduction in RPC)
- the client stub stays in the user space.
- keep a structured mechanism for the stub to communicate its arguments into the kernel without copying them in - a shared descriptor
- the scatter/gather DMA controller can read this shared descriptor directly without any copying of data EXCEPT the (unavoidable) copy the DMA controller itself makes when it reads the arguments from the memory locations, put the information in a network packet and sends it over the wire.
- (10 points, 7 minutes) (Active Networks)
One could argue that Software Defined Networking (SDN) is “old wine in a new bottle”.
(a) Justify this argument with a few concise bullets.
SDN has become the reincarnation of Active Networks by taking the motivations, research, and techniques for Active networks and applied it to a new “killer-app” environment, data-center networks.
Specifically it contributed the following key 3 ideas:
- Programmable functions in the network to lower the barrier to innovation
- Network virtualization, and the ability to demultiplex to software programs based on packet headers.
- The vision of a unified architecture for middlebox orchestration.
- (10 points, 7 minutes) (Active Networks)
One could argue that Software Defined Networking (SDN) is “old wine in a new bottle”.
(b) With a few concise bullets, summarize the social and technology enablers that has made this wine drinkable now.
- The rise of cloud computing, which promotes the idea of utility computing wherein multiple tenants/businesses can host portions of their corporate network simultaneously on the same computing resources using the safe isolation of network traffic provided by SDN.
- The isolation of networking traffic is provided by virtualization of the network, allowing for a level of abstraction that also eases management of the network hardware.
- Chipsets are now available for building your own router to enable the creation of a SDN and avoiding lockin to router vendors who were loath to allowing Active Networking or SDN.
- [SEE QUESTION] (5 points, 3 minutes) (Ensemble/Nuprl)
No, this is not a contradiction:
- The Ensemble system was built over three design stages: specification, configuration (coding), and optimization
- OCaml was selected for the configuration (code) stage because of its support for precise formal semantics and ability to be compiled to efficient machine code
- The quality-of-life features of OCaml (garbage collection, easy marshalling and unmarshalling of data structures) also led to a faster development cycle and a smaller code base
- The optimization stage of Ensemble’s development circumvented the performance penalties of these features, but did not invalidate their use
- Optimization tools like Nuprl can take existing code and make it faster, but they cannot create the initial code itself
- [SEE QUESTION] (5 points, 3 minutes) (Spring Kernel)
To optimize this, the client-stub subcontractor can first check to see the location of the server. If the client and server are actually co-located on the same node (i.e. they’re both on the same machine) then the data can be marshalled into a shared memory space that the server can access directly, without the data needing to be transmitted at all.
- [SEE QUESTION] (5 points, 3 minutes) (EJB)
(a) What functionalities would you put into the Web container (that interfaces with the client browsers)?
From Fall 2020 Exam #2:
Functionalities to put in the Web container:
i. Servlet which corresponds to a session
ii. Presentation logic for each servlet
iii. NOT the business logic so that it won’t be exposed
- [SEE QUESTION] (5 points, 3 minutes) (EJB)
(b) What functionalities would you put into the EJB container?
From Fall 2020 Exam #2:
i. A session façade that corresponds to each servlet in the web container
ii. The business logic layer associated with each session façade
iii. Entity beans which are the data access objects serving as an interface for the business logic layer to access the database
iv. With this design, the business logic is not exposed and also parallelism across independent client requests and within the client requests can be exploited through the entity beans.
- [SEE QUESTION] (15 points, 10 minutes) (GMS)
a) (5 points
- In the default implementation, only copies of clean pages are placed in cluster memory with GMS, so if node n2 shuts down the page can be retrieved again from disk. It will be in disk because GMS writes dirty pages to disk before bringing them into global memory (So before writing N2, page X is updated on the disk)
- If a dirty node were paged out, any changes would be lost when N2 went down, and N1 would need to fetch the outdated copy from disk. This data loss is why GMS does not store dirty pages. It does, however, offer performance advantages to make this change. Maybe it is replicated on other nodes?