Storage Management
Storage Management
MANAGEMENT
UNIT -4
AGENDA
◦Mass Storage system.
◦Disk Structure.
◦Disk Scheduling and management.
◦File System Interface.
◦File Concept.
◦Access methods.
◦Directory Structure.
◦Directory organization.
Mass Storage System.
◦ The platters spin at high speeds while a read/write head accesses the data on the disk by
changing the magnetic state of specific areas.
◦ When data is written to the disk, the read/write head applies a magnetic field to the surface of the
platter, which magnetizes small areas in a particular direction.
◦ To read the data, the read/write head detects the direction of the magnetic fields and translates it
into digital information.
◦ Magnetic disks are commonly used in computers as a form of non-volatile storage, meaning that
the data remains even when the power is turned off.
◦ They are relatively inexpensive and offer large storage capacities, making them ideal for storing
large amounts of data, such as operating systems, applications, and media files.
MAGNETIC DISK STRUCTURE
CHARACTERISTICS
◦Non volatile.
◦Cheaper than memory.
◦Capable of storing more data.
◦Used for backups.
◦Rotational speed increased over time.
DISK STRUCTURE
◦ The disk structure refers to the way in which data is organized and stored on a disk.
◦ This includes the file system and disk partitioning scheme.
◦ The file system is responsible for managing how data is stored and accessed on
the disk.
◦ The file system provides a hierarchy of directories, subdirectories, and files that can
be accessed by the user and applications.
◦ Disk partitioning refers to dividing a physical disk into one or more logical
sections.
◦ For example, a computer may have a single hard disk with two partitions: one for
the operating system and applications, and another for user data .
◦ Overall, the disk structure is an important aspect of an operating system, as it
determines how data is stored, accessed, and managed on the disk.
DISK SCHEDULING
◦ Process of selecting and ordering requests for I/O operations on a hard disk drive.
◦ Multiple processes may be requesting disk access simultaneously and the order in
which the requests are serviced can affect the overall system performance.
◦ Disk can handle one I/O request at a time, while multiple requests waits to be
processed.
Here are some of the most commonly used ones:
First-Come, First-Served (FCFS) - Simplest scheduling algorithm, in which the I/O requests are
serviced in the order they arrive. This can lead to long wait times for requests further down the queue.
Shortest Seek Time First (SSTF) - This algorithm selects the I/O request closest to the current head
position of the disk, which results in faster service times for nearby requests.
SCAN - Also known as the elevator algorithm, SCAN scans the disk back and forth, servicing requests in
the direction it is currently moving. This can lead to longer wait times for requests at the end of the disk.
C-SCAN - A variant of SCAN, in which the head moves from one end of the disk to the other, but upon
reaching the end, the head immediately returns to the other end. This algorithm avoids long wait times
for requests at the end of the disk.
LOOK - This algorithm is similar to SCAN, but instead of scanning the entire disk, it only scans until there
are no more requests in the current direction. This can reduce overall seek time compared to SCAN.
C-LOOK - A variant of LOOK, in which the head moves from one end of the disk to the other, but upon
reaching the end, the head immediately returns to the beginning of the requests in the opposite direction.
The choice of disk scheduling algorithm depends on the specific characteristics of the system and the
workload being performed.
DISK MANAGEMENT
◦ Files can be of different types such as text, binary, audio, video, etc.
◦ Each file is stored on a storage device such as a hard disk, solid-state drive, or a flash drive.
◦ File name: A name that identifies the file within the file system.
◦ File extension: A suffix added to the file name that indicates the type of file.
◦ File size: The size of the file in bytes or another unit of measure.
◦ File location: The physical location of the file on the storage device.
◦ File permissions: The permissions that determine who can access and modify the file.
◦ File metadata: Additional information associated with the file, such as creation date,
modification date, and owner.
◦ OS will provide system calls to create , read ,write and delete the files.
FILE SYSTEM INTERFACE
◦ The file system interface is the set of programmingtools that allow software
programs to interact with the file system of the OS.
◦ Provides a standardized way for applications to perform operations on files and
directories, such as creating, deleting, renaming, and moving files .
◦ The file system interface in an OS typically includes a set of system calls such as
open(), close(), read(), write().
◦ The file system interface in an OS also include higher-level functions and libraries that
provide additional functionality for working with files and directories.
◦ Overall, the file system interface is a critical component of any operating system, as it
provides the foundation for working with files and directories.
ACCESS METHODS
◦ File access methods refer to the different ways in which a computer program can read from
or write to a file stored on a disk or other storage device.
◦ The different file access methods that are commonly used,
◦ Sequential access:
1) Simple method.
2)Information accessed in the file sequentially.
3)Example : Transaction file.
4)Provides poor performance.
◦ Direct access:
1) Hybrid method that combines elements of sequential and random access.
2)Data can be read from or written to any location in the file, but the program
must first locate the record using an index or other data structure.
3) This method is commonly used for large databases or data storage systems
that require fast and efficient access to specific pieces of data.
DIRECTORY STRUCTURE & ORGANISATION
◦ A directory structure, also known as a file system, is the organization of files and
directories .
◦ The directory structure provides a way to store, organize, and manage files and
folders in a hierarchical manner, allowing users to easily navigate and locate files
on a computer or file server.
◦ Directory structures can vary depending on the operating system being used.
◦ Windows uses letter followed by colon for root directory. Example : c:
◦ Linux uses slash (/) for root directory.
SINGLE LEVEL DIRECTORY
◦ A single-level directory structure, also known as a flat directory structure, is a simple file
organization system where all files are stored in a single directory without any subdirectories.
◦ In this type of directory structure, all files are stored in a single level, and each file must have a
unique name to avoid conflicts.
◦ Here is an example of a single-level directory structure:
◦ /├── file1.txt
├── file2.doc
├── image.jpg
├── document.pdf
└── ...
As you can see, all files are stored directly in the root directory without any subdirectories.
◦ Not suitable for a large no . of .files.
HIERARCHICAL DIRECTORY SYSTEM
◦ In this structure, there is a root directory at the top level, which contains subdirectories or folders, and files are stored
within these subdirectories.
◦ /
├── Documents
│ ├── Work
│ │ ├── file1.doc
│ │ └── file2.doc
│ └── Personal
│ ├── file3.doc
│ └── file4.doc
This example, the root directory contains two main directories (Documents and Photos), which represent the top
level. Within the Documents directory, there are two subdirectories (Work and Personal), which represent the second level.
TREE STRUCTURED DIRECTORY
◦ In this structure, there is a root directory at the top, which can have multiple levels of subdirectories branching off from
it, forming a tree-like structure.
├── Documents
│ ├── Work
│ │ ├── Projects
│ │ │ ├── Project1
│ │ │ └── Project2
│ │ └── Reports
│ │ ├── Report1
│ │ └── Report2
│ └── Personal
│ ├── Photos
│ └── Videos
└── Music
├── Rock
│ ├── Song1.mp3
│ └── Song2.mp3
ACYCLIC GRAPH DIRECTORY
◦ An acyclic graph directory would mean that the directories are organized in a way that avoids
cyclic dependencies.
◦ This can be useful for organizing files and folders in a way that avoids circular references or
dependencies, which can lead to issues such as infinite loops or difficulties in managing
dependencies between different parts of a system.
◦ For example, if you have a directory A that depends on directory B, but directory B should not
depend on directory A, you would need to ensure that the directory structure does not create a
cycle between A and B.
◦ This can be achieved by carefully planning and organizing the directory structure to ensure
that dependencies are managed in a linear, acyclic manner.
THANK
YOU!!