# Database implementation question?

consider a disk with a sector size of 512 bytes, 2000 tracks/surface, 50 sectors/track,

5 doubled sided platters, average seek time is 10 msec.

Assume a block size of 1024-byte is selected.

Assume a file that contains 100,000 records of 100-byte each is to be stored on the disk,

and NONE of the reocd can be spanned 2 blocks.

How many blocks are needed to store the entire file??

If the file is arranged sequentially on disk, how many surfaces are required??

Now, i have calculated that 10,000 blocks are needed to store 100,000 records.

But i am not sure how to find out the answer of the surfaces required.

I only calculated the capacity of track is 25KB

and capacity of surface is 50,000 KB

But I don't know how to calculate the number of surfaces...

Could anyone help me how to get the answer?

Thanks a lot!!

-

the block size is the size that the os will read from disk - regardless of the physical representation of blocks (in your case will 1/2). if your file is 1 byte the os will write into a block size of 1024 and so on. as a general rule the bigger the file the bigger the block size and in reverse.

different file systems have different mechanisms to keep track of files on disk, fragmentation etc.

this is explaining how to calculate all the aspects of a hard disk. http://en.wikipedia.org/wiki/Cylinder-head-sector

-
from your calculation a file has 100,000 records of 100-byte each record ? as in (100000 * 100) / 512(bs) ? – silviud Jan 29 '11 at 19:09