end–of-record marker. Suppose we use a spanned record organization, where each block
has a 5-byte pointer to the next block (this space is not used for record storage).
(a) Calculate the average record length R in bytes.
(b) Calculate the number of blocks needed for the file.
Answer:
(a) Assuming that every field has a 1-byte field type, and that the fields not mentioned
above (NAME, SSN, ADDRESS, BIRTHDATE, SEX, CLASSCODE) have values in every
record, we need the following number of bytes for these fields in each record, plus 1
(b) Using a spanned record organization with a 5-byte pointer at the end of each block,
the bytes available in each block are (B-5) = (512 – 5) = 507 bytes.
16.30 – Suppose that a disk unit has the following parameters: seek time s=20 msec;
rotational delay rd=10 msec; block transfer time btt=1 msec; block size B=2400 bytes;
interblock gap size G=600 bytes. An EMPLOYEE file has the following fields: SSN, 9 bytes;
LASTNAME, 20 bytes; FIRSTNAME, 20 bytes; MIDDLE INIT, 1 byte; BIRTHDATE, 10 bytes;
ADDRESS, 35 bytes); PHONE, 12 bytes); SUPERVISORSSN, 9 bytes; DEPARTMENT, 4
bytes; JOBCODE, 4 bytes; deletion marker, 1 byte. The EMPLOYEE file has r=30000
STUDENT records, fixed-length format, and unspanned blocking. Write down appropriate
formulas and calculate the following values for the above EMPLOYEE file:
(a) The record size R (including the deletion marker), the blocking factor bfr, and the number
of disk blocks b.
(b) Calculate the wasted space in each disk block because of the unspanned organization.
(c) Calculate the transfer rate tr and the bulk transfer rate btr for this disk (see
Appendix B for definitions of tr and btr).
(d) Calculate the average number of block accesses needed to search for an arbitrary record
in the file, using linear search.
(e) Calculate the average time needed in msec to search for an arbitrary record in the file,
using linear search, if the file blocks are stored on consecutive disk blocks and double
buffering is used.
(f) Calculate the average time needed in msec to search for an arbitrary record in