The transmitter and receiver between Mars and Earth has been designed.
It gives a 1 Mb/second data transfer rate. It generates 1 error per
100,000,000 packet, and accepts a maximum packets size of 1024 bytes.
Latency between Earth and Mars varies between about 10 and 28 minutes.
You need to conserve on the amount of code used for the networking protocol
and the amount of memory used for networking buffers. (Space is limited
on board the ship you know.) What data transfer protocol should you
use?
Ping Pong (automatic request repeat)
Go Back N
Selective repeat
A different receiver and transmitted are to be used between the Mars orbiter
and the Mars lander. The raw bandwidth is 1megaBYTE per second each
way, and the latency is 0.1 seconds each way. The maximum packet
size is 1 KB, and acks take just 1 byte. The error rate is effectively
zero. The designer wants to use the ping pong protocol. What
effective throughput should he expect?
Name one feature of IPv6, that if you use it causes the amount of data
sent as IPv6 header to become larger. __________________________________
DNS uses UDP. If there is a packet loss, DNS has a time
out mechanism to compensate. This requires extra code in DNS.
Why did the DNS designers not use TCP instead? (Hint: "They're
dumb" is wrong. There is a performance advantage, but what is it?)
My goal is to have the words "Indent or die' appear on any error.
What type of error would *NOT* generate the words 'Cannot Breathe.
Need O2'?
char bug[100];
int sock = socket( ..... );
int fd = accept(sock, .... );
int ret = read(fd, buf, 100);
if (ret == -1) {
perror("Cannot breathe. Need O2");
exit(1);
}
Netscape has a setting under the menus Edit->Preferences->Advanced->Cache
entitled "Document is cache is compared to document on network".
The choices are "Every time", "Once per session", and "Never".
For instance, if "every time" is checked then the cached document
is compared to the servers version every time the document is displayed
to the user. If the documents differ, the new document is loaded.
What would be the most efficient way to implement this feature?
Use a 'Head' command where possible
Use a "Head" command with a 'Send-if-modified' if possible
Use a "Get" command with a "If-Modified-Since" if possible
Use a "Get" command with a "Send-date" or Send-Etag" modifier
if possible
None of these. It's actually ________________________________
Using Public Key Crypt I want to encrypt my Diary such that only I can
read it. How do I do that (who's key and which one do I use)?
My public key
My private key
A trusted authority's public key
A trusted authorities private key
A trusted authorities public key, then my private key
My private key, then a trusted authorities public key
Mars dust would work better than these choices (none of the above)
I want to send data across the space station. The hardware can
do 100 Mbits/second each way. The error rate varies between 0 and
2% (depending on solar flares). The latency is 0.7153 milliseconds
one way. I use selective repeat with a packet size of 4096 bytes
and an 42 byte ack. The window size is 714 packets. I have
plenty of CPU available to compute Checksums and such. There
are no other users of the network at this time. About what (within
10%) should I expect my bandwidth to be?
TCP uses an estimate of the round trip time to set the time out value.
On what does it base this estimate?
Test Pings
A fixed constant per device type (2.3 ms for ethernet, for example)
The routers tell the host as part of the route determination stage
Ethernet does the time out and retransmit for TCP. UDP doesn't
care
None of these stupid answers
Spock has 3 piles of Mars sand. Kirk has 4 piles of Mars sand.
If they put them together, how many piles do they have? ______________
You want to get the file "/index.html" from the server "www.mars.com".
You implement http version 1.1. You also want all the metadata.
What command or commands would you send?
Command#1: _________________________________________________________________
Command#2: _________________________________________________________________
You want everything to go right. What return code do you hope for
from the server?
Something in the 100's
Something in the 200's
Something in the 300's
Something in the 400's
Something in the 500's
When was the file "/" on the server www.mars.com last modified? _________________________________________
_______ Consider Netscape (a web client) and Apache (a web server).
Both are written in C for UNIX. Which of them very likely have a
listen() system call? Pick ONE!
Consider the program below. What will it do when I run it? main() {
while (12) { int ret = fork();
if (ret == -1) { cout <<
"Venus stinks\n"; }
else if (ret < 0) { exit(1);
}
else if (ret > 1) {
fork();
exit(1);
cout
<< "Venus is HOT!\n"; }
else { exit(1); } }
}
In real life many web servers do not use the accept()/fork() paradigm like
your server. Never the less these servers can handle multiple connections
at once, and never hang waiting for data. How do they avoid having
read() on one socket wait forever even though there's data on some other
socket ready to go?
Suppose my computer is behind a router that stops all packets with the
SYN bit set from coming to me. In other words, no packet can arrive
to me with the SYN bit set, but any packet I send can have the SYN bit
set, and it will be transmitted successfully. Can I run a web server?
______ A web client. _________
As a receiver I execute the code ret = read(sock, buf, 1000);
However, the sender only sends 28 bytes and then closes the socket and
then exist. What value will I get for 'ret'? ___________________________
Using HTTP/1.1, how can you tell what type the incoming file is?
______________________________________________________________________________
You're using UDP to send data between two hosts on the same ethernet.
What could cause data to be lost between the sender and receiver?
(Choose as many as you like.)
There is already data on the wire when the sender wants to send
Someone else begins to transmit exactly as the sender begins to transmit
Two hosts are both listening on the same UDP port at the same time
The receiver is faster than the sender
The router sends it on the wrong route.
Mars has only one moon
Rank these routing algorithms in order, from 'uses most memory per router'
to 'uses least memory per router'.
Djisktra's
Least
Ford
Middle
Hierarchical
Most