Chapter5Solutions 1 .HTML
Chapter5Solutions 1 .HTML
Solution:
A packet must be copied four times during this process (the sending kernel copies it twice and the
receiving kernel does as well; to see this simply note that the word "copies" appears 4 times in the
problem description), which takes 4.1 msec (1024 bytes/packet * 1us/byte = 1.024msec/packet; 4 copies
is 4.096msec). There are also two interrupts (see below), which account for 2 msec. Finally, the
transmission time is approximately (see below for the correct value) 8*1024/10^7 sec = 0.8196 msec, for
total of 6.92 msec per 1024 bytes.
The maximum data rate is thus 147,977 bytes/sec = 1,183,815 bits/sec, or about 12 percent of the nominal
10 megabit/sec network capacity. If we include protocol overhead, the figures get even worse.
The transmission time actually depends on both the latency (which the problem states is 10^-6sec) and the
bandwidth of 10^7 bits/sec. The first bit arrives after 10^-6 seconds and then each of the following bits
arrives 10^-7 seconds later. Hence the transmission portion of the time is 10^-6+(1024*8-1)/(10^7)
seconds. This slightly different transmission time from that used above does not affect the data rate to the
few digits of precision that we use.
What are the two interrupts? The first is when the sending kernel receives an interrupt from the controller
saying that it has sent the data (so that the kernel knows it can start filling the controller's buffer). The
second is when the receiving controller has received the data. This tells the receiving kernel that it can
now start copying the data from the receiving controller's buffer into the kernel's buffer.
Solution:
Device independence means that files and devices are accessed the same way, independent of their
physical nature. Systems that have one set of calls for writing on a file, but a different set of calls for
writing on the console (terminal) do not exhibit device independence.
https://www.coursehero.com/file/27059699/Chapter5Solutions1html/
Solution:
a. Device driver.
b. Device driver.
c. Device-independent software.
d. User-level software.
Problem: 5.16. Why are output files for the printer normally spooled on disk before being printed?
Solution: If the printer were assigned as soon as the output appeared, a process could tie up the printer by
printing a few characters and then going to sleep for a week.
5.4: Disks
Problem: Consider a disk with an average seek time of 5ms, an average rotational latency of 5ms, and a
transfer rate of 40MB/sec.
1. If the block size is 1KB, how long would it take to read a block?
2. If the block size is 100KB, how long would it take to read a block?
3. If the goal is to read 1K, a 1KB block size is better as the remaining 99KB are wasted. If the goal
is to read 100KB, the 100KB block size is better since the 1KB block size needs 100 seeks and
100 rotational latencies. What is the minimum size request for which a disk with a 100KB block
size would complete faster than one with a 1KB block size?
Solution:
This study source was downloaded by 100000866485891 from CourseHero.com on 12-09-2023 13:59:06 GMT -06:00
https://www.coursehero.com/file/27059699/Chapter5Solutions1html/
Powered by TCPDF (www.tcpdf.org)