# Assignment4a - Pages 505-9: Exercises 13.23 Consider a disk...

This preview shows pages 1–5. Sign up to view the full content.

Pages 505-9: Exercises 13.23 Consider a disk with the following characteristics (these are not parameters of any particular disk unit): block size B=512 bytes, interblock gap size G=128 bytes, number of blocks per track=20, number of tracks per surface=400. A disk pack consists of 15 double-sided disks. a. Total track capacity = 20 * (512+128) = 12.8 Kbytes Useful track capacity = 20 * 512 = 10.24 Kbytes b. 400 Cylinders c. Total cylinder capacity = 15*2*20*(512+128) = 384 Kbytes Useful cylinder capacity = 15 * 2 * 20 * 512 = 307.2 Kbytes d. Total disk pack capacity = 15 * 2 * 400 * 20 * (512+128)= 153.6 Mbytes. Useful disk pack capacity = 15 * 2 * 400 * 20 * 512 = 122.88 Mbytes e. Transfer rate = (total track size in bytes)/(single disk revolution msec) tr= (12800) / (25) = 512 bytes/msec block transfer time = B / tr = 512 / 512 = 1 msec average rotational delay rd = (1/ 2)*(1/p) min = 12.5 msec bulk transfer rate btr= ( B/(B+G) )*tr = (512/640)*512 = 409.6 bytes/msec f. average time to locate and transfer a single block = s+rd+btt = 30+12.5+1 = 43.5 msec g. time to transfer 20 random blocks = 20 * (s + rd + btt) = 20 * 43.5 = 870 msec time to transfer 20 consecutive blocks with double buffering = s + rd + 20*btt = 30 + 12.5 + (20*1) = 62.5 msec Pages 505-9: Exercises 13.28 Load the records of Exercise 13.27 into expandable hash files based on extendible hashing. Show the structure of the directory at each step. Show the directory at each step, and the global and local depths. Use the has function h(k) = K mod 32 K h(K)(bucket number) binary h(K) record1 2369 0 00000 record2 3760 16 10000 record3 4692 20 10100

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
record4 4871 7 00111 record5 5659 27 11011 record6 1821 29 11101 record7 1074 18 10010 record8 7115 11 01011 record9 1620 20 10100 record10 2428 28 11100 record11 3943 7 00111 record12 4750 14 01110 record13 6975 31 11111
record14 4981 21 10101 record15 9208 24 11000 See Excel spreadsheet at bottom for directory steps. Pages 505-9: Exercises 13.31 Suppose that we have an unordered file of fixed-length records that uses an unspanned record organization. Outline algorithms for insertion, deletion, and modification of a file record. State any assumptions you make. Insert 1. Open the file and set the file pointer position 2. Go to the end of file 3. Insert the record at this current position 4. Save and close the file Delets 1. Open the file and set the file pointer position 2. Find the record where the file pointer = n 3. Delete the record 4. Save and close the file

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Modify 1. Open the file and set the file pointer position 2. Find the record where the file pointer = n 3. Set the file pointer record = ‘modification’ 4. Save and close the file Pages 505-9: Exercises 13.37 (13.35) Write program code to access individual fields of records under each of the following circumstances. For each case, state the assumptions you make concerning pointers, separator characters, and so on.
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 09/07/2011 for the course MIS unknown taught by Professor Unknown during the Fall '09 term at New York Institute of Technology-Westbury.

### Page1 / 12

Assignment4a - Pages 505-9: Exercises 13.23 Consider a disk...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online