Logout

6.2.1 Outline storage details with reference to blocking, sectors, cynlinders, and heads.

(No teaching notes for this one.)

Sample Question:

One of the functions of an operating system is file maintenance.

(a) State two functions of file maintenance. [2 marks]

(b) By using a diagram, identify the following parts of a multi-disk system: track,
sector, cylinder. [3 marks]

(c) Explain how the concept of cylinders can speed up the retrieval of data from a
multi-disk magnetic disk system. [3 marks]

(d) Explain why the technique of blocking is used when writing records onto a
magnetic disk. [2 marks]

JSR Notes:

6.2.1

So the four terms to be familiar with I’ll go over first, but make sure that you are able to describe them in relation to each other and the bigger picture.  Some definitions first:

Blocking – blocking is the process whereby the storage devices is broken down logically into units that can be read from or written to in one operation. Reading and writing in this fashion is naturally more efficient than writing one byte at a time (you can think of reading and writing as being done in a "batch" sort of way). Blocks pay no particular attention to where sectors end, and most often go over multiple sectors. Blocks are usually 512 Kb.

Sector – the smallest addressable unit of a storage device. Even though blocks go over multiple sectors, the computer still needs a way to get to a specific starting point, and the beginning of a sector of a particular track is how this is done.

Cylinder – the region of hard drives that goes straight down through all the platters of a hard drive, a certain distance from the perimeter, i.e. at a certain track.  Think of the what a cylinder looks like, and that’s the shape of this cylinder; it’s circular, and goes down through the platters.
Here’s the webopedia.com definition: A single track location on all the platters making up a hard disk. For example, if a hard disk has four platters, each with 600 tracks, then there will be 600 cylinders, and each cylinder will consist of 8 tracks (assuming that each platter has tracks on both sides).

Heads – Why not go straight back to webopedia.com:
The mechanism that reads data from, or writes data to, a magnetic disk or tape. If the head becomes dirty, it will not work properly. This is one of the first things to check if your disk drive or tape drive begins to malfunction.
The head is sometimes called a read/write head. Double-sided floppy disk drives have two heads, one for each side of the disk. Hard disk drives have many heads, usually two for each platter.
I’m not sure you needed to know about the dirty head part, but you get the picture; it’s the small tip of the read-write arm of a hard drive.

 

In terms of how these all relate to each other, the term blocking factor helps, as does cluster.  Both of these terms are additional to the syllabus, but are mentioned in the textbook. 

To understand blocking factor, first here’s another additional definition for you:

Block – The amount of data that can be read or written in one read/write operation.  The idea here is that the drive won’t write just a few bytes at a time; that would be inefficient.  Rather, it stores up data to be written (think of other similar buffer situations), and in a process similar to batch processing (only we’re not talking about processing per se here) it writes a bunch at a time.  That bunch is quite often 512 bytes, but can be determined by the formatter of the drive – more on that later.

So the blocking factor is the relationship between the block size and the sector size.  So firstly, then, what influences or determines these two sizes. 

Sector Size:
Sector size is limited, primarily, by the number of addressable units that are possible.  This is the same idea as RAM address limits.  In a 32 bit system, you can only possibly have 2 ^ 32 unique addresses.  This approximately 4 billion address limit also limits the addressable units on a drive; there simply can be no more than that number of sectors.

The blocking factor – also know as cluster size - will therefore be the number of sectors over which a block spreads; i.e. how many sectors can be read or written to in one read/write operation.

Here is an example question.
A 32 bit system has a hard drive of 400 GB.  Assuming the maximum number of sectors are used, and assuming a block is 512 Bytes, what is the blocking factor.

Answer: A 32 bit system has around 4 billion addressable sectors, so to find out the size of each sector, the calculation would be 400 billion / around 4 billion = 100 bytes per sector.  Since the blocks are written at around 500 at a time, they would write over 5 blocks in a single read/write operation.  That makes the blocking factor (or cluster size) 5.

Finally, a little on whether you would choose to format your drive with a relatively larger or relatively smaller blocks (which is beyond the scope of what you need to know, but is interesting to think about, and helps consolidate other things.)  Smaller blocks will result in less wastage, but files will be more fragmented by definition.  A larger blocking size will often result in large unavailable chunks of blocks being unused, but all files will be in less fragments, and so will be faster to read/write.  512 is often seen as a good happy medium number.  But do keep in mind that the smallest you would reasonably make a block is the size of a sector, since you can’t pin-point find a region smaller than that.