Formatting is a process by which the sectors of the disk are 1 if necessary

Formatting is a process by which the sectors of the

This preview shows page 65 - 67 out of 102 pages.

Formatting is a process by which the sectors of the disk are 1. (if necessary) created by setting out `signposts' along the tracks, 2. labelled with an address, so that the disk controller knows when it has found the correct sector. On simple disks used by microcomputers, formatting is done manually. On other types, like SCSI drives, there is a low-level formatting already on the disk when it comes from the manufacturer. This is part of the SCSI protocol, in a sense. High level formatting on top of this is not necessary, since an advanced enough filesystem will be able to manage the hardware sectors. Data consistency is checked by writing to disk and reading back the result. If there is disagreement, an error occurs. This procedure can best be implemented inside the hardware of the disk - modern disk drives are small computers in their own right. Another, cheaper way of checking data consistency is to calculate a number for each sector, based on what data are in the sector and store it in the sector. When the data are read back, the number is recalculated and if there is disagreement then an error is signalled. This is called a cyclic redundancy check (CRC) or error correcting code . Some device controllers are intelligent enough to be able to detect bad sectors and move data to a spare `good' sector if there is an error. Disk design is still a subject of considerable research and disks are improving both in speed and reliability by leaps and bounds.
Image of page 65
5.3.4 Scheduling The disk is a resource which has to be shared. It therefore has to be scheduled for use, according to some kind of queue system. If a disk only had one customer at a time, a first-come first-served FCFS policy would be adequate. However - requests both to read and to write may come randomly from any user process or from the system on a multitasking system and so we must think carefully about how to service them. Since a disk is hardware, and involves mechanical movement , it can literally be destroyed by asking it to do too much. One of the aims of scheduling a disk device is to minimize wear on the disk surface. Another aim is to maximize the speed of access. If the disk heads are being asked to go backwards and forwards randomly many times a second, much time can be lost. Floppy disks are particularly susceptible to errors caused by misalignment between disk and disk head. The more a hed moves rapidly backwards and forwards, the more likely it is to miss its intended location and misread data. When this happens the data have to be read again and the whole process takes much longer. Hard disks are more robust than floppies, but the algorithms for scheduling the disk nevertheless take into account the physical issue of movement. 5.3.4.1 FCFS As always, the simplest option for scheduling is the first-come first-serve method. This can be thought of in two ways: i) that the first user to obtain the disk gets to use it uninterrupted until his or her file access is finished, or ii) every individual disk access can be sheduled on a FCFS basis. On a busy system, ii) can lead to wild thrashing of the disk heads as different processes first try to move them one way and then another.
Image of page 66
Image of page 67

You've reached the end of your free preview.

Want to read all 102 pages?

  • One '20

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors