100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Class notes 21cs208 $11.69   Add to cart

Class notes

Class notes 21cs208

 3 views  0 purchase
  • Course
  • Institution

no google doc full covered my own word and help of my professor

Preview 4 out of 68  pages

  • July 10, 2024
  • 68
  • 2023/2024
  • Class notes
  • Kiran kumar
  • All classes
avatar-seller
21CS208 – Operating Systems Unit-V

21CS208 – OPERATING SYSTEMS

UNIT V - FILE SYSTEMS AND I/O SYSTEMS

Mass Storage System-Overview of Mass Storage Structure, Disk Structure, Disk Scheduling
and Management, Swap-Space Management; File-System Interface-File Concept, Access
Methods, Directory Structure, Directory Organization, File system mounting, File Sharing
and Protection; File System Implementation-File System Structure, Directory
Implementation, Allocation Methods, Free Space Management, Efficiency and Performance
,Recovery: I/O Systems –I/O Hardware, Application I/O Interface, Kernel I/O subsystem,
Streams and Performance.

----------------------------------------------************------------------------------------------------

Text Book: Abraham Silberschatz, Peter Baer Galvin and Greg Gagne, “Operating System
Concepts”, 9thEdition,John Wiley and Sons Inc., 2018.

5.1 Mass Storage System:
Overview of Mass-Storage Structure

5.1.1 Magnetic Disks :

• Magnetic disks provide the bulk of secondary storage for modern computer systems.
• Each disk platter has a flat circular shape, like a CD.
• Common platter diameters range from 1.8 to 3.5 inches.
• The two surfaces of a platter are covered with a magnetic material.
• Information is stored by recording it magnetically, on the platters




1

,21CS208 – Operating Systems Unit-V



Moving - head disk mechanism

• A read–write head “flies” just above each surface of every platter.
• The heads are attached to a disk arm that moves all the heads as a unit.
• The surface of a platter is logically divided into circular tracks
• Tracks are subdivided into sectors. The set of tracks that are at one arm position
makes up a cylinder.
• The storage capacity of common disk drives is measured in gigabytes.
• When the disk is in use, a drive motor spins it at high speed.
o Drives rotate 60 to 250 times per second
o Specified in terms of rotations per minute (RPM).
o Common drives spin at 5,400,7,200, 10,000, and 15,000RPM.
Disk speed has two parts.
• Transfer rate - rate at which data flow between the drive and the computer.
• Positioning time, or random-access time, consists of two parts:
➢ Seek time - time necessary to move the disk arm to the desired cylinder
➢ Rotational latency - time necessary for the desired sector to rotate to disk
head
• Head crash - As the disk head flies on an extremely thin cushion of air (measured in
microns), there is a danger that the head will make contact with the disk surface, the
head will sometimes damage the magnetic surface. This accident is called a head
crash.
A head crash normally cannot be repaired; the entire disk must be replaced tracks are
subdivided into sectors.

• A disk can be removable, allowing different disks to be mounted as needed.
• Removable magnetic disks generally consist of one platter, held in a plastic case to
prevent damage while not in the disk drive.
• Other forms of removable disks include CDs, DVDs, and Blu-ray discs as well as
removable flash-memory devices known as flash drives.
• A disk drive is attached to a computer by a set of wires called an I/O bus.
• Several kinds of buses are available, including advanced technology attachment
(ATA), serial ATA (SATA), eSATA, universal serial bus (USB), and fibre channel
(FC).
• The data transfers on a bus are carried out by special electronic processors called
controllers.
• The host controller is the controller at the computer end of the bus.
• A disk controller is built into each disk drive. To perform a disk I/O operation, the
computer places a command into the host controller, typically using memory-mapped
I/O ports.




5.1.2 Solid-State Disks:



2

,21CS208 – Operating Systems Unit-V

• SSDs or solid state have the same characteristics as traditional hard disks but can be
more reliable because they have no moving parts and faster because they have no
seek time or latency.
• But they consume less power and are more expensive per megabyte, have less capacity,
and may have shorter life spans than hard disks, so their uses are somewhat
limited.
• One use for SSDs is in storage arrays, where they hold file-system meta data that
require high performance.
• SSDs are also used in some laptop computers to make them smaller, faster, and more
energy-efficient.
• Because SSDs can be much faster than magnetic disk drives, standard bus interfaces
can cause a major limit on throughput.
• Some SSDs are designed to connect directly to the system bus (PCI, for example).
• SSDs are changing other traditional aspects of computer design as well.
• Some systems use them as a direct replacement for disk drives, while others use them
as a new cache tier, moving data between magnetic disks, SSDs, and memory to
optimize performance.


5.1.3 Magnetic Tapes:

• Magnetic tape was used as an early secondary-storage medium.
• Tapes are used mainly for backup, for storage of infrequently used information, and
as a medium for transferring information from one system to
another.
• A tape is kept in a spool and is wound or rewound past a read–write head.
• Moving to the correct spot on a tape can take minutes, but once positioned, tape
drives can write data at speeds comparable to disk drives.
• Tape capacities vary greatly, depending on the particular kind of tape drive, with
current capacities exceeding several terabytes.
• Some tapes have built-in compressions that can more than double the effective
storage.


5.2. Disk Structure :
• Modern magnetic disk drives are addressed as large one-dimensional arrays of
logical blocks, where the logical block is the smallest unit of transfer.
• The size of a logical block is usually 512 bytes, although some disks can be low-
level formatted to have a different logical block size, such as 1,024 bytes.
• The one-dimensional array of logical blocks is mapped onto the sectors of the disk
sequentially.
• Sector 0 is the first sector of the first track on the outermost cylinder.
• The mapping proceeds in order through that track, then through the rest of the
tracks in that cylinder, and then through the rest of the cylinders from outermost to
innermost.
• By using this mapping, we can—at least in theory—convert a logical block
number into an old-style disk address that consists of a cylinder number, a track
number within that cylinder, and a sector number within that track.

3

, 21CS208 – Operating Systems Unit-V

• In practice, it is difficult to perform this translation, for two reasons.
➢ First, most disks have some defective sectors, but the mapping hides this by
substituting spare sectors from elsewhere on the disk.
➢ Second, the number of sectors per track is not a constant on some drives.
• On media that use constant linear velocity (CLV), the density of bits per track is
uniform.
• As we move from outer zones to inner zones, the number of sectors per track
decreases. The drive increases its rotation speed as the head moves from the outer
to the inner tracks to keep the same rate of data moving under the head. This
method is used in CD-ROM 10.3 Disk Attachment 471 and DVD-ROM drives.
• Alternatively, the disk rotation speed can stay constant; in this case, the density of
bits decreases from inner tracks to outer tracks to keep the data rate constant. This
method is used in hard disks and is known as constant angular velocity (CAV).
• The number of sectors per track has been increasing as disk technology improves,
and the outer zone of a disk usually has several hundred sectors per track.
Similarly, the number of cylinders per disk has been increasing; large disks have
tens of thousands of cylinders.

5.3. Disk Scheduling :
• One of the responsibilities of the operating system is to use the hardware efficiently.
• For the disk drives, meeting this responsibility entails having fast access time and
large disk bandwidth.
• For magnetic disks, the access time has two major components.
• The seek time is the time for the disk arm to move the heads to the cylinder
containing the desired sector.
• The rotational latency is the additional time for the disk to rotate the desired sector to
the disk head.
• The disk bandwidth is the total number of bytes transferred, divided by the total
time between the first request for service and the completion of the last transfer.
• Whenever a process needs I / O to or from the disk, it issues a system call to the
operating system.
• The request specifies several pieces of information:

Whether this operation is input or output


What the disk address for the transfer is


What the memory address for the transfer is


What the number of sectors to be transferred is


• If the desired disk drive and controller are available, the request can be serviced
immediately.
• If the drive or controller is busy, any new requests for service will be placed in the
queue of pending requests for that drive.


4

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller praveenkumar.m1. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $11.69. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

75759 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$11.69
  • (0)
  Add to cart