MASSACHUSETTS INSTITUTE OF TECHNOLOGY Computer Systems Engineering: Spring Quiz 2

Similar documents
MASSACHUSETTS INSTITUTE OF TECHNOLOGY Computer Systems Engineering: Spring Quiz 2 Solutions

6.033 Computer Systems Engineering: Spring Quiz II THIS IS AN OPEN BOOK, OPEN NOTES QUIZ. NO PHONES, NO COMPUTERS, NO LAPTOPS, NO PDAS, ETC.

6.033 Computer System Engineering

Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY Spring Quiz III

Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY Computer Systems Engineering: Spring 2007

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Computer Systems Engineering: Spring Quiz I

Carnegie Mellon Computer Science Department Spring 2015 Midterm Exam

6.824 Distributed System Engineering: Spring Quiz I Solutions

Carnegie Mellon Computer Science Department Spring 2016 Midterm Exam

MASSACHUSETTS INSTITUTE OF TECHNOLOGY

Networked Systems (SAMPLE QUESTIONS), COMPGZ01, May 2016

MASSACHUSETTS INSTITUTE OF TECHNOLOGY

6.033 Computer Systems Engineering: Spring Quiz I THIS IS AN OPEN BOOK, OPEN NOTES QUIZ. NO PHONES, NO COMPUTERS, NO LAPTOPS, NO PDAS, ETC.

6.033 Spring 2015 Lecture #11: Transport Layer Congestion Control Hari Balakrishnan Scribed by Qian Long

THIS IS AN OPEN BOOK, OPEN NOTES QUIZ.

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Computer Systems Engineering: Spring Quiz I

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Database Systems: Fall 2008 Quiz II

UNIT IV -- TRANSPORT LAYER

CS 344/444 Computer Network Fundamentals Final Exam Solutions Spring 2007

Question A B C D E F Points / 28 / 16 / 21 / 15 / 18 / 2

CS268: Beyond TCP Congestion Control

2.993: Principles of Internet Computing Quiz 1. Network

CSCI 1680 Computer Networks Fonseca. Exam - Midterm. Due: 11:50am, 15 Mar Closed Book. Maximum points: 100

Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY Fall Quiz I

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Fall Quiz I

CS122 Lecture 15 Winter Term,

CS244 Advanced Topics in Computer Networks Midterm Exam Monday, May 2, 2016 OPEN BOOK, OPEN NOTES, INTERNET OFF

ECE4110, Internetwork Programming, QUIZ 2 - PRACTICE Spring 2006

Computer Networks - Midterm

This appendix contains supplementary Border Gateway Protocol (BGP) information and covers the following topics:

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 21: Network Protocols (and 2 Phase Commit)

Lecture 14: Congestion Control"

CS 556 Advanced Computer Networks Spring Solutions to Midterm Test March 10, YOUR NAME: Abraham MATTA

Question Points Score total 100

Final Exam April 28, 2010.

Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY Fall Quiz II

Bandwidth Allocation & TCP

CS244a: An Introduction to Computer Networks

DEPARTMENT OF EECS MASSACHUSETTS INSTITUTE OF TECHNOLOGY Fall Quiz III. December 18, 2012

Routing, Routing Algorithms & Protocols

We will discuss about three different static routing algorithms 1. Shortest Path Routing 2. Flooding 3. Flow Based Routing

Lecture 4: Intradomain Routing. CS 598: Advanced Internetworking Matthew Caesar February 1, 2011

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Spring Quiz II Solutions. q2 Grades Mean: 72.48, Median: 74.00, StDev: 14.

UNIVERSITY OF OSLO. Faculty of mathematics and natural sciences. INF3190/INF4190 Data Communications. All printed and written material, calculator

Computer Networks. Course Reference Model. Topic. Congestion What s the hold up? Nature of Congestion. Nature of Congestion 1/5/2015.

vines access-group vines access-group access-list-number no vines access-group access-list-number Syntax Description

Lecture 13: Traffic Engineering

Inter-Domain Routing: BGP

6.033 Computer System Engineering

6.033 Lecture Logging April 8, saw transactions, which are a powerful way to ensure atomicity

Database Management System Prof. D. Janakiram Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No.

CS 138: Communication I. CS 138 V 1 Copyright 2012 Thomas W. Doeppner. All rights reserved.

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Sciences

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Database Systems: Fall 2015 Quiz I

William Stallings Data and Computer Communications. Chapter 10 Packet Switching

Advanced Network Design

Distributed Systems

Transport Layer (Congestion Control)

Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY Fall Quiz II

Next Steps Spring 2011 Lecture #18. Multi-hop Networks. Network Reliability. Have: digital point-to-point. Want: many interconnected points

CS244a: An Introduction to Computer Networks

Routing on the Internet. Routing on the Internet. Hierarchical Routing. Computer Networks. Lecture 17: Inter-domain Routing and BGP

CSCI 466 Midterm Networks Fall 2011

6.033 Computer Systems Engineering: Spring Handout 13 - Quiz I THIS IS AN OPEN BOOK, OPEN NOTES QUIZ. NO PHONES, NO LAPTOP, NO PDAS, ETC.

Midterm #2 Exam April 26, 2006 CS162 Operating Systems

Computer Science 461 Midterm Exam March 14, :00-10:50am

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Database Systems: Fall 2008 Quiz I

Network Protocols. Sarah Diesburg Operating Systems CS 3430

CS244a: An Introduction to Computer Networks

Congestion. Can t sustain input rate > output rate Issues: - Avoid congestion - Control congestion - Prioritize who gets limited resources

CS644 Advanced Networks

Overview. TCP & router queuing Computer Networking. TCP details. Workloads. TCP Performance. TCP Performance. Lecture 10 TCP & Routers

Midterm II December 4 th, 2006 CS162: Operating Systems and Systems Programming

Current Topics in OS Research. So, what s hot?

Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY Spring Quiz III

EE122 MIDTERM EXAM: Scott Shenker, Ion Stoica

Important Lessons From Last Lecture Computer Networking. Outline. Routing Review. Routing hierarchy. Internet structure. External BGP (E-BGP)

CSC 261/461 Database Systems Lecture 20. Spring 2017 MW 3:25 pm 4:40 pm January 18 May 3 Dewey 1101

Recoverability. Kathleen Durant PhD CS3200

CS244a: An Introduction to Computer Networks

CS 5520/ECE 5590NA: Network Architecture I Spring Lecture 13: UDP and TCP

Computer Networks. Routing

Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY Fall Quiz II

CS144: Intro to Computer Networks Homework 1 Scan and submit your solution online. Due Friday January 30, 4pm

Configuring Banyan VINES

BGP Routing and BGP Policy. BGP Routing. Agenda. BGP Routing Information Base. L47 - BGP Routing. L47 - BGP Routing

P2P Applications. Reti di Elaboratori Corso di Laurea in Informatica Università degli Studi di Roma La Sapienza Canale A-L Prof.ssa Chiara Petrioli

Introduction to IP Routing. Geoff Huston

Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY Fall Quiz I

cs/ee 143 Communication Networks

The Case for Separating Routing from Routers

EE122 Spring 2001 Final

Homework 2: IP Due: 11:59 PM, Oct 20, 2016

BGP Case Studies. ISP Workshops

Networking: Network layer

Routing in packet-switching networks

CS 421: COMPUTER NETWORKS SPRING FINAL May 16, minutes

Accurate study guides, High passing rate! IT TEST BOOK QUESTION & ANSWER. Ittestbook provides update free of charge in one year!

Lecture 14: Congestion Control"

6.033 Spring 2004, Quiz 1 Page 1 of Computer Systems Engineering: Spring Quiz I

Transcription:

Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.033 Computer Systems Engineering: Spring 2011 Quiz 2 There are 11 questions and 8 pages in this quiz booklet. Answer each question according to the instructions given. You have 50 minutes to answer the questions. Some questions are harder than others and some questions earn more points than others you may want to skim all questions before starting. For true/false questions, you will receive 0 points for no answer, and negative points for an incorrect answer. Do not guess; if you are unsure about your answer, consult your notes. The total score for each numbered question (1 through 11) will be at least 0 (i.e., those scores cannot go negative). If you find a question ambiguous, be sure to write down any assumptions you make. Be neat and legible. If we can t understand your answer, we can t give you credit! Write your name in the space below. Write your initials at the bottom of each page. THIS IS AN OPEN BOOK, OPEN NOTES, OPEN LAPTOP QUIZ, BUT DON T USE YOUR LAPTOP FOR COMMUNICATION WITH OTHERS. CIRCLE your recitation section number: 10:00 1. Lampson/Pesterev 11:00 2. Lampson/Pesterev 3. Ports/Mutiso 12:00 4. Ports/Mutiso 1:00 5. Katabi/Raza 6. Strauss/Narula 2:00 7. Katabi/Raza 8. Strauss/Narula Do not write in the boxes below 1-2 (xx/20) 3-4 (xx/20) 5-6 (xx/20) 7-9 (xx/20) 10-11 (xx/20) Total (xx/100) Name:

6.033 Spring 2011, Quiz 2 Page 2 of 8 I Reading Questions 1. [10 points]: Based on the paper Do incentives build robustness in BitTorrent?, which of the following statements are correct? A. True / False A reference BitTorrent client will attempt to split its outgoing bandwidth equally between every peer it can connect to. B. True / False BitTorrent permits content providers to shift bandwidth costs from their own ISP to those paid for by their content consumers. C. True / False The torrent file that a BitTorrent client downloads before joining a swarm contains the IP addresses of the seed nodes. D. True / False The BitTyrant client uses unequal outgoing bandwidth allocations as one strategy to improve its download performance. 2. [10 points]: Based on the paper A case for redundant arrays of inexpensive disks (RAID) which of the following statements are correct? A. True / False A RAID array can improve reliability when individual disks fail independently from each other, but is less useful in the face of highly correlated failures. B. True / False The RAID paper predicted that disk seek times would improve at an annual rate similar to improvements seen in transistor density in microprocessors. C. True / False If average disk capacities grow proportionally faster over time than sequential data transfer rates between disks and disk controllers, the MTTR (mean time to repair) of a RAID array will decrease. D. True / False If solid-state disks entirely replace spinning magnetic disks, none of the approaches described in the RAID paper will be needed anymore, since SSDs do not need to seek between different portions of the disk.

6.033 Spring 2011, Quiz 2 Page 3 of 8 II Border Gateway Protocol (BGP) These questions are based on reading An Introduction to Wide-Area Internet Routing. 3. [10 points]: Ben Bitdiddle was asked to debug a BGP problem. Help Ben to brush up his information about BGP. Which of the following statements are correct? A. True / False To make money, an AS should announce the AS routes it learned from its customers to its peers. B. True / False To make money, an AS should not announce the AS routes it learned from its peers to its provider. C. True / False In BGP, an AS may learn many AS routes to an IP prefix. D. True / False In BGP, the customer-provider relationships imply that if an AS has announced a route for a particular prefix to a neighbor, and later it learned a new route to that prefix, the AS will announce the new route to the neighbor. Sprint / \ MIT AS AS1 \ AS2 \... \ AS10 \ AS EVIL 4. [10 points]: Consider the topology shown above. For any link, assume the higher node is a provider and the lower is a customer. MIT advertises prefix 18.* to Sprint. How can AS EVIL hijack most traffic destined to MIT from Sprint? (Describe briefly.)

6.033 Spring 2011, Quiz 2 Page 4 of 8 III Congestion control Capacity: Buffer: Source 100 pkt/s 100 pkt Capacity: Router 10 pkt/s Destination One-way delay: One-way delay: 0.1 s 1s Consider the above topology and assume the following: Link between Source and Router has a capacity of 100 packets/second and a propagation delay of 0.1 second in the forward direction. Link between Router and Destination has a capacity of 10 packets per-second and a propagation delay of 1 second in the forward direction. The transmission delays are 0. Acknowledgments from the destination to the source are delivered on a different path which has infinite capacity and zero delay, i.e., this means that acknowledgments will be delivered immediately from the destination to the source and will not suffer any drops. The Source and Destination can process packets very fast and the destination does not have any buffering limitations. The Router has a queue that can store a maximum of 100 packets. 5. [10 points]: Assume the Source uses a fixed window whose size is set to W. What is the maximum throughput in packet/sec that the source can deliver to its destination, if W=5, and then if W=20? (You can round your answer to the nearest integer.) W = 5: pkt/s W = 20: pkt/s 6. [10 points]: Assume that the source uses TCP. Focus on how TCP adapts its congestion window using AIMD as described in class. Ignore other details of TCP (e.g., slow start, fast retransmission and fast recovery). What is the maximum window size that the source s TCP will experience during AIMD? Maximum window size: packets

6.033 Spring 2011, Quiz 2 Page 5 of 8 IV File reconciliation and time vectors Ben designs a new tool for reconciling copies of a file on different computers. The scenario is a single user who has a number of computers, each of which may have a copy of a file f, and the user updates the copies of f independently from each other. For example, when the user is on an airplane, he can update only the copy on his laptop, and when the user gets to his office but forgets his laptop at home, he can update only the copy on his office machine. Ben s goal is that the different copies of f should behave as if there is a single copy of f. To develop a design, he considers two update and reconciliation patterns. The first pattern for file f is as follows: t1 t2 t3 t4 t5 w(1) H1 H2 w(2) H3 It shows 3 hosts: H1, H2, and H3. H1 writes (w) the value 1 to the file f, and then reconciles to H2 (i.e., changes on H1 are propagated to H2 and reconciled with changes on H2). Later H2 writes 2 to the file f and H1 reconciles to H3. Then, H3 reconciles to H2. To make it easy to talk about the different events, we have labeled them with real times t1 through t5, but you should assume that the clocks of the different computers are not synchronized and the computers have no agreement on this global time. 7. [5 points]: For the ideal outcome (i.e., f should behave as if there is a single copy), what value should f contain at H1, H2, and H3 after the above update and reconciliation pattern completes (i.e., at the end of t5)? A. True / False H1: 1, H2: 2, H3: 2 B. True / False H1: 1, H2: 2, H3: 1

6.033 Spring 2011, Quiz 2 Page 6 of 8 After reading the Unison paper, Ben realizes that it isn t always possible to come to agreement between nodes what the value of f should be. Consider the following second pattern: t1 t2 t3 t4 t5 w(1) H1 w(2) H2 w(0) H1 writes 1 into f and reconciles to H2. Then, H1 and H2 modify f in different ways, and then H2 reconciles to H1 at t5. At t5, H1 and H2 have a conflict because there is no way to order the updates at H1 and H2 at t3 and t4 that is consistent with what could have happened with a single copy of f. A user needs to get involved to determine what the right value is. Ben s goal is to design a tool that reconciles updates to a file f correctly when it is possible, but raises a conflict when it is not possible. His design is based on time vectors (introduced in the lecture on time, but you don t need to recall the lecture to be able to answer this question). A time vector is a vector of integers, where entry i counts the updates to f on computer i. For example, the vector (0, 0) on host 2 signals that it hasn t seen updates for f from H1, and that H2 itself hasn t done any updates either. 8. [10 points]: For the pattern above (the second pattern), what is the value of the time vector for f at each node at the end of t1 through t4? (complete the table) time H1 H2 t1 (1, 0) (0, 0) t2 t3 t4 9. [5 points]: How can Ben s design detect that pattern 2 is a conflict? Be specific, explain using the time vectors in the examples above.

6.033 Spring 2011, Quiz 2 Page 7 of 8 V Write-Ahead Logging Ben hasn t solved enough problems in the last hour. Inspired by the lectures on atomicity and hands-on #5, he decides to build a database system for his bank. The database is a simple one: its cell storage is a table of account numbers and balances stored on disk, and it has only one operation: credit(account, delta) adjusts the balance of the specified account by the (possibly negative) amount delta. Ben wants the database to support atomic transactions, so he adds the usual begin and commit operations, and stores a log on a separate disk. The operations are implemented as follows: begin appends a BEGIN, transactionid record to the log. credit(account, delta) updates the balance of the appropriate account in memory, but does not write the new balance to cell storage. It also appends to the log the record: UPDATE, transactionid, account, delta, oldbalance, newbalance commit first appends to the log OUTCOME COMMITTED, transactionid. It then writes out to cell storage any account balances modified by the transaction. When this is done, it appends to the log END, transactionid Ben knows that this protocol can support all-or-nothing atomicity across system crashes. He sketches a recovery procedure. After a crash, the system will scan the log and redo the effects of any transaction that logged an OUTCOME COMMITTED record but not an END record. But rather than implementing the recovery procedure, he puts the system into production immediately. After all, Worse Is Better, and he can always write that recovery procedure later... Inevitably, Ben s system crashes before he gets around to writing that recovery procedure. The bank s customers are not amused. Panicked, Ben turns to you to help him recover the state of his database.

6.033 Spring 2011, Quiz 2 Page 8 of 8 The cell storage of the database at the time of the crash, and the last few entries of the log appear below. All earlier entries in the log correspond to transactions known to have completed in their entirety. Cell Storage AccountID Balance account1 $890 account2 $648 account3 $32 account4 $1500 Log BEGIN, T 1 UPDATE, T 1, account2, 200, 448, 648 OUTCOME COMMITTED, T 1 END, T 1 BEGIN, T 2 BEGIN, T 3 UPDATE, T 3, account1, 500, 390, 890 UPDATE, T 3, account4, 500, 1500, 1000 UPDATE, T 2, account3, 100, 32, 132 OUTCOME COMMITTED, T 3 10. [10 points]: Fill in the values that will appear in the cell storage once recovery is completed using Ben s intended recovery scheme: AccountID account1 account2 account3 account4 Balance 11. [10 points]: Ben is worried that the write-ahead log will take up too much space. Given Ben s recovery procedure, which of the following options would reduce the size of the log, while still being able to persistently store data, and recover from crashes with all-or-nothing atomicity? A. True / False eliminating the BEGIN record. B. True / False removing both the oldbalance and delta fields from the UPDATE record C. True / False removing both the oldbalance and newbalance fields from the UPDATE record D. True / False periodically writing a CHECKPOINT record to the log which contains the ID of each uncommitted transaction, then discarding all log entries before the CHECKPOINT record. End of Quiz I Please double check that you wrote your name on the front of the quiz, and circled your recitation section number.