SCHEDULING AND MANAGEMENT
1.1 FCFS Scheduling
Service all the requests close to
the current head position, before moving the head far away to service other
requests. That is selects the request with the minimum seek time from the
1.3 SCAN Scheduling
The disk head starts at one end of the disk, and moves toward
the other end, servicing requests as it reaches each cylinder, until it gets to
the other end of the disk. At the other end, the direction of head movement is
reversed, and servicing continues. The head continuously scans back and forth
Elevator algorithm: Sometimes
the SCAN algorithm is called as the elevator algorithm, since the disk
arm behaves just like an elevator in a building, first servicing all the
requests going up, and then reversing to service requests the other way.
1.4 C-SCAN Scheduling
Variant of SCAN designed to
provide a more uniform wait time. It moves the head from one end of the disk to
the other, servicing requests along the way. When the head reaches the other
end, however, it immediately returns to the beginning of the disk, without
servicing any requests on the return trip.
1.5 LOOK Scheduling
Both SCAN and C-SCAN move the disk arm across the full width
of the disk. In this, the arm goes only as far as the final request in each
direction. Then, it reverses direction immediately, without going all the way
to the end of the disk.
2. Disk Management
Low-level formatting or physical formatting:
ü Before a
disk can store data, the sector is divided into various partitions. This
process is called low-level formatting or physical formatting. It fills the
disk with a special data structure for each sector.
ü The data
structure for a sector consists of
o Data area (usually 512 bytes in
header and trailer contain information used by the disk controller, such as a
sector number and an error-correcting code (ECC).
formatting enables the manufacturer to
Test the disk and
To initialize the mapping from logical block numbers
· To use a
disk to hold files, the operating system still needs to record its own data
structures on the disk. It does so in two steps.
The first step is Partition the disk into one or
more groups of cylinders. Among the partitions, one partition can hold a copy
of the OS‘s executable code, while another holds user
second step is logical formatting .The operating system stores the initial
file-system data structures onto the disk. These data structures may include
maps of free and allocated space and an initial empty directory.
1 For a
computer to start running-for instance, when it is powered up or rebooted-it
needs to have an initial program to run. This initial progr am is called
bootstrap program & it should be simple. It initializes all aspects of the
system, from CPU registers to device controllers and the contents of main
memory, and then starts the operating system.
1 To do its
job, the bootstrap program
ü Finds the
operating system kernel on disk,
that kernel into memory, and
ü Jumps to
an initial address to begin the operating-system execution.
ü ROM needs
ü It is at
a fixed location that the processor can start executing when powered up or
3. It cannot be
infected by a computer virus. Since, ROM is read only.
ü The full
bootstrap program is stored in a partition called the boot blocks, at a fixed
location on the disk. A disk that has a boot partition is called a boot disk or
ü The code
in the boot ROM instructs the disk controller to read the boot blocks into
memory and then starts executing that code.
loader: load the entire operating system from a non-fixed location on disk, and
to start the operating system running.
1 The disk
with defected sector is called as bad block.
on the disk and controller in use, these blocks are handled in a variety of
§ If blocks
go bad during normal operation, a special program must be run manually to
search for the bad blocks and to lock them away as before. Data that resided on
the bad blocks usually are lost.
sparing or forwarding”
controller maintains a list of bad blocks on the disk. Then the controller can
be told to replace each bad sector logically with one of the spare sectors.
This scheme is known as sector sparing or forwarding.
ü A typical
bad-sector transaction might be as follows:
ü The oper
ating system tries to read logical block 87.
controller calculates the ECC and finds that the sector is bad.
reports this finding to the operating system.
The next time that the system is rebooted, a
special command is run to tell the controller to replace the bad sector with a
that, whenever the system requests logical block 87, the request is translated
sector's address by the controller.
Method 3: “sector
ü For an
example, suppose that logical block 17 becomes defective, and the first
available spare follows sector 202. Then, sector slipping would remap all the
sectors from 17 to 202,moving them all down one spot. That is, sector 202 would
be copied into the spare, then sector 201 into 202, and then 200 into 201, and
so on, until sector 18 is copied into sector 19. Slipping the sectors in this
way frees up the space of sector 18, so sector 17 can be mapped to it.