0% found this document useful (0 votes)
83 views

Mass Storage and Case Study

Module 5 covers secondary storage structure, system protection, and a Linux case study. Chapter 12 discusses mass storage structure including disk structure, disk attachment methods like SCSI and fiber channel, and disk scheduling algorithms like FCFS, SSTF, SCAN, and C-SCAN. Disk management topics include formatting, boot blocks, and bad block handling. Chapter 17 covers system protection goals, principles, access control matrices and their implementation. The Linux case study examines its history, design principles, and components like kernel modules, process management and file systems.

Uploaded by

Ritish Gowda
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
83 views

Mass Storage and Case Study

Module 5 covers secondary storage structure, system protection, and a Linux case study. Chapter 12 discusses mass storage structure including disk structure, disk attachment methods like SCSI and fiber channel, and disk scheduling algorithms like FCFS, SSTF, SCAN, and C-SCAN. Disk management topics include formatting, boot blocks, and bad block handling. Chapter 17 covers system protection goals, principles, access control matrices and their implementation. The Linux case study examines its history, design principles, and components like kernel modules, process management and file systems.

Uploaded by

Ritish Gowda
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 56

Module 5

Mass storage and case study


Module 5
• Chapter 12: Secondary Storage Structure
12.1: Overview of mass storage structure
12.2: Disk structure
12.3 Disk attachment
12.4 Disk scheduling
12.5 Disk management
12.6 swap space management
Module 5
• Chapter 17: System protection
17.1 Goals of protection
17.2 Principles of protection
17.3 Domain of protection
17.4 Access matrix
17.5 Implementation of access matrix
17.6 Access control
17.7 Revocation of access rights
17.8 Capability based systems
Module 5
• Chapter 21: Case study – The Linux System
21.1: Linux History
21.2 Design principles
21.3 Kernel Modules
21.4 Process management
21.5 Scheduling
21.6 Memory management
21.7 File systems
21.8 Input and output
21.9 Interprocess communication
Module 5 – Chapter 12

Secondary Storage Structure


12.1 Overview of Mass-Storage
Structure
Mass Storage:
• Mass storage refers to the storage of large amount of data in
a persisting and machine readable fashion.

• Eg: Tape drives, magnetic drives, RAID system, hard disk


drives etc.
12.1.1 Magnetic Disks
• Magnetic disks provide the bulk of secondary storage for modern computer
systems.
• Various components of magnetic disks:
1. Platter
2. Cylinder
3. Sector
4. Track
5. Spindle
6. Read write head
7. Arm
8. Arm assembly
Moving-head disk mechanism
Cont..
1. Transfer rate: It is the rate at which data flow between the drive and
the computer.

2. Seek time: Positioning time (random-access time) consists of the time


to move the disk arm to the desired cylinder.

3. Rotational latency: Positioning time (random-access time) consists of


the time to move the disk arm to the desired sector to rotate to the disk
head.

4. Head crash: There is a danger that the head will make contact with
the disk surface and damages the magnetic surface. This accident is
called a head crash.
Cont..
• A disk drive is attached to a computer by a set of wires
called an I/O bus.

• Eg: Enhanced integrated drive electronics (EIDE), advanced


technology attachment (ATA), serial ATA (SATA),
universal serial bus (USB), fiber channel (FC), and SCSI
buses.

• The data transfer on a bus are carried out by special


electronic processors called controllers.
12.1.2 Magnetic Tapes
• Magnetic tape was used as an early secondary-
storage medium.
• It is relatively permanent and can hold large
quantities of data.
• Its access time is slow compared with that of main
memory and magnetic disk.
• Tapes are used mainly for backup, for storage of
infrequently used information, and as a medium for
transferring information from one system to another.
Cont..
• Tape capacities store from 20 GB to 200 GB.

• Tapes and their drivers are categorized by width,


including 4, 8, and 19 millimeters and 1/4 and 1/2
inch.
12.2 Disk Structure
• Modern 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.


12.3 Disk Attachment
• Computers access disk storage in three ways:
1.Host attached storage
2.Network attached storage
3.Storage area network
12.3.1 Host-Attached Storage
• Host-attached storage is storage accessed through
local I/O ports.
• These ports use several technologies
1.IDE or ATA: Supports a maximum of two drives per
I/O bus.
2.SATA: Protocol that has simplified cabling.
3.SCSI and fiber channel (FC).
SCSI
• SCSI is a bus architecture. Its physical medium is
usually a ribbon cable having a large number of
conductors.
• The SCSI protocol supports a maximum of 16
devices on the bus.
• The devices include one controller card in the host
and up to 15 storage devices.
SCSI
Fiber Channel
• FC is a high-speed serial architecture that can
operate over optical fiber or over a four-conductor
copper cable.
• It has two variants:
1.One is a large switched fabric having a 24-bit
address space and is the basis of storage-area
networks (SANs).
2.Arbitrated loop (FC-AL) that can address 126
devices (drives and controllers).
12.3.2 Network-Attached Storage
• A network-attached storage (NAS) device is a
special-purpose storage system that is accessed
remotely over a data network.
• Clients access network-attached storage via a
remote-procedure-call interface such as NFS for
UNIX systems or CIFS for Windows machines.
• The remote procedure calls (RPCs) are carried via
TCP or UDP over an IP network.
• ISCSI is the latest network-attached storage protocol.
Cont..
• Disadvantages:
1.Less efficient and have lower performance.
2.Increases the latency of network communication.
Network attached storage
12.3.3 Storage-Area Network
• A storage-area network (SAN) is a private network
connecting servers and storage units.

• A SAN switch allows access between the hosts and


the storage.

• FC or infiniband is used for inter connection.


Storage Area Network
12.4 Disk Scheduling
• Disk scheduling is the process of scheduling I/O requests
arriving for the disk. 
• Disk scheduling is also known as I/O scheduling.
• The access time has two major components:
1.The seek time
2.The rotational latency

• 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.
Seek time
Cont..
• 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.
Disk Scheduling Algorithms
1. FCFS Scheduling
2. SSTF Scheduling
3. SCAN Scheduling
4. C-SCAN Scheduling
5. LOOK Scheduling and C-LOOK Scheduling
12.4.1 FCFS Scheduling
• The simplest form of disk scheduling.
• First come first serve.
• This algorithm is intrinsically fair.
• It does not provide the fastest service.
FCFS disk Scheduling
Cont..
• Total read/write head movement = 640 cylinders.
• (98-53)+(183-98)+(183-37)+(122-37)+(122-14)+
(124-14)+(124-65)+(67-65)
• 45+85+146+85+108+110+59+2
• 640 Cylinders.
12.4.2 SSTF Scheduling
• Shortest-seek-time-first (SSTF) algorithm.
• The SSTF algorithm selects the request with the minimum
seek time from the current head position.
• STF chooses the pending request closest to the current head
position.
• This algorithm gives a improvement in performance.
• SSTF scheduling is a form of shortest-job-first (SJF)
scheduling.
• Total read/write head movement=236 cylinders.
• It may cause starvation of some requests.
SSTF Scheduling
• Total R/W head movement:
• (65-53)+(67-65)+(67-37)+(37-14)+(98-14)+(122-
98)+(124-122)+(183-124)
• 236 Cylinders
12.4.3 SCAN Scheduling
• The disk arm 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.

• The direction of head movement is reversed, and


servicing continues. The head continuously scans back
and forth across the disk.

• The SCAN algorithm is called the elevator algorithm.


SCAN Scheduling
• Total R/W head movement:
• (53-37)+(37-14)+(14-0)+(65-0)+(67-65)+(98-
67)+(122-98)+(124-122)+(183-124)
• 16+23+14+65+2+31+24+2+59
• 236 Cylinders
12.4.4 C-SCAN Scheduling
• Circular SCAN (C-SCAN) scheduling is a variant of
SCAN designed to provide a more uniform wait time.

• C-SCAN moves the head from one end of the disk to


the other, servicing requests along the way.

• When the head reaches the other end, it immediately


returns to the beginning of the disk, without servicing
any requests on the return trip.
C-SCAN Scheduling
• Total R/W head movement:
• (65-53)+(67-65)+(98-67)+(122-98)+(124-
122)+(183-124)+(199-183)+(199-0)+(14-0)+(37-
14)
• 12+2+31+24+2+59+16+199+14+23
• 382 Cylinders
12.4.5 LOOK and C-LOOK
Scheduling
• Versions of SCAN and C-SCAN that follow the
pattern are LOOK and C-LOOK scheduling.
• They look for a request before continuing to move
in a given direction.
C-LOOK Scheduling
• Total R/W head movement:
• (65-53)+(67-65)+(98-67)+(122-98)+(124-
122)+(183-124)+(183-14)+(37-14)
• 12+2+31+24+2+59+169+23
• 322 Cylinders
12.5 Disk Management
1. Disk Formatting
2. Boot Block
3. Bad Blocks
12.5.1 Disk Formatting
• Two types of disk formatting:
1.Low level formatting (Physical formatting)
2.Logical formatting
Low level formatting
• Disk is divided into various sectors that the disk
controller can read and write. This process is called
low-level formatting, or physical formatting.
• Low-level formatting fills the disk with a special data
structure for each sector.
• The data structure for a sector typically consists:
i. Header and trailers: Contain information used by
the disk controller, such as a sector number and an
error-correcting code (ECC).
ii.Data area: Actual data.
Eg: Sector and ECC table
Header: Sector number and ECC

Data area: (512 bytes in size)

Trailer: Sector number and ECC

Platter Sector Write value Read value Remark

4 3 510 bytes 510 bytes No mismatch

5 2 512 bytes 450 bytes Mismatch


(soft error)
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 (a FAT or modes) and an initial
empty directory.
• To increase efficiency, most file systems group
blocks together into larger chunks called as clusters.
• Disk I/O is done via blocks, but file system I/O is
done via clusters.
12.5.2 Boot Block
• Bootstrap program.

• The bootstrap is stored in read-only memory (ROM).

• Most systems store a tiny bootstrap loader program.

• A disk that has a boot partition is called a boot disk


or system disk.
Booting from disk in Windows 2000.
12.5.3 Bad Blocks
• Bad blocks: Defective sectors.

• Ways for handling bad blocks:


1.On a simple disk: ‘format command’.

1.On more sophisticated disks such as the SCSI


disks used in high-end PCs: By maintaining a list of
bad blocks on the disk, or by sector sparing or
forwarding.
A typical bad-sector transaction might be as follows:

1. The operating system tries to read logical block 87.

2. The controller calculates the ECC and finds that the sector is
bad.

3. The next time the system is rebooted, a special, command is run


to tell the SCSI controller to replace the bad sector with a spare.

4. Whenever the system requests logical block 87, the request is


translated into the replacement sector's address by the controller.
12.6 Swap-Space Management
• Swap space management: Moving entire processes between
disk and main memory.

• Swapping occurs when the amount of physical memory


reaches a critically low point and processes are moved from
memory to swap space to free available memory.

• The main goal for the design, and implementation of swap


space is to provide the best throughput for the virtual
memory system.
12.6.1 Swap-Space Use
• Swap space is used to hold an entire process image, including
the code and data segments.

• Paging systems may simply store pages that have been pushed
out of main memory.

• The amount of swap space needed on a system can range from


a few megabytes of disk space to gigabytes

• Some operating systems allow the use of multiple swap spaces.


12.6.2 Swap-Space Location
• Swap space can be physically located in one of two locations:
1.As a large file which is part of the regular file system:
 This is easy to implement, but inefficient.

2. As a raw partition:
 Possibly on a separate or little-used disk.
 This allows the OS more control over swap space
management, which is usually faster and more efficient.
 Fragmentation of swap space is generally not a big issue.
12.6.3 Swap-Space Management: An
Example

You might also like