Understanding Operating Systems 7th Edition McHoes Solutions Manualpdf download
Understanding Operating Systems 7th Edition McHoes Solutions Manualpdf download
https://testbankfan.com/product/understanding-operating-
systems-7th-edition-mchoes-solutions-manual/
We believe these products will be a great fit for you. Click
the link to download now, or visit testbankfan.com
to discover even more!
https://testbankfan.com/product/understanding-operating-
systems-7th-edition-mchoes-test-bank/
https://testbankfan.com/product/understanding-operating-
systems-8th-edition-mchoes-solutions-manual/
https://testbankfan.com/product/understanding-operating-
systems-5th-edition-mchoes-solutions-manual/
https://testbankfan.com/product/management-accounting-
australian-3rd-edition-eldenburg-test-bank/
Practical Management Science 5th Edition Winston Test
Bank
https://testbankfan.com/product/practical-management-science-5th-
edition-winston-test-bank/
https://testbankfan.com/product/seeing-through-statistics-4th-
edition-utts-solutions-manual/
https://testbankfan.com/product/deviance-and-social-control-a-
sociological-perspective-2nd-edition-inderbitzin-test-bank/
https://testbankfan.com/product/legal-environment-of-
business-13th-edition-meiners-solutions-manual/
https://testbankfan.com/product/illustrated-microsoft-
office-365-and-access-2016-intermediate-1st-edition-friedrichsen-
test-bank/
General Chemistry Principles and Modern Applications
10th Edition Petrucci Solutions Manual
https://testbankfan.com/product/general-chemistry-principles-and-
modern-applications-10th-edition-petrucci-solutions-manual/
Understanding Operating Systems, 7th edition
Chapter 7 Exercises
1. Briefly explain the differences between seek time and search time. In your opinion,
why do some people confuse the two? ANS: Seek time is the time required to position
the read/write head on the proper track (from the time the I/O request is received).
Search time is the time to rotate the disk from its current sector or location to the
desired sector or location. There are many reasons for people to confuse the two.
Well-reasoned suggestions are acceptable.
2. Given the following characteristics for a magnetic tape using linear recording as
described in this chapter:
Density = 1600 bpi
Speed = 1500 inches/second
Size = 2400 feet
Start/stop time = 4 ms
Number of records to be stored = 200,000 records
Size of each record = 160 bytes
Block size = 10 logical records
IBG = 0.5 inch
Find the following:
a. Number of blocks needed
ANS: 20,000 blocks (200,000 records / 10 records per block)
b. Size of the block in bytes
ANS: 1,600 bytes per block (10 records per block * 160 bytes per record)
c. Time required to read one block
ANS: 0.00066 sec = 0.66ms
(density = 1600 bpi, 1 block = 1600 bytes, therefore 1 block = 1 inch
Time = 1 inch / 1500 inches per second = .00066 sec = 0.66ms)
d. Time required to write all of the blocks.
ANS: 93,200ms or 93.2 sec to write all blocks
(0.66ms to write one block + 4ms to start/stop
= 4.66ms as the total time to write one block.
i. What would be the answer to (f) if the time it takes to move to the next track were
5 ms?
ANS: 2,607.73 sec which is 2,607,730 ms total time
(per track it takes 118 * 13 + 5 = 1539ms, this writes 118 records. 1539ms * 1694
tracks = 2,607,066 ms. Plus 702 (54 * 13ms) for the last track yielding 2,607,730
ms total time)
4. Given that it takes 1.75 ms to travel from one track to the next of a hard drive; that the
arm is originally positioned at Track 15 moving toward the low-numbered tracks; and
that you are using the LOOK scheduling policy: Compute the total seek time to satisfy
the following requests—4, 40, 35, 11, 14, and 7. Assume all requests are initially
present in the wait queue. (Ignore rotational time and transfer time; just consider seek
time.) ANS: Students should explain their reasoning here. As shown in the illustration
of the tracks traveled below, the time required for each request is a multiple of the
difference between the two tracks. Therefore for the first request, it moves 11 tracks
(15-4), which takes 19.25 ms. The total for all movement is 140 ms.
5. Describe how secondary storage differs from primary storage and give an example of
each. ANS: Primary storage is temporary in nature because data there is lost when
power is turned off. For example, it is also called “main memory” and is used by the
CPU to process jobs. Secondary storage is more permanent in nature (data there
remains even when power is turned off) and is used by the operating system to keep
data and applications over time. Two examples of secondary storage are hard disk
drives and solid state drives. This group also includes flash drives (because they are
more permanent storage) even though flash drives can be used as temporary memory
by some operating systems.
6. [Eratta: On page 225, Figure 7.12 is described as a system with a search time (time
to rotate the cylinder) of 5 seconds. It should read 1 ms. Table 7.5, on the next page,
shows the correct calculations if the search time is 1 ms. The error will be corrected
in the next printing. AMM]
Consider a virtual cylinder identical to the one shown in Figure 7.12 with the
following characteristics: seek time is 4 ms/track, search time is 1.7 ms/sector, and
data transfer time is 0.9 ms. Calculate the resulting seek time, search time, data
transfer time, and total time for the following Request List, assuming that the
read/write head begins at Track 0, Sector 0. Finally, calculate the total time required
to meet all of these requests.
0 0 (Starting Place)
1 0 4 ms 0 ms 0.9 ms 4.9 ms
1 4 0 ms 3 * 1.7 ms 0.9 ms 6 ms
ANS: Notice that Figure 7. 12 shows a virtual cylinder with exactly 5 tracks,
numbered from zero to four and 5 sectors, also numbered from zero to four. And
while the read/write heads can move in both directions, the cylinder does not rotate in
both directions. Therefore, if the next-requested sector has already been passed by, the
entire cylinder must rotate almost the entire way around to reach it. Remember, too,
that when the device begins, it is at the beginning of the sector. Thereafter, after
reading a sector, the head is at the end of that sector and the beginning of the next
sector. For this reason, the very first request appears to pass over an extra sector
(Sector 0, in this case).
7. Using an identical environment to the previous question, calculate the resulting seek
time, search time, data transfer time, and total time for the following Request List,
assuming that the read/write head begins at Track 3, Sector 0. Calculate the total time
required.
ANS: Notice that Figure 7. 12 shows a virtual cylinder with exactly 5 tracks,
numbered from zero to four and 5 sectors, also numbered from zero to four. And
while the read/write heads can move in both directions, the cylinder does not rotate in
both directions. Therefore, if the next-requested sector has already been passed by, the
entire cylinder must rotate almost the entire way around to reach it. Remember that
when the device begins, it is at the beginning of the sector. Thereafter, after reading a
sector, the head is at the end of that sector and the beginning of the next sector. For
this reason, the very first request appears to pass over an extra sector (Sector 0, in this
case).
8. Minimizing the variance of system response time is an important goal, but it does not
always prevent an occasional user from suffering indefinite postponement. If you
were the system designer, what mechanism would you recommend for a disk
scheduling policy to counteract this problem and still provide reasonable response
time to the user population as a whole? What argument would you use with the
system management to allow your changes? ANS: Students should present a well-
reasoned, original answer here. Such an answer with logical supporting reasons as to
why it is better is acceptable.
9. Describe how implementation of a RAID Level 2 system would be beneficial to a
university payroll system. In your own words, describe the disadvantages of such a
system, if any, in that environment, and if appropriate, suggest an alternative RAID
system and explain your reasoning. ANS: RAID level 2 is an expensive and complex
configuration because all disks must be highly coordinated. It offers excellent
correctional ability should one disk fail. Students should present a well-reasoned,
original answer here. Such an answer with logical supporting reasons as to why it is
better is acceptable.
Advanced Exercises
10. Explain in your own words the relationship between buffering and spooling. Suggest
reasons why some people confuse the two. ANS: Buffering means data is written to a
temporary area while it waits to go to an I/O device (such as a monitor). Buffers are
often used to pair one fast resource with one slow resource. If the program is
constantly faster than the device, there could eventually be an overflow. The buffer
loses its data when the hardware is powered off.
Spooling uses the disk as a very large buffer. A typical example is a print spooler,
which collects data to be printed and stores it on the disk. The spooler does not send
the print job to the printer until it knows that both 1) the job is ready to be printed and
2) that the printer is ready for it. The spooler may not lose its data when the hardware
is powered off.
11. Under light loading conditions, every disk scheduling policy discussed in this chapter
tends to behave like one of the policies discussed in this chapter. Which one is it?
Explain why light loading is different than heaving loading. ANS: Under very light
loading conditions every disk scheduling policy presented would approximate FCFS
because the request queue would not have many entries and requests would be
satisfied as they occurred. The different policies described in this chapter really
differentiate themselves under heavy loading conditions because then the variations
among the requests can favor more efficient allocation of the computing resources.
12. Assume you have a file of 10 records (identified as A, B, C, . . . J) to be stored on a
disk that holds 10 records per track. Once the file is stored, the records will be
accessed sequentially: A, B, C, . . . J. It takes 1 ms to transfer each record from the
disk to main memory. It takes 2 ms to process each record once it has been transferred
into memory and the next record is not accessed until the current one has been
processed. It takes 10 ms for the disk to complete one rotation.
Suppose you store the records in the order given: A, B, C, . . . J. Compute how long it
will take to process all 10 records. Break up your computation into (1) the time to
transfer a record, (2) the time to process a record, and (3) the time to access the next
record. ANS:
A 0 0 2 1 3
B 1 8 2 1 11
C 2 8 2 1 11
D 3 8 2 1 11
E 4 8 2 1 11
F 5 8 2 1 11
G 6 8 2 1 11
H 7 8 2 1 11
I 8 8 2 1 11
J 9 8 2 1 11
Total 102
Note: remember that the disk continues to rotate so that when record A has been
processed and the next read command is issued the read/write head is not positioned at
the beginning of record B. As follows:
Read A
Processing with this record takes 2ms so the disk has rotated and the read/write head
is at the beginning of record D.
b. Compute how long it will take to process all 10 records using this new order.
Break up your computation into (1) the time to transfer a record, (2) the time to
process a record, and (3) the time to access the next record. ANS:
Record Position Access Transfer Process Total
I.D. In track Time Time Time _ Time
A 0 0 2 1 3
H 1 0 2 1 3
E 2 0 2 1 3
B 3 0 2 1 3
I 4 0 2 1 3
F 5 0 2 1 3
C 6 0 2 1 3
J 7 0 2 1 3
G 8 0 2 1 3
D 9 0 2 1 3
Total 30
14. Track requests are not usually equally or evenly distributed. For example, the tracks
where the disk directory resides are accessed more often than those where the user’s
files reside. Suppose that you know that 50 percent of the requests are for a small,
fixed number of cylinders.
a. Which one of the scheduling policies presented in this chapter would be the best
under these conditions?
ANS:
a. It depends on where, on the disk, these heavily requested files are stored. For
example, if they are located in the mid-range numbered cylinders (in the case of
cylinders numbered 0 399, mid-range could be defined as cylinders 150 to 250), then
LOOK would be the optimal scheduling policy because the arm travels twice through
the mid-range cylinders: once on its way toward the center of the disk, and a second
time on its way toward the rim of the disk.
b. Can you design one that would be better?
b. Any reasonable answer is acceptable if it has logical supporting reasons as to why it
is better. Consider the probability factor in the design of the scheduling policy. It may
be possible to flag requests to those highly used cylinders, making them high priority
requests thus satisfying them first. Or, it may be possible to always position the
read/write heads at those cylinders after a long list of requests has been satisfied,
again giving them special treatment.
15. Find evidence of the latest technology for optical disc storage and complete the
following chart for three optical storage devices. Cite your sources and the dates of
their publication.
Type Transfer Rate Storage Average Access Cost in Dollars
(bytes per second) Capacity Time
CD-RW
DVD-RW
Blu-ray
ANS: These answers will vary as technology improves the design of each device and
lowers costs. Look for evidence that the student evaluated the available research
thoughtfully and has evidence of rigorous research.
16. Give an example of an environment or application that best matches the
characteristics of each of the following RAID levels:
a. Level 0
b. Level 1
c. Level 3
d. Level 5
e. Level 6
ANS: Answers will vary but some guidelines are shown here.
Programming Exercise
17. (old question 15) Write a program that will simulate the FCFS, SSTF, LOOK, and C-
LOOK seek optimization strategies. Assume that:
a. The disk’s outer track is the 0 track and the disk contains 200 tracks per surface.
Each track holds eight sectors numbered 0 through 7.
b. A seek takes 10 + 0.1 * T ms, where T is the number of tracks of motion from one
request to the next, and 10 is a movement time constant.
c. One full rotation takes 7 ms.
d. Transfer time is 1.2 ms per sector.
Use the following data to test your program:
Arrival Time Track Requested Sector Requested
0 45 0
23 132 6
25 20 2
29 23 1
35 198 7
45 170 5
57 180 3
83 78 4
88 73 5
95 150 7
For comparison purposes, compute the average, variance, and standard deviation of the
time required to accommodate all requests under each of the strategies. Consolidate your
results into a table.
Optional: Run your program again with randomly generated data and compare your
results. Use a Poisson distribution for the arrival times and uniform distributions for the
tracks and sectors. Use the same data for each strategy, and generate enough requests to
obtain a 95% confidence interval for the mean access times. Recommend the best policy
and explain why. ANS: This assignment is best explained with a paper-and-pencil model
while the corresponding scheduling policies are presented in class. FCFS does not present
any problems but the other three require some up front time and practice before the
programming logic can be designed. For SSTF, LOOK and C-LOOK the time spent in
servicing a request impacts on which request will be satisfied next because several
requests may have arrived (see arrival time) while one was being served.
The fact that the sector requested may not be directly under the read/write head provides
the opportunity to address the problem of rotational delay. The students need to be
reminded that the disk continues to rotate while the arm is performing a seek. This is
important because it determines on which sector is the read/write head positioned, which
is one of the factors used in computing rotational delay.
Rotational delay can be computed using modulus 8 on seek time. For example, if the
read/write head is positioned at the beginning of sector 2 on track A and the arm is
moving toward track B with a calculated seek time of 24ms, then seek mod 8 will yield a
remainder of 0, which means that the read/write head is still positioned at the beginning
of sector 2 when the arm arrives at track B. On the other hand. using the same set up as
before but with a calculated seek time of 27, then seek mod 8 will yield a remainder of 3,
which means that the read/write head is positioned at the beginning of sector 5 (2 + 3)
when the arm arrives at track B.
The following equations were used to compute Service Time, Wait Time and Turn
Around Time:
1. Movement between tracks (MBT)
IF Extra_Records > 7
THEN
END IF
0 45 0 17
23 132 6 22
25 20 2 28
29 23 1 15
35 198 7 30
45 170 5 14
57 180 3 14
83 78 4 25
88 73 5 17
95 150 7 18
0 45 0 17
23 132 6 22
45 170 5 15
57 180 3 14
35 198 7 12
83 78 4 25
88 73 5 13
29 23 1 20
25 20 2 13
95 150 7 29