Tutorial - 2
Tutorial - 2
Tutorial : 2
Exercise 1
Consider a file of N=150000 employees. Each employee is characterised by the
following information: IDl number (5 char), Last name (20 char), First name (15 char),
Address (30 char).we want to store this file on a magnetic tape with the following
characteristics
C: number of control characters... 2 characters (control characters are added at the end
of each physical record or block).D: record density (1600 BPI).E: inter-block space (0.3
inches).L: length of Tape (700 metres). T: record size in characters. nb: number of
blocks. Lb: space or length of a block. Ne: number of spaces between blocks. Et: space
for the entire file (length used).
Question :
1) Calculate the length of the tape used for an unbundled format (F=1).
2) Calculate in centimetres the space required to store the entire file for a blocking
factor of 50, given that 1 inch = 2.54 cm? Deduce the number of tapes required
to store the entire file.
3) Analyse the results for (F=1 and F=50)
Exercise 2 Consider a disk with a sector size of 512 bytes, 2000 tracks per surface,
50 sectors per track, five double-sided platters, and average seek time of 10 msec.
1. What is the capacity of a track in bytes? What is the capacity of each surface? What
is the capacity of the disk?
2. How many cylinders does the disk have?
3. Give examples of valid block sizes. Is 256 bytes a valid block size? 2048? 51200?
4. If the disk platters rotate at 5400 rpm (revolutions per minute), what is the maximum
rotational delay?
a. What is the average rotational delay?
5. If one track of data can be transferred per revolution, what is the transfer rate
Page 1
Exercise 3 (Data Structure)
Consider A an array of integers. Develop iterative and recursive algorithms for
a) the maximum of A,
Page 2