SlideShare a Scribd company logo
1 of 54
Mass Storage Structure
OVERVIEW
Magnetic disks provide bulk of secondary storage of computer system TIMES.
Hard disk is most popular.
Some magnetic disks could be removable.
Disk attached to computer through I/O busses (USB, SCSI, EIDE, SATA….)
Drives rotate at 60 to 250 times per second.
Disks has platters.
They are ranging from .85” to 14”.
Capacity ranges from 30GB to 3TB per drive, even bigger.
OVERVIEW
 Performance
 Transfer Rate : 6Gb/Sec
 Effective Transfer Rate: 1Gb/Sec
 Seek time : 3ms to 12ms.
 Average seek time calculated based on 1/3 of tracks.
 Latency based on spindle speed.
 Average Latency=1/2 latency.
OVERVIEW
 Performance
 Access Latency=Average Access Time=Average Seek Time+Average Latency
 Average I/O Time=Average Access Time+(Amount to transfer/transfer
rate)+Controller Overhead.
DISK STRUCTURE
DISK STRUCTURE
DISK SCHEDULING
Purpose of Disk Scheduling
The main purpose of disk scheduling algorithm is to select a disk request from the queue of
IO requests and decide the schedule when this request will be processed.
Goals of Disk Scheduling
Fairness
High throughout
Minimal traveling head time
DISK SCHEDULING
Algorithms
FCFS scheduling algorithm
SSTF (shortest seek time first) algorithm
SCAN scheduling
C-SCAN scheduling
LOOK Scheduling
C-LOOK scheduling
DISK SCHEDULING
FCFS scheduling algorithm
It is the simplest Disk Scheduling algorithm.
It services the IO requests in the order in which they arrive.
There is no starvation in this algorithm, every request is serviced.
Disadvantages
The scheme does not optimize the seek time.
The request may come from different processes therefore there is the possibility of
inappropriate movement of the head.
DISK SCHEDULING
FCFS scheduling algorithm
Consider the following disk request sequence for a disk with 100 tracks 45, 21, 67, 90, 4, 50,
89, 52, 61, 87, 25. Head pointer starting at 50 and moving in left direction. Find the number
of head movements in cylinders using FCFS scheduling.
Solution:
Number of cylinders moved by the head
= (50-45)+(45-21)+(67-21)+(90-67)+(90-4)+(50-4)+(89-50)+(61-52)+(87-61)+(87-25)
= 5 + 24 + 46 + 23 + 86 + 46 + 49 + 9 + 26 + 62
= 376
DISK SCHEDULING
SSTF (shortest seek time first) algorithm
Selects the request with minimum seek time from the current head position.
SSTF scheduling is a form of SJF scheduling, starvation may exist.
It reduces the total seek time as compared to FCFS.
Advantages
Average response time decreases.
Throughput increases.
Disadvantages
Overhead to calculate seek time in advance.
Can cause starvation for a request if it has higher seek time as compared to incoming request.
Frequent switching direction slows the working of algorithm.
It is not the most optimal algorithm.
Example:
45, 21, 67, 90, 4, 89, 52, 61, 87, 25. Head pointer starting at 50.
Number of cylinders = 5 + 7 + 9 + 6 + 20 + 2 + 1 + 65 + 4 + 17 = 136
DISK SCHEDULING
SCAN Algorithm
SCAN algorithm sometimes is called the elevator algorithm.
Disk arm starts at one end of the disk, and moves toward the other end.
Service requests during the movement until it gets to the other end.
Then, the head movement is reversed and servicing continues.
Advantages
High Throughput.
Low variance of response time.
Average response time
Disadvantages
Long waiting time for requests for locations just visited by disk arm.
Example:
98, 137, 122, 183, 14, 133, 65, 78. Head pointer starting at 54 and moving in left direction.
Number of Cylinders = 40 + 14 + 65 + 13 + 20 + 24 + 11 + 4 + 46 = 237
DISK SCHEDULING
C-SCAN Algorithm
Circular-SCAN is designed to provides a more uniform wait time.
Head moves from one end to the other, servicing requests while going.
When the head reaches the end, it immediately returns to the beginning.
-without servicing any requests on the return trip then it turns back and start
moving in that direction servicing the remaining requests..
Advantages
Provides more uniform wait time.
Example:
98, 137, 122, 183, 14, 133, 65, 78. Head pointer starting at 54 and moving in left direction.
No. of cylinders crossed = 40 + 14 + 199 + 16 + 46 + 4 + 11 + 24 + 20 + 13 = 387
DISK SCHEDULING
LOOK Algorithm
It is like SCAN scheduling Algorithm to some extant except the difference that, in this
scheduling algorithm, the arm of the disk stops moving inwards (or outwards) when no
more request in that direction exists. This algorithm tries to overcome the overhead of
SCAN algorithm which forces disk arm to move in one direction till the end regardless of
knowing if any request exists in the direction or not.
Example
Consider the following disk request sequence for a disk with 100 tracks
98, 137, 122, 183, 14, 133, 65, 78. Head pointer starting at 54 and moving left direction.
Number of cylinders crossed = 40 + 51 + 13 + +20 + 24 + 11 + 4 + 46 = 209
DISK SCHEDULING
C-LOOK Algorithm
C Look Algorithm is similar to C-SCAN algorithm to some extent. In this algorithm, the arm of
the disk moves outwards servicing requests until it reaches the highest request cylinder,
then it jumps to the lowest request cylinder without servicing any request then it again start
moving outwards servicing the remaining requests.
It is different from C SCAN algorithm in the sense that, C SCAN force the disk arm to move
till the last cylinder regardless of knowing whether any request is to be serviced on that
cylinder or not.
Example
Consider the following disk request sequence for a disk with 100 tracks
98, 137, 122, 183, 14, 133, 65, 78
Head pointer starting at 54 and moving in left direction.
Number of cylinders crossed = 11 + 13 + 20 + 24 + 11 + 4 + 46 + 169 = 298
FILE SYSTEM
A file is a named collection of related information that is recorded on secondary storage
such as magnetic disks, magnetic tapes and optical disks.
The file may have attributes like name, creator, date, type, permissions , protection etc.
Name . It is the only information which is in human-readable form.
Identifier. The file is identified by a unique tag(number) within file system.
Type. It is needed for systems that support different types of files.
Location. Pointer to file location on device.
Size. The current size of the file.
Protection. This controls and assigns the power of reading, writing, executing.
Time, date, and user identification. This is the data for protection, security, and usage
monitoring.
File Type
File type refers to the ability of the operating system to identify different types of file such as
text files source files and binary files etc.
File Type Extension Function
Executable exe, com, bin
Read to run machine
language program
Object obj, o
Compiled, machine
language not linked
Source Code C, java, pas, asm, a
Source code in various
languages
Batch bat, sh
Commands to the
command interpreter
Text txt, doc Textual data, documents
Word Processor wp, tex, rrf, doc
Various word processor
formats
Multimedia mpeg, mov, rm
For containing
audio/video information
FILE ACCESS MECHANISM
It refers to the manner in which way records of file can be accessed.
Sequential access
Direct/Random access
Indexed sequential access
Sequential Access
A sequential access is that in which the records are accessed in some sequence. The
information in the file can be accesses on after another.
This access method is the most primitive one. Most of the operating systems access the
file sequentially.
Example: Compilers usually access files in this fashion.
Direct /Random Access
Accessing the records directly.
Each record has its own address on the file with by the help of which it can be directly
accessed for reading or writing.
The records need not be in any sequence within the file and they need not be in adjacent
locations on the storage medium.
The Direct Access is mostly required in the case of
database systems. In most of the cases, we need
filtered information from the database. The
sequential access can be very slow and inefficient in
such cases.
Indexed Sequential Access
If a file can be sorted then an index can be assigned to group of certain records.
A particular record can be accessed by its index.
The index is nothing but the address of a record in the file.
An index is created for each file which contains pointers to various blocks.
Index is searched sequentially and its pointer is used to access the file directly.
Advantages:
Searching in a large database became very quick and easy.
File Directories
Collection of files is a file directory. The directory contains information about the files,
including attributes, location and ownership.
Information contained in a device directory are:
1. Name
2. Type
3. Address
4. Current length
5. Maximum length
6. Date last accessed
7. Date last updated
8. Owner id
9. Protection information
Operation performed on directory are:
Search for a file
Create a file
Delete a file
List a directory
Rename a file
Traverse the file system
Advantages of maintaining directories are:
Efficiency: A file can be located more quickly.
Naming: It becomes convenient for users as two users can have same name for different files
or may have different name for same file.
Grouping: Logical grouping of files can be done by properties e.g. all java programs, all
games etc.
Single Level Directory
The entire system will contain only one directory which is supposed to mention all the files
present in the file system.
The directory contains one entry per each file present on the file system.
This type of directories can be used for a simple system.
Advantages
Implementation is very simple.
If the sizes of the files are very small then the searching becomes faster.
File creation, searching, deletion is very simple since we have only one directory.
Disadvantages
We cannot have two files with the same name.
The directory may be very big therefore searching for a file may take so much time.
Protection cannot be implemented for multiple users.
There are no ways to group same kind of files.
Choosing the unique name for every file is a bit complex .
Two Level Directory
In this separate directories for each user is maintained.
There is one master directory which contains separate directories dedicated to each user.
For each user, there is a different directory present at the second level, containing group of
user's file.
The system doesn't let a user to enter in the other user's directory without permission.
Characteristics of two level directory system
Each files has a path name as /User-name/directory-name/
Different users can have the same file name.
Searching becomes more efficient as only one user's list needs to be traversed.
The same kind of files cannot be grouped into a single directory for a particular user.
Tree-structured directory
In Tree structured directory system, any directory entry can either be a file or sub directory.
Tree structured directory system overcomes the drawbacks of two level directory system.
The similar kind of files can now be grouped in one directory.
Each user has its own directory and it cannot enter in the other user's directory.
Searching is more efficient in this directory structure. The concept of current working
directory is used. A file can be accessed by two types of path, either relative or absolute.
Absolute path is the path of the file with respect to the root directory of the system while
relative path is the path with respect to the current working directory of the system.
Acyclic -Graph structured directory
The tree structured directory system doesn't allow the same file to exist in multiple
directories therefore sharing is major concern in tree structured directory system.
We can provide sharing by making the directory an acyclic graph. In this system, two or
more directory entry can point to the same file or sub directory. That file or sub directory
is shared between the two directory entries.
We can have multiple paths for a same file.
Links can either be symbolic (logical) or hard link (physical).
File Allocation Methods
Files are allocated disk spaces by operating system.
Contiguous Allocation
Linked Allocation
Indexed Allocation
Contiguous Allocation
Each file occupies a contiguous address space on disk.
Assigned disk address is in linear order.
Easy to implement.
External fragmentation is a major issue with this type of allocation technique.
Linked Allocation
Each file carries a list of links to disk blocks.
Directory contains link / pointer to first block of a file.
No external fragmentation
Effectively used in sequential access file.
Inefficient in case of direct access file.
Advantages:
™File size does not have to be specified. ™
No external fragmentation.
Disadvantages:
™It does sequential access efficiently and is not for direct access ™.
Each block contains a pointer, wasting space .
™Blocks scatter everywhere and a large number of disk seeks may be necessary .
™Reliability: what if a pointer is lost or damaged?
Indexed Allocation
•Provides solutions to problems of contiguous and linked allocation.
•A index block is created having all pointers to files.
•Each file has its own index block which stores the addresses of disk space occupied by the
file.
•Directory contains the addresses of index blocks of files.
•Each file has an index block that is an array of disk block addresses. ‰
•The i-th entry in the index block points to the i-th block of the file. ‰
•A file’s directory entry contains a pointer to its index.
•Hence, the index block of an indexed allocation plays the same role as the page table.
•‰Index allocation supports both sequential and direct access without external fragmentation.
Free Space Management
How do we keep track free blocks on a disk?
‰A free-list is maintained.
When a new block is requested, we search this list to find one. ‰
The following are commonly used techniques:
™Bit Vector ™
Linked List
™Linked List + Grouping
™Linked List+Address+Count
Bitmap
This technique is used to implement the free space management.
When the free space is implemented as the bitmap or bit vector then each block of the disk
is represented by a bit.
When the block is free its bit is set to 1 and when the block is allocated the bit is set to 0.
The main advantage of the bitmap is it is relatively simple and efficient in finding the first
free block and also the consecutive free block in the disk.
Advantages:
This technique is relatively simple.
This technique is very efficient to find the free space on the disk.
Disadvantages:
This technique requires a special hardware support to find the first 1 in a word it is not 0.
This technique is not useful for the larger disks.
Linked List
This is another technique for free space management. In this linked list of all the free block is
maintained. In this, there is a head pointer which points the first free block of the list which
is kept in a special location on the disk. This block contains the pointer to the next block
and the next block contain the pointer of another next and this process is repeated. By using
this disk it is not easy to search the free list. This technique is not sufficient to traverse the list
because we have to read each disk block that requires I/O time. So traversing in the free list is
not a frequent action.
Advantages:
Whenever a file is to be allocated a free block, the operating system can simply allocate the
first block in free space list and move the head pointer to the next free block in the list.
Disadvantages:
Searching the free space list will be very time consuming; each block will have to be read
from the disk, which is read very slowly as compared to the main memory.
Not Efficient for faster access.
Grouping
This approach stores the address of the free blocks in the first free block. The first free block
stores the address of some, say n free blocks. Out of these n blocks, the first n-1 blocks are
actually free and the last block contains the address of next free n blocks.
An advantage of this approach is that the addresses of a group of free disk blocks can be
found easily.
Counting
This approach stores the address of the first free disk block and a number n of free contiguous
disk blocks that follow the first block.
Every entry in the list would contain:
Address of first free disk block
A number n
For example, in Figure-1, the first entry of the free space list would be: ([Address of Block 5],
2), because 2 contiguous free blocks follow block 5.

More Related Content

What's hot

Course 102: Lecture 27: FileSystems in Linux (Part 2)
Course 102: Lecture 27: FileSystems in Linux (Part 2)Course 102: Lecture 27: FileSystems in Linux (Part 2)
Course 102: Lecture 27: FileSystems in Linux (Part 2)Ahmed El-Arabawy
 
Course 102: Lecture 12: Basic Text Handling
Course 102: Lecture 12: Basic Text Handling Course 102: Lecture 12: Basic Text Handling
Course 102: Lecture 12: Basic Text Handling Ahmed El-Arabawy
 
Course 102: Lecture 10: Learning About the Shell
Course 102: Lecture 10: Learning About the Shell Course 102: Lecture 10: Learning About the Shell
Course 102: Lecture 10: Learning About the Shell Ahmed El-Arabawy
 
Course 102: Lecture 16: Process Management (Part 2)
Course 102: Lecture 16: Process Management (Part 2) Course 102: Lecture 16: Process Management (Part 2)
Course 102: Lecture 16: Process Management (Part 2) Ahmed El-Arabawy
 
List command linux a z
List command linux a zList command linux a z
List command linux a zJinyuan Loh
 
Course 102: Lecture 28: Virtual FileSystems
Course 102: Lecture 28: Virtual FileSystems Course 102: Lecture 28: Virtual FileSystems
Course 102: Lecture 28: Virtual FileSystems Ahmed El-Arabawy
 
Quick guide of the most common linux commands
Quick guide of the most common linux commandsQuick guide of the most common linux commands
Quick guide of the most common linux commandsCarlos Enrique
 
Course 102: Lecture 5: File Handling Internals
Course 102: Lecture 5: File Handling Internals Course 102: Lecture 5: File Handling Internals
Course 102: Lecture 5: File Handling Internals Ahmed El-Arabawy
 
Hadoop HDFS NameNode HA
Hadoop HDFS NameNode HAHadoop HDFS NameNode HA
Hadoop HDFS NameNode HAHanborq Inc.
 
Course 102: Lecture 8: Composite Commands
Course 102: Lecture 8: Composite Commands Course 102: Lecture 8: Composite Commands
Course 102: Lecture 8: Composite Commands Ahmed El-Arabawy
 
Coordinating Metadata Replication: Survival Strategy for Distributed Systems
Coordinating Metadata Replication: Survival Strategy for Distributed SystemsCoordinating Metadata Replication: Survival Strategy for Distributed Systems
Coordinating Metadata Replication: Survival Strategy for Distributed SystemsKonstantin V. Shvachko
 
HDFS Trunncate: Evolving Beyond Write-Once Semantics
HDFS Trunncate: Evolving Beyond Write-Once SemanticsHDFS Trunncate: Evolving Beyond Write-Once Semantics
HDFS Trunncate: Evolving Beyond Write-Once SemanticsDataWorks Summit
 
Course 102: Lecture 2: Unwrapping Linux
Course 102: Lecture 2: Unwrapping Linux Course 102: Lecture 2: Unwrapping Linux
Course 102: Lecture 2: Unwrapping Linux Ahmed El-Arabawy
 
AOS Lab 7: Page tables
AOS Lab 7: Page tablesAOS Lab 7: Page tables
AOS Lab 7: Page tablesZubair Nabi
 
Disk and File System Management in Linux
Disk and File System Management in LinuxDisk and File System Management in Linux
Disk and File System Management in LinuxHenry Osborne
 
Course 102: Lecture 7: Simple Utilities
Course 102: Lecture 7: Simple Utilities Course 102: Lecture 7: Simple Utilities
Course 102: Lecture 7: Simple Utilities Ahmed El-Arabawy
 

What's hot (20)

Comenzi unix
Comenzi unixComenzi unix
Comenzi unix
 
Course 102: Lecture 27: FileSystems in Linux (Part 2)
Course 102: Lecture 27: FileSystems in Linux (Part 2)Course 102: Lecture 27: FileSystems in Linux (Part 2)
Course 102: Lecture 27: FileSystems in Linux (Part 2)
 
Course 102: Lecture 12: Basic Text Handling
Course 102: Lecture 12: Basic Text Handling Course 102: Lecture 12: Basic Text Handling
Course 102: Lecture 12: Basic Text Handling
 
archive A-Z linux
archive A-Z linuxarchive A-Z linux
archive A-Z linux
 
Course 102: Lecture 10: Learning About the Shell
Course 102: Lecture 10: Learning About the Shell Course 102: Lecture 10: Learning About the Shell
Course 102: Lecture 10: Learning About the Shell
 
Course 102: Lecture 16: Process Management (Part 2)
Course 102: Lecture 16: Process Management (Part 2) Course 102: Lecture 16: Process Management (Part 2)
Course 102: Lecture 16: Process Management (Part 2)
 
List command linux a z
List command linux a zList command linux a z
List command linux a z
 
Course 102: Lecture 28: Virtual FileSystems
Course 102: Lecture 28: Virtual FileSystems Course 102: Lecture 28: Virtual FileSystems
Course 102: Lecture 28: Virtual FileSystems
 
Quick guide of the most common linux commands
Quick guide of the most common linux commandsQuick guide of the most common linux commands
Quick guide of the most common linux commands
 
Course 102: Lecture 5: File Handling Internals
Course 102: Lecture 5: File Handling Internals Course 102: Lecture 5: File Handling Internals
Course 102: Lecture 5: File Handling Internals
 
Hadoop HDFS NameNode HA
Hadoop HDFS NameNode HAHadoop HDFS NameNode HA
Hadoop HDFS NameNode HA
 
Course 102: Lecture 8: Composite Commands
Course 102: Lecture 8: Composite Commands Course 102: Lecture 8: Composite Commands
Course 102: Lecture 8: Composite Commands
 
Coordinating Metadata Replication: Survival Strategy for Distributed Systems
Coordinating Metadata Replication: Survival Strategy for Distributed SystemsCoordinating Metadata Replication: Survival Strategy for Distributed Systems
Coordinating Metadata Replication: Survival Strategy for Distributed Systems
 
HDFS Trunncate: Evolving Beyond Write-Once Semantics
HDFS Trunncate: Evolving Beyond Write-Once SemanticsHDFS Trunncate: Evolving Beyond Write-Once Semantics
HDFS Trunncate: Evolving Beyond Write-Once Semantics
 
Course 102: Lecture 2: Unwrapping Linux
Course 102: Lecture 2: Unwrapping Linux Course 102: Lecture 2: Unwrapping Linux
Course 102: Lecture 2: Unwrapping Linux
 
Group13
Group13Group13
Group13
 
AOS Lab 7: Page tables
AOS Lab 7: Page tablesAOS Lab 7: Page tables
AOS Lab 7: Page tables
 
Device Management
Device ManagementDevice Management
Device Management
 
Disk and File System Management in Linux
Disk and File System Management in LinuxDisk and File System Management in Linux
Disk and File System Management in Linux
 
Course 102: Lecture 7: Simple Utilities
Course 102: Lecture 7: Simple Utilities Course 102: Lecture 7: Simple Utilities
Course 102: Lecture 7: Simple Utilities
 

Similar to Mass storage structure (20)

Disk Scheduling
Disk SchedulingDisk Scheduling
Disk Scheduling
 
Unit6pdf__2024_03_ 27_08_31_05.pdf
Unit6pdf__2024_03_          27_08_31_05.pdfUnit6pdf__2024_03_          27_08_31_05.pdf
Unit6pdf__2024_03_ 27_08_31_05.pdf
 
Operating Systems
Operating SystemsOperating Systems
Operating Systems
 
Cs8493 unit 4
Cs8493 unit 4Cs8493 unit 4
Cs8493 unit 4
 
Pandi
PandiPandi
Pandi
 
Ch10
Ch10Ch10
Ch10
 
Kavi
KaviKavi
Kavi
 
Kavi
KaviKavi
Kavi
 
CH10.pdf
CH10.pdfCH10.pdf
CH10.pdf
 
Sucet os module_5_notes
Sucet os module_5_notesSucet os module_5_notes
Sucet os module_5_notes
 
operating system
operating systemoperating system
operating system
 
Mass Storage Structure
Mass Storage StructureMass Storage Structure
Mass Storage Structure
 
I/O System and Csae Study
I/O System and Csae StudyI/O System and Csae Study
I/O System and Csae Study
 
Palpandi
PalpandiPalpandi
Palpandi
 
Os
OsOs
Os
 
Os
OsOs
Os
 
Mass storage systemsos
Mass storage systemsosMass storage systemsos
Mass storage systemsos
 
Viknesh
VikneshViknesh
Viknesh
 
Secondary storage structure-Operating System Concepts
Secondary storage structure-Operating System ConceptsSecondary storage structure-Operating System Concepts
Secondary storage structure-Operating System Concepts
 
7 disk managment
7 disk managment7 disk managment
7 disk managment
 

Recently uploaded

MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 

Recently uploaded (20)

MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 

Mass storage structure

  • 2. OVERVIEW Magnetic disks provide bulk of secondary storage of computer system TIMES. Hard disk is most popular. Some magnetic disks could be removable. Disk attached to computer through I/O busses (USB, SCSI, EIDE, SATA….) Drives rotate at 60 to 250 times per second. Disks has platters. They are ranging from .85” to 14”. Capacity ranges from 30GB to 3TB per drive, even bigger.
  • 3. OVERVIEW  Performance  Transfer Rate : 6Gb/Sec  Effective Transfer Rate: 1Gb/Sec  Seek time : 3ms to 12ms.  Average seek time calculated based on 1/3 of tracks.  Latency based on spindle speed.  Average Latency=1/2 latency.
  • 4. OVERVIEW  Performance  Access Latency=Average Access Time=Average Seek Time+Average Latency  Average I/O Time=Average Access Time+(Amount to transfer/transfer rate)+Controller Overhead.
  • 7. DISK SCHEDULING Purpose of Disk Scheduling The main purpose of disk scheduling algorithm is to select a disk request from the queue of IO requests and decide the schedule when this request will be processed. Goals of Disk Scheduling Fairness High throughout Minimal traveling head time
  • 8. DISK SCHEDULING Algorithms FCFS scheduling algorithm SSTF (shortest seek time first) algorithm SCAN scheduling C-SCAN scheduling LOOK Scheduling C-LOOK scheduling
  • 9. DISK SCHEDULING FCFS scheduling algorithm It is the simplest Disk Scheduling algorithm. It services the IO requests in the order in which they arrive. There is no starvation in this algorithm, every request is serviced. Disadvantages The scheme does not optimize the seek time. The request may come from different processes therefore there is the possibility of inappropriate movement of the head.
  • 10. DISK SCHEDULING FCFS scheduling algorithm Consider the following disk request sequence for a disk with 100 tracks 45, 21, 67, 90, 4, 50, 89, 52, 61, 87, 25. Head pointer starting at 50 and moving in left direction. Find the number of head movements in cylinders using FCFS scheduling. Solution: Number of cylinders moved by the head = (50-45)+(45-21)+(67-21)+(90-67)+(90-4)+(50-4)+(89-50)+(61-52)+(87-61)+(87-25) = 5 + 24 + 46 + 23 + 86 + 46 + 49 + 9 + 26 + 62 = 376
  • 11.
  • 12.
  • 13. DISK SCHEDULING SSTF (shortest seek time first) algorithm Selects the request with minimum seek time from the current head position. SSTF scheduling is a form of SJF scheduling, starvation may exist. It reduces the total seek time as compared to FCFS. Advantages Average response time decreases. Throughput increases. Disadvantages Overhead to calculate seek time in advance. Can cause starvation for a request if it has higher seek time as compared to incoming request. Frequent switching direction slows the working of algorithm. It is not the most optimal algorithm. Example: 45, 21, 67, 90, 4, 89, 52, 61, 87, 25. Head pointer starting at 50.
  • 14. Number of cylinders = 5 + 7 + 9 + 6 + 20 + 2 + 1 + 65 + 4 + 17 = 136
  • 15.
  • 16. DISK SCHEDULING SCAN Algorithm SCAN algorithm sometimes is called the elevator algorithm. Disk arm starts at one end of the disk, and moves toward the other end. Service requests during the movement until it gets to the other end. Then, the head movement is reversed and servicing continues. Advantages High Throughput. Low variance of response time. Average response time Disadvantages Long waiting time for requests for locations just visited by disk arm. Example: 98, 137, 122, 183, 14, 133, 65, 78. Head pointer starting at 54 and moving in left direction.
  • 17. Number of Cylinders = 40 + 14 + 65 + 13 + 20 + 24 + 11 + 4 + 46 = 237
  • 18.
  • 19. DISK SCHEDULING C-SCAN Algorithm Circular-SCAN is designed to provides a more uniform wait time. Head moves from one end to the other, servicing requests while going. When the head reaches the end, it immediately returns to the beginning. -without servicing any requests on the return trip then it turns back and start moving in that direction servicing the remaining requests.. Advantages Provides more uniform wait time. Example: 98, 137, 122, 183, 14, 133, 65, 78. Head pointer starting at 54 and moving in left direction.
  • 20. No. of cylinders crossed = 40 + 14 + 199 + 16 + 46 + 4 + 11 + 24 + 20 + 13 = 387
  • 21.
  • 22. DISK SCHEDULING LOOK Algorithm It is like SCAN scheduling Algorithm to some extant except the difference that, in this scheduling algorithm, the arm of the disk stops moving inwards (or outwards) when no more request in that direction exists. This algorithm tries to overcome the overhead of SCAN algorithm which forces disk arm to move in one direction till the end regardless of knowing if any request exists in the direction or not. Example Consider the following disk request sequence for a disk with 100 tracks 98, 137, 122, 183, 14, 133, 65, 78. Head pointer starting at 54 and moving left direction.
  • 23. Number of cylinders crossed = 40 + 51 + 13 + +20 + 24 + 11 + 4 + 46 = 209
  • 24. DISK SCHEDULING C-LOOK Algorithm C Look Algorithm is similar to C-SCAN algorithm to some extent. In this algorithm, the arm of the disk moves outwards servicing requests until it reaches the highest request cylinder, then it jumps to the lowest request cylinder without servicing any request then it again start moving outwards servicing the remaining requests. It is different from C SCAN algorithm in the sense that, C SCAN force the disk arm to move till the last cylinder regardless of knowing whether any request is to be serviced on that cylinder or not. Example Consider the following disk request sequence for a disk with 100 tracks 98, 137, 122, 183, 14, 133, 65, 78 Head pointer starting at 54 and moving in left direction.
  • 25. Number of cylinders crossed = 11 + 13 + 20 + 24 + 11 + 4 + 46 + 169 = 298
  • 27. A file is a named collection of related information that is recorded on secondary storage such as magnetic disks, magnetic tapes and optical disks. The file may have attributes like name, creator, date, type, permissions , protection etc. Name . It is the only information which is in human-readable form. Identifier. The file is identified by a unique tag(number) within file system. Type. It is needed for systems that support different types of files. Location. Pointer to file location on device. Size. The current size of the file. Protection. This controls and assigns the power of reading, writing, executing. Time, date, and user identification. This is the data for protection, security, and usage monitoring. File Type File type refers to the ability of the operating system to identify different types of file such as text files source files and binary files etc.
  • 28. File Type Extension Function Executable exe, com, bin Read to run machine language program Object obj, o Compiled, machine language not linked Source Code C, java, pas, asm, a Source code in various languages Batch bat, sh Commands to the command interpreter Text txt, doc Textual data, documents Word Processor wp, tex, rrf, doc Various word processor formats Multimedia mpeg, mov, rm For containing audio/video information
  • 29. FILE ACCESS MECHANISM It refers to the manner in which way records of file can be accessed. Sequential access Direct/Random access Indexed sequential access Sequential Access A sequential access is that in which the records are accessed in some sequence. The information in the file can be accesses on after another. This access method is the most primitive one. Most of the operating systems access the file sequentially. Example: Compilers usually access files in this fashion.
  • 30. Direct /Random Access Accessing the records directly. Each record has its own address on the file with by the help of which it can be directly accessed for reading or writing. The records need not be in any sequence within the file and they need not be in adjacent locations on the storage medium. The Direct Access is mostly required in the case of database systems. In most of the cases, we need filtered information from the database. The sequential access can be very slow and inefficient in such cases.
  • 31. Indexed Sequential Access If a file can be sorted then an index can be assigned to group of certain records. A particular record can be accessed by its index. The index is nothing but the address of a record in the file. An index is created for each file which contains pointers to various blocks. Index is searched sequentially and its pointer is used to access the file directly. Advantages: Searching in a large database became very quick and easy.
  • 32. File Directories Collection of files is a file directory. The directory contains information about the files, including attributes, location and ownership. Information contained in a device directory are: 1. Name 2. Type 3. Address 4. Current length 5. Maximum length 6. Date last accessed 7. Date last updated 8. Owner id 9. Protection information
  • 33. Operation performed on directory are: Search for a file Create a file Delete a file List a directory Rename a file Traverse the file system Advantages of maintaining directories are: Efficiency: A file can be located more quickly. Naming: It becomes convenient for users as two users can have same name for different files or may have different name for same file. Grouping: Logical grouping of files can be done by properties e.g. all java programs, all games etc.
  • 34. Single Level Directory The entire system will contain only one directory which is supposed to mention all the files present in the file system. The directory contains one entry per each file present on the file system. This type of directories can be used for a simple system.
  • 35. Advantages Implementation is very simple. If the sizes of the files are very small then the searching becomes faster. File creation, searching, deletion is very simple since we have only one directory. Disadvantages We cannot have two files with the same name. The directory may be very big therefore searching for a file may take so much time. Protection cannot be implemented for multiple users. There are no ways to group same kind of files. Choosing the unique name for every file is a bit complex .
  • 36. Two Level Directory In this separate directories for each user is maintained. There is one master directory which contains separate directories dedicated to each user. For each user, there is a different directory present at the second level, containing group of user's file. The system doesn't let a user to enter in the other user's directory without permission.
  • 37. Characteristics of two level directory system Each files has a path name as /User-name/directory-name/ Different users can have the same file name. Searching becomes more efficient as only one user's list needs to be traversed. The same kind of files cannot be grouped into a single directory for a particular user.
  • 38. Tree-structured directory In Tree structured directory system, any directory entry can either be a file or sub directory. Tree structured directory system overcomes the drawbacks of two level directory system. The similar kind of files can now be grouped in one directory. Each user has its own directory and it cannot enter in the other user's directory. Searching is more efficient in this directory structure. The concept of current working directory is used. A file can be accessed by two types of path, either relative or absolute. Absolute path is the path of the file with respect to the root directory of the system while relative path is the path with respect to the current working directory of the system.
  • 39.
  • 40. Acyclic -Graph structured directory The tree structured directory system doesn't allow the same file to exist in multiple directories therefore sharing is major concern in tree structured directory system. We can provide sharing by making the directory an acyclic graph. In this system, two or more directory entry can point to the same file or sub directory. That file or sub directory is shared between the two directory entries. We can have multiple paths for a same file. Links can either be symbolic (logical) or hard link (physical).
  • 41.
  • 42. File Allocation Methods Files are allocated disk spaces by operating system. Contiguous Allocation Linked Allocation Indexed Allocation Contiguous Allocation Each file occupies a contiguous address space on disk. Assigned disk address is in linear order. Easy to implement. External fragmentation is a major issue with this type of allocation technique.
  • 43.
  • 44. Linked Allocation Each file carries a list of links to disk blocks. Directory contains link / pointer to first block of a file. No external fragmentation Effectively used in sequential access file. Inefficient in case of direct access file.
  • 45. Advantages: ™File size does not have to be specified. ™ No external fragmentation. Disadvantages: ™It does sequential access efficiently and is not for direct access ™. Each block contains a pointer, wasting space . ™Blocks scatter everywhere and a large number of disk seeks may be necessary . ™Reliability: what if a pointer is lost or damaged?
  • 46. Indexed Allocation •Provides solutions to problems of contiguous and linked allocation. •A index block is created having all pointers to files. •Each file has its own index block which stores the addresses of disk space occupied by the file. •Directory contains the addresses of index blocks of files. •Each file has an index block that is an array of disk block addresses. ‰ •The i-th entry in the index block points to the i-th block of the file. ‰ •A file’s directory entry contains a pointer to its index. •Hence, the index block of an indexed allocation plays the same role as the page table. •‰Index allocation supports both sequential and direct access without external fragmentation.
  • 47.
  • 48. Free Space Management How do we keep track free blocks on a disk? ‰A free-list is maintained. When a new block is requested, we search this list to find one. ‰ The following are commonly used techniques: ™Bit Vector ™ Linked List ™Linked List + Grouping ™Linked List+Address+Count
  • 49. Bitmap This technique is used to implement the free space management. When the free space is implemented as the bitmap or bit vector then each block of the disk is represented by a bit. When the block is free its bit is set to 1 and when the block is allocated the bit is set to 0. The main advantage of the bitmap is it is relatively simple and efficient in finding the first free block and also the consecutive free block in the disk.
  • 50. Advantages: This technique is relatively simple. This technique is very efficient to find the free space on the disk. Disadvantages: This technique requires a special hardware support to find the first 1 in a word it is not 0. This technique is not useful for the larger disks.
  • 51. Linked List This is another technique for free space management. In this linked list of all the free block is maintained. In this, there is a head pointer which points the first free block of the list which is kept in a special location on the disk. This block contains the pointer to the next block and the next block contain the pointer of another next and this process is repeated. By using this disk it is not easy to search the free list. This technique is not sufficient to traverse the list because we have to read each disk block that requires I/O time. So traversing in the free list is not a frequent action.
  • 52. Advantages: Whenever a file is to be allocated a free block, the operating system can simply allocate the first block in free space list and move the head pointer to the next free block in the list. Disadvantages: Searching the free space list will be very time consuming; each block will have to be read from the disk, which is read very slowly as compared to the main memory. Not Efficient for faster access.
  • 53. Grouping This approach stores the address of the free blocks in the first free block. The first free block stores the address of some, say n free blocks. Out of these n blocks, the first n-1 blocks are actually free and the last block contains the address of next free n blocks. An advantage of this approach is that the addresses of a group of free disk blocks can be found easily.
  • 54. Counting This approach stores the address of the first free disk block and a number n of free contiguous disk blocks that follow the first block. Every entry in the list would contain: Address of first free disk block A number n For example, in Figure-1, the first entry of the free space list would be: ([Address of Block 5], 2), because 2 contiguous free blocks follow block 5.