70 likes | 254 Views
Review Questions. Consider a disk drive with the following characteristics: 512 bytes / sector 63 sectors / track 200 tracks / surface 5 surfaces. a) How many cylinders are there?. b) How many sectors on each cylinder?. c) What is the capacity of the disk drive?.
E N D
Review Questions • Consider a disk drive with the following characteristics: • 512 bytes / sector • 63 sectors / track • 200 tracks / surface • 5 surfaces. a) How many cylinders are there? • b) How many sectors on each cylinder? • c) What is the capacity of the disk drive?
For a certain disk, the seek time is given as 10 ms, the latency (or rotational delay) is 4 ms, and the time to transfer a block is 0.8 ms. How long would it take to transfer a single block into memory? • For a certain disk, the seek time is given as 13 ms, the latency is 6 ms and the block transfer time is 0.5 ms. Assume you have a file containing 1000 blocks, how long would it take to transfer all blocks to memory if: a) The blocks are read sequentially? b) The blocks are read randomly?
Assume we have a file of 100,000 records. How many physical accesses do we need to process the file if: • No blocking is used? • Blocking factor of 5 is used. • Blocking factor of 100 is used? • If a record size is 60 bytes and a blocking factor of 25 is used, what is the approximate block size? • We have stored on a hard disk a file of 100,000 records. Each record is 200 bytes. The block transfer speed is 800 KB/s. The seek time is 16 ms, and the rotational delay is 8.3 ms. What is the access time for one block if: • No blocking is used? • Blocking factor is 20? • Blocking factor is 100?
A file has 50,000 records of fixed length. Each record has a record size of 125 bytes. Assume the block size is 512 bytes, and un-spanned organization is used. • Calculate the blocking factor. • Calculate the amount of wasted space in each block. • Calculate the number of blocks required to store the file.
We have stored on a hard disk a file of 100,000 records, 200 bytes each. The block transfer speed is 800 KB/s, the seek time is 16 ms and the rotational delay is 8.3 ms. What is the access time for one block if: • No blocking is used? • Blocking factor of 20?
Chapter Question 13.24 r = 20,000 Name = 30 bytes SSN = 9 bytes Address = 40 bytes Phone=9 bytes Bdate = 8 bytes Sex = 1 byte MajorDeptCode = 4 bytes MinorDeptCode=4 bytes Class Code = 4 bytes DegreeProg = 3 bytes Deletion Marker = 1 byte • Calculate R. • Calculate the blocking factor and b, assuming unspanned organization. • s = 30 ms, rd = 12.5 ms, btt = 1.28 ms • Calculate the time to read the file using a linear search, if the blocks are stored contiguously and double buffering is used. Calculate if the blocks are not stored contiguously. • Assume the file is ordered by SSN. Calculate the time it takes to search for a record given its SSN value.
Assume we have a file that contains information about library books. At the beginning of each semester, all the new books are added at one time to the file. During the semester, library customers look up information about the books, and library staff update information about the book status (available, reserve, in use, etc). • Based on the information given, what type of file organization would you suggest the library use? (pile/heap file, or ordered sequential) • Assume the file has 256,000 records, and the bfr is 1000, and the time to locate and transfer a single block to the buffer is 2500 ms. The file is ordered by ISBN. How long would it take to locate and transfer to main memory the book with the ISBN 123-456. • How long would it take to locate and transfer to main memory the book with the title “Learning Java”?