Information Technology Reference
In-Depth Information
our time to log the requests is average seek time + 0.5 rotation
time + transfer time = 5 ms + 5 ms + 200512
10010 6 = 10.24 ms.
Next, we need to append the commit record to the transaction. If
the disk hardware supports a barrier instruction to enforce order-
ing of multiple in-progress requests, the operating system can
issue this request along with the 100 writes. Here, we'll be con-
servative and assume that the system does not issue the com-
mit's write until after the 100 writes in the body of the transaction
are in the log. So, we will likely have to wait one full revolution of
the disk to finish the commit: 10 ms.
Finally, we need to write the 100 writes to their target locations
on disk. Unlike the case for update in place, ordering does not
matter here, so we can schedule them and write them more ef-
ficiently. Estimating this time takes engineering judgement, and
different people are likely to make different estimates. For this
example, we will assume that the disk uses a variant of short-
est service time first (SSTF) scheduling in which the scheduler
looks at the four requests on the next nearest tracks and picks
the one with the shortest predicted seek time + rotational latency
from the disk head's current position. Because the scheduler
gets to choose from four requests, we will estimate that the av-
erage rotational latency will be one forth of a rotation, 2.5 ms;
this may be conservative since it ignores the fact that request i
will always remove from the four requests being considered the
one that would have been rotationally farthest away if it were an
option for request i + 1. Because we initially have 100 requests
and because we are considering the four requests on the nearest
tracks, the farthest seek should be around 4% of the way across
the disk, and the average one to a member of the group being
considered should be around 2%. We will estimate that seeking
2-4% of the way across disk costs twice the minimum seek time:
1 ms.
Putting these estimates for writeback time together, the write-
backs of the 100 sectors should take about estimated scheduled
seek time + estimated scheduled rotational latency =1.0 ms +
2.5 ms = 3.5 ms per request or 350 ms total.
Adding the logging, commit, and writeback times, we have 10.24 ms
+ 10 ms + 350 ms = 370.24 ms. The transactional approach is
almost three times faster even though it writes the data twice and
even though it provides the stronger atomic-update semantics.
Question: For the same two approaches, compare the response time la-
tency from when a call issuing these requests is issued until that
call can safely return because all of the updates are durable.
Answer: The time for update in place is the same as above: 1 s. The time
 
Search WWH ::




Custom Search