CS 118 Homework 3

$30.00

Category:

Description

5/5 - (4 votes)

Problem 1
Consider a DASH system for which there are N video versions (at N different rates and qualities) and N
audio versions (at N different rates and qualities). Suppose we want to allow the player to choose at any
time any of the N video versions and any of the N audio versions.
(a) If we create files so that the audio is mixed in with the video, so server sends only one media stream
at given time, how many files will the server need to store (Each a different URL)?
(b) If the server instead sends the audio and video streams separately and has the client synchronize the
streams, how many files will the server need to store?
Write your solution to Problem 1 in this box
Problem 2
Suppose you have a new computer just set up. dig is one of the most useful DNS lookup tool. You can
check out the manual of dig at http://linux.die.net/man/1/dig. A typical invocation of dig looks like:
dig @server name type.
Suppose that on April 19, 2018 at 15:35:21, you have issued “dig google.com A” to get an IPv4 address
for google.com domain from your caching resolver and got the following result:
; <<>> DiG 9.8.3-P1 <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17779 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 4 ;; QUESTION SECTION: ;google.com. IN A ;; ANSWER SECTION: google.com. 239 IN A 172.217.4.142 ;; AUTHORITY SECTION: google.com. 55414 IN NS ns4.google.com. google.com. 55414 IN NS ns2.google.com. google.com. 55414 IN NS ns1.google.com. google.com. 55414 IN NS ns3.google.com. ;; ADDITIONAL SECTION: ns1.google.com. 145521 IN A 216.239.32.10 ns2.google.com. 215983 IN A 216.239.34.10 ns3.google.com. 215983 IN A 216.239.36.10 ns4.google.com. 215983 IN A 216.239.38.10 ;; Query time: 81 msec ;; SERVER: 128.97.128.1#53(128.97.128.1) ;; WHEN: Wed Apr 19 15:35:21 2017 ;; MSG SIZE rcvd: 180 (a) What is the discovered IPv4 address of google.com domain? (b) If you issue the same command 1 minute later, how would “ANSWER SECTION” look like? (c) When would be the earliest (absolute) time the caching resolver would contact one of the google.com name servers again? (d) If the client keeps issuing dig google.com A every second, when would be the earliest (absolute) time the caching resolver would contact one of the .com name servers? Problem 2 continued on next page. . . Page 2 of 6 CS 118 Spring 2018 : Homework 3 Write your solution to Problem 2 in this box Problem 3 The sender side of rdt3.0 simply ignores (that is, takes no action on) all received packets that are either in error or have the wrong value in the acknum field of an acknowledged packet. Suppose that in such circumstances, rdt3.0 were simply to retransmit the current data packet. Would the protocol still work? (Hint: Consider what would happen if there were only bit errors; there are no packet losses but premature timeouts can occur. Consider how many times the nth packet is sent, in the limit as n approaches infinity). Write your solution to Problem 3 in this box Problem 4 Consider a reliable data transfer protocol that uses only negative acknowledgments. Suppose the sender sends data only infrequently. Would a NAK-only protocol be preferable to a protocol that uses ACKs? Why? Now suppose the sender has a lot of data to send and the end-to-end connection experiences few losses. In this second case, would a NAK-only protocol be preferable to a protocol that uses ACKs? Why? Write your solution to Problem 4 in this box Problem 5 Consider the GBN protocol with a sender window size of 4 and a sequence number range of 1,024. Suppose that at time t, the next in-order packet that the receiver is expecting has a sequence number of k. Assume that the medium does not reorder messages. Answer the following questions: (a) What are the possible sets of sequence numbers inside the senders window at time t? Justify your answer. (b) What are all possible values of the ACK field in all possible messages currently propagating back to the sender at time t? Justify your answer. Write your solution to Problem 5 in this box Page 6 of 6