The document discusses various file allocation methods and disk scheduling algorithms. There are three main file allocation methods - contiguous allocation, linked allocation, and indexed allocation. Contiguous allocation suffers from fragmentation but allows fast sequential access. Linked allocation does not have external fragmentation but is slower. Indexed allocation supports direct access but has higher overhead. For disk scheduling, algorithms like FCFS, SSTF, SCAN, CSCAN, and LOOK aim to minimize seek time, rotational latency, and response time by scheduling requests in different orders.
The document discusses file system implementation and mass storage structures. It describes the on-disk and in-memory structures used to manage files and free space on disks. These include the boot block, volume control block, file control blocks, directory structures, allocation methods like contiguous, linked and indexed allocation, and free space management using bitmaps, linked lists and counting. It also covers disk organization, scheduling algorithms like FCFS, SSTF, SCAN and CSCAN, and failure modes and consistency in networked file systems.
This document summarizes key aspects of mass storage systems used in operating systems. It describes the physical structure of magnetic disks including platters, seek time, and rotational latency. It discusses various disk bus interfaces and performance characteristics. It then covers disk scheduling algorithms like FCFS, SSTF, SCAN, C-SCAN, and C-LOOK. The document also discusses disk management by the operating system including formatting, partitioning and file systems. It briefly introduces solid-state disks, magnetic tape, storage arrays, storage area networks and network attached storage.
This document discusses disk scheduling algorithms. It provides background on disk drives and describes several disk scheduling algorithms - First Come First Serve (FCFS), Shortest Seek Time First (SSTF), SCAN, CSCAN, LOOK, and CLOOK. It defines key terms like seek time, rotational latency, transfer time, and response time. For each algorithm, it provides an example to illustrate how the algorithm works and calculates the total seek time. The goal of disk scheduling is to minimize seek times and optimize disk bandwidth utilization.
Magnetic disks provide most secondary storage and are relatively simple. Each disk contains one or more flat, circular platters coated with magnetic material. Disks are logically divided into tracks and sectors for reading and writing data. Disks spin rapidly and have read/write heads that can move to different tracks on the platters. Disk scheduling algorithms like SSTF aim to minimize access times by prioritizing requests located near the heads' current position. Disks can be attached directly via I/O ports or over a network using NAS or SAN storage. Disk management includes formatting, handling bad blocks, and using swap space on disk as an extension of main memory.
The document summarizes secondary storage devices, including magnetic disks and optical disks. Magnetic disks store data on circular platters that rotate rapidly. Data is written to and read from the disks using read/write heads. Disks are organized into tracks, sectors, cylinders, and clusters. Accessing data involves seek time, rotational latency, and transfer time. Optical disks like CD-ROMs encode data as pits and lands that are read using a laser. CD-ROMs organize data into sectors along a spiral track to take advantage of all storage space.
The document discusses input/output (I/O) systems and disk storage devices. The key objectives of an I/O system are to send application I/O requests to physical devices, return responses to applications, and optimize performance. Different types of disk storage devices are described, including fixed-head disks, movable-head disks, and optical disks. The document also covers disk scheduling algorithms like FCFS, SSTF, SCAN, C-SCAN, and C-LOOK that are used to minimize disk head seek times when servicing multiple pending I/O requests.
Disk scheduling algorithms are used by the operating system to efficiently service requests to read from and write to disk drives. The key components that disk scheduling aims to optimize are seek time, which is the time to move the disk head to the desired cylinder, and rotational latency, which is the additional wait for the desired sector to rotate under the head. Common disk scheduling algorithms include first-come, first-served (FCFS), shortest seek time first (SSTF), SCAN, C-SCAN, and C-LOOK, with SSTF and LOOK often being reasonable default choices.
The document discusses file system implementation and mass storage structures. It describes the on-disk and in-memory structures used to manage files and free space on disks. These include the boot block, volume control block, file control blocks, directory structures, allocation methods like contiguous, linked and indexed allocation, and free space management using bitmaps, linked lists and counting. It also covers disk organization, scheduling algorithms like FCFS, SSTF, SCAN and CSCAN, and failure modes and consistency in networked file systems.
This document summarizes key aspects of mass storage systems used in operating systems. It describes the physical structure of magnetic disks including platters, seek time, and rotational latency. It discusses various disk bus interfaces and performance characteristics. It then covers disk scheduling algorithms like FCFS, SSTF, SCAN, C-SCAN, and C-LOOK. The document also discusses disk management by the operating system including formatting, partitioning and file systems. It briefly introduces solid-state disks, magnetic tape, storage arrays, storage area networks and network attached storage.
This document discusses disk scheduling algorithms. It provides background on disk drives and describes several disk scheduling algorithms - First Come First Serve (FCFS), Shortest Seek Time First (SSTF), SCAN, CSCAN, LOOK, and CLOOK. It defines key terms like seek time, rotational latency, transfer time, and response time. For each algorithm, it provides an example to illustrate how the algorithm works and calculates the total seek time. The goal of disk scheduling is to minimize seek times and optimize disk bandwidth utilization.
Magnetic disks provide most secondary storage and are relatively simple. Each disk contains one or more flat, circular platters coated with magnetic material. Disks are logically divided into tracks and sectors for reading and writing data. Disks spin rapidly and have read/write heads that can move to different tracks on the platters. Disk scheduling algorithms like SSTF aim to minimize access times by prioritizing requests located near the heads' current position. Disks can be attached directly via I/O ports or over a network using NAS or SAN storage. Disk management includes formatting, handling bad blocks, and using swap space on disk as an extension of main memory.
The document summarizes secondary storage devices, including magnetic disks and optical disks. Magnetic disks store data on circular platters that rotate rapidly. Data is written to and read from the disks using read/write heads. Disks are organized into tracks, sectors, cylinders, and clusters. Accessing data involves seek time, rotational latency, and transfer time. Optical disks like CD-ROMs encode data as pits and lands that are read using a laser. CD-ROMs organize data into sectors along a spiral track to take advantage of all storage space.
The document discusses input/output (I/O) systems and disk storage devices. The key objectives of an I/O system are to send application I/O requests to physical devices, return responses to applications, and optimize performance. Different types of disk storage devices are described, including fixed-head disks, movable-head disks, and optical disks. The document also covers disk scheduling algorithms like FCFS, SSTF, SCAN, C-SCAN, and C-LOOK that are used to minimize disk head seek times when servicing multiple pending I/O requests.
Disk scheduling algorithms are used by the operating system to efficiently service requests to read from and write to disk drives. The key components that disk scheduling aims to optimize are seek time, which is the time to move the disk head to the desired cylinder, and rotational latency, which is the additional wait for the desired sector to rotate under the head. Common disk scheduling algorithms include first-come, first-served (FCFS), shortest seek time first (SSTF), SCAN, C-SCAN, and C-LOOK, with SSTF and LOOK often being reasonable default choices.
The document discusses file management and disk structure in operating systems. It defines files as logical units of information created by processes that are stored persistently on storage devices. The file system manages how files are structured, named, accessed, protected and implemented. Directories contain collections of files and metadata about each file, including attributes, location and ownership. Files can be accessed sequentially from beginning to end or randomly by accessing any part of the file. Disks are organized into cylinders, tracks, sectors and clusters to efficiently store and retrieve file data.
This document discusses mass storage systems and file systems. It begins with an overview of disk structure, including disk geometry, performance characteristics, and disk scheduling algorithms. RAID structures are also introduced. The document then covers file system concepts like file attributes and operations. It describes directory structures, file sharing, and file protection methods. Overall it provides a comprehensive overview of mass storage and file system interfaces from the operating system perspective.
Disk Management through the Computer ManagementAnshGoyal32
Disk Management refers to the process of managing and organizing computer storage devices, such as hard drives and solid-state drives. It involves tasks like creating partitions, formatting drives, assigning drive letters, and managing volumes. Disk Management is a critical aspect of maintaining and optimizing your computer's storage space.
This document discusses disk structure in operating systems. It defines key components of disk structure including tracks, sectors, read/write heads, seek time, rotational latency, data transfer time, controller time, and average access time. It also describes the functions of disks for storing operating systems, software, and other files. Advantages of the First Come First Serve scheduling algorithm are provided, such as simplicity and avoiding starvation, while disadvantages include non-preemptiveness and low throughput efficiency.
This document provides an overview of chapter 3 on disk scheduling. It describes the physical structure of disks including platters, cylinders, and sectors. It explains seek time and rotational latency which determine disk access performance. Several disk scheduling algorithms are presented, including FCFS, SSTF, SCAN, C-SCAN, and C-LOOK, which aim to minimize disk head movement and wait times. The document also discusses disk interfaces, solid state disks, tape storage, low-level formatting, partitioning, and boot processes from disk.
1. File allocation methods include contiguous, linked, and indexed allocation. Contiguous allocation stores files in contiguous blocks but can lead to fragmentation. Linked allocation stores non-contiguous blocks through pointers but has overhead. Indexed allocation uses index blocks to point to data blocks.
2. File systems manage free space through data structures like bit vectors, linked lists, and space maps. Bit vectors require extra space but allow contiguous allocation. Linked lists have no wasted space but non-contiguous allocation. Space maps divide devices into metaslabs for efficient free space management.
3. Performance depends on allocation algorithms, metadata handling, buffer caching, and write policies. Techniques like read-ahead and free-behind optimize sequential access,
The document discusses file systems and deadlocks. It covers key aspects of file systems like space management, file names, directories, and metadata. It also discusses different types of file systems and file operations. The document then covers deadlocks, characterizing them and describing methods to handle deadlocks through prevention, avoidance, detection, and recovery.
The document discusses different memory management strategies:
- Swapping allows processes to be swapped temporarily out of memory to disk, then back into memory for continued execution. This improves memory utilization but incurs long swap times.
- Contiguous memory allocation allocates processes into contiguous regions of physical memory using techniques like memory mapping and dynamic storage allocation with first-fit or best-fit. This can cause external and internal fragmentation over time.
- Paging permits the physical memory used by a process to be noncontiguous by dividing memory into pages and mapping virtual addresses to physical frames, allowing more efficient use of memory but requiring page tables for translation.
This document discusses mass storage systems. It begins with an overview of disk structure, including details on disk performance characteristics like seek time and rotational latency. It then covers topics like disk scheduling algorithms, disk management in operating systems, swap space management, RAID structures, and implementing stable storage. RAID levels like mirroring and striping with parity are explained. The document provides information on technologies like solid-state disks, magnetic tape, storage arrays, and network-attached storage.
This document discusses various disk scheduling algorithms:
- FCFS handles requests sequentially but suffers from the global zigzag effect.
- SSTF selects the request with the minimum seek time, reducing total head movement but risking starvation.
- SCAN and C-SCAN move the disk arm back and forth, providing more uniform wait times.
- LOOK and C-LOOK only move as far as the last request in each direction before reversing. Circular versions like C-SCAN are more fair but have larger total seek times. The optimal algorithm depends on disk load and request patterns.
This document discusses mass storage systems including disk structure, disk scheduling algorithms, RAID structures, and stable storage implementation. It provides an overview of disk components and performance characteristics. Several disk scheduling algorithms are described such as FCFS, SCAN, C-SCAN, and C-LOOK and factors in selecting an algorithm are discussed. RAID levels 1-6 are summarized. The document also covers disk management, swap space management, and implementing stable storage using replication across independent storage media.
This document discusses mass storage systems and disk drives. It provides an overview of disk structure, including platters, sectors, and cylinders. It describes disk performance characteristics like seek time, rotational latency, and transfer rates. It examines disk scheduling algorithms like FCFS, SCAN, C-SCAN, and C-LOOK which aim to minimize head movement. It also discusses disk management by the operating system, including partitioning, formatting, and file system organization.
This document discusses mass storage systems including disk structure, disk scheduling algorithms, RAID structures, and stable storage implementation. It provides an overview of disk components and performance characteristics. It describes disk addressing and various disk scheduling algorithms such as FCFS, SCAN, C-SCAN, and C-LOOK. It also discusses RAID levels, disk management, swap space management, and how to implement stable storage.
Secondary storage devices like hard disks and CD-ROMs store data using magnetic or optical methods. Hard disks use magnetic platters to store binary data as magnetic polarity, organized into tracks, sectors, cylinders, and clusters. CD-ROMs use pits and lands encoded with a binary signal to store data optically along a spiral. Both devices allow fast random access to data through logical addressing schemes despite the physical layout of the storage medium.
The document discusses optimization of disk-block access in databases. It describes how requests for disk I/O are made at the block level and how block size is a tradeoff between number of transfers and wasted space. It outlines several methods for optimization, including disk arm scheduling to minimize movement, non-volatile write buffers to reduce write latency, and file clustering to reduce access times by organizing blocks according to expected access patterns. The document also discusses buffer management in databases for caching disk blocks in memory.
This chapter discusses mass storage systems including disk structure, disk scheduling algorithms, RAID structure, and tertiary storage devices. Disks are addressed as logical blocks mapped to physical sectors. Common disk attachment methods are SCSI, FC, NAS, and SAN. Disk scheduling algorithms like FCFS, SSTF, SCAN, and C-SCAN aim to minimize seek times. RAID and file systems manage disks. Tertiary storage uses removable media like floppies, magnetic, and optical disks for low-cost storage.
This document discusses disk scheduling algorithms used by operating systems to optimize disk access time and bandwidth. It explains that disk requests are queued and disks have seek time and rotational latency when accessing data. It then describes common first-come, first-served scheduling algorithms like SSTF, SCAN, C-SCAN, and LOOK that aim to minimize disk head movement and keep the disk busy by selecting the next request that is closest to the current head position.
This chapter discusses mass storage systems including disk structure, disk scheduling algorithms, RAID structures, and stable storage implementation. Disks are addressed as logical blocks that are mapped to physical sectors on disks. The operating system manages disk requests and queues using scheduling algorithms like SSTF, SCAN, and C-SCAN to minimize seek times. RAID uses multiple disks for redundancy and improved performance. Stable storage is implemented by replicating writes to two physical blocks to ensure data is not lost due to failure.
The document discusses measures of query cost in database management systems. It explains that query cost can be measured by factors like the number of disk accesses, size of the table, and time taken by the CPU. It further breaks down disk access time into components like seek time, rotational latency, and sequential vs. random I/O. The document then provides an example formula to calculate estimated query cost based on these components.
The document discusses file management and disk structure in operating systems. It defines files as logical units of information created by processes that are stored persistently on storage devices. The file system manages how files are structured, named, accessed, protected and implemented. Directories contain collections of files and metadata about each file, including attributes, location and ownership. Files can be accessed sequentially from beginning to end or randomly by accessing any part of the file. Disks are organized into cylinders, tracks, sectors and clusters to efficiently store and retrieve file data.
This document discusses mass storage systems and file systems. It begins with an overview of disk structure, including disk geometry, performance characteristics, and disk scheduling algorithms. RAID structures are also introduced. The document then covers file system concepts like file attributes and operations. It describes directory structures, file sharing, and file protection methods. Overall it provides a comprehensive overview of mass storage and file system interfaces from the operating system perspective.
Disk Management through the Computer ManagementAnshGoyal32
Disk Management refers to the process of managing and organizing computer storage devices, such as hard drives and solid-state drives. It involves tasks like creating partitions, formatting drives, assigning drive letters, and managing volumes. Disk Management is a critical aspect of maintaining and optimizing your computer's storage space.
This document discusses disk structure in operating systems. It defines key components of disk structure including tracks, sectors, read/write heads, seek time, rotational latency, data transfer time, controller time, and average access time. It also describes the functions of disks for storing operating systems, software, and other files. Advantages of the First Come First Serve scheduling algorithm are provided, such as simplicity and avoiding starvation, while disadvantages include non-preemptiveness and low throughput efficiency.
This document provides an overview of chapter 3 on disk scheduling. It describes the physical structure of disks including platters, cylinders, and sectors. It explains seek time and rotational latency which determine disk access performance. Several disk scheduling algorithms are presented, including FCFS, SSTF, SCAN, C-SCAN, and C-LOOK, which aim to minimize disk head movement and wait times. The document also discusses disk interfaces, solid state disks, tape storage, low-level formatting, partitioning, and boot processes from disk.
1. File allocation methods include contiguous, linked, and indexed allocation. Contiguous allocation stores files in contiguous blocks but can lead to fragmentation. Linked allocation stores non-contiguous blocks through pointers but has overhead. Indexed allocation uses index blocks to point to data blocks.
2. File systems manage free space through data structures like bit vectors, linked lists, and space maps. Bit vectors require extra space but allow contiguous allocation. Linked lists have no wasted space but non-contiguous allocation. Space maps divide devices into metaslabs for efficient free space management.
3. Performance depends on allocation algorithms, metadata handling, buffer caching, and write policies. Techniques like read-ahead and free-behind optimize sequential access,
The document discusses file systems and deadlocks. It covers key aspects of file systems like space management, file names, directories, and metadata. It also discusses different types of file systems and file operations. The document then covers deadlocks, characterizing them and describing methods to handle deadlocks through prevention, avoidance, detection, and recovery.
The document discusses different memory management strategies:
- Swapping allows processes to be swapped temporarily out of memory to disk, then back into memory for continued execution. This improves memory utilization but incurs long swap times.
- Contiguous memory allocation allocates processes into contiguous regions of physical memory using techniques like memory mapping and dynamic storage allocation with first-fit or best-fit. This can cause external and internal fragmentation over time.
- Paging permits the physical memory used by a process to be noncontiguous by dividing memory into pages and mapping virtual addresses to physical frames, allowing more efficient use of memory but requiring page tables for translation.
This document discusses mass storage systems. It begins with an overview of disk structure, including details on disk performance characteristics like seek time and rotational latency. It then covers topics like disk scheduling algorithms, disk management in operating systems, swap space management, RAID structures, and implementing stable storage. RAID levels like mirroring and striping with parity are explained. The document provides information on technologies like solid-state disks, magnetic tape, storage arrays, and network-attached storage.
This document discusses various disk scheduling algorithms:
- FCFS handles requests sequentially but suffers from the global zigzag effect.
- SSTF selects the request with the minimum seek time, reducing total head movement but risking starvation.
- SCAN and C-SCAN move the disk arm back and forth, providing more uniform wait times.
- LOOK and C-LOOK only move as far as the last request in each direction before reversing. Circular versions like C-SCAN are more fair but have larger total seek times. The optimal algorithm depends on disk load and request patterns.
This document discusses mass storage systems including disk structure, disk scheduling algorithms, RAID structures, and stable storage implementation. It provides an overview of disk components and performance characteristics. Several disk scheduling algorithms are described such as FCFS, SCAN, C-SCAN, and C-LOOK and factors in selecting an algorithm are discussed. RAID levels 1-6 are summarized. The document also covers disk management, swap space management, and implementing stable storage using replication across independent storage media.
This document discusses mass storage systems and disk drives. It provides an overview of disk structure, including platters, sectors, and cylinders. It describes disk performance characteristics like seek time, rotational latency, and transfer rates. It examines disk scheduling algorithms like FCFS, SCAN, C-SCAN, and C-LOOK which aim to minimize head movement. It also discusses disk management by the operating system, including partitioning, formatting, and file system organization.
This document discusses mass storage systems including disk structure, disk scheduling algorithms, RAID structures, and stable storage implementation. It provides an overview of disk components and performance characteristics. It describes disk addressing and various disk scheduling algorithms such as FCFS, SCAN, C-SCAN, and C-LOOK. It also discusses RAID levels, disk management, swap space management, and how to implement stable storage.
Secondary storage devices like hard disks and CD-ROMs store data using magnetic or optical methods. Hard disks use magnetic platters to store binary data as magnetic polarity, organized into tracks, sectors, cylinders, and clusters. CD-ROMs use pits and lands encoded with a binary signal to store data optically along a spiral. Both devices allow fast random access to data through logical addressing schemes despite the physical layout of the storage medium.
The document discusses optimization of disk-block access in databases. It describes how requests for disk I/O are made at the block level and how block size is a tradeoff between number of transfers and wasted space. It outlines several methods for optimization, including disk arm scheduling to minimize movement, non-volatile write buffers to reduce write latency, and file clustering to reduce access times by organizing blocks according to expected access patterns. The document also discusses buffer management in databases for caching disk blocks in memory.
This chapter discusses mass storage systems including disk structure, disk scheduling algorithms, RAID structure, and tertiary storage devices. Disks are addressed as logical blocks mapped to physical sectors. Common disk attachment methods are SCSI, FC, NAS, and SAN. Disk scheduling algorithms like FCFS, SSTF, SCAN, and C-SCAN aim to minimize seek times. RAID and file systems manage disks. Tertiary storage uses removable media like floppies, magnetic, and optical disks for low-cost storage.
This document discusses disk scheduling algorithms used by operating systems to optimize disk access time and bandwidth. It explains that disk requests are queued and disks have seek time and rotational latency when accessing data. It then describes common first-come, first-served scheduling algorithms like SSTF, SCAN, C-SCAN, and LOOK that aim to minimize disk head movement and keep the disk busy by selecting the next request that is closest to the current head position.
This chapter discusses mass storage systems including disk structure, disk scheduling algorithms, RAID structures, and stable storage implementation. Disks are addressed as logical blocks that are mapped to physical sectors on disks. The operating system manages disk requests and queues using scheduling algorithms like SSTF, SCAN, and C-SCAN to minimize seek times. RAID uses multiple disks for redundancy and improved performance. Stable storage is implemented by replicating writes to two physical blocks to ensure data is not lost due to failure.
The document discusses measures of query cost in database management systems. It explains that query cost can be measured by factors like the number of disk accesses, size of the table, and time taken by the CPU. It further breaks down disk access time into components like seek time, rotational latency, and sequential vs. random I/O. The document then provides an example formula to calculate estimated query cost based on these components.
Similar to fileallocationmethods1-220104151603.pdf (20)
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.pptHenry Hollis
The History of NZ 1870-1900.
Making of a Nation.
From the NZ Wars to Liberals,
Richard Seddon, George Grey,
Social Laboratory, New Zealand,
Confiscations, Kotahitanga, Kingitanga, Parliament, Suffrage, Repudiation, Economic Change, Agriculture, Gold Mining, Timber, Flax, Sheep, Dairying,
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...TechSoup
Whether you're new to SEO or looking to refine your existing strategies, this webinar will provide you with actionable insights and practical tips to elevate your nonprofit's online presence.
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...EduSkills OECD
Andreas Schleicher, Director of Education and Skills at the OECD presents at the launch of PISA 2022 Volume III - Creative Minds, Creative Schools on 18 June 2024.
This presentation was provided by Racquel Jemison, Ph.D., Christina MacLaughlin, Ph.D., and Paulomi Majumder. Ph.D., all of the American Chemical Society, for the second session of NISO's 2024 Training Series "DEIA in the Scholarly Landscape." Session Two: 'Expanding Pathways to Publishing Careers,' was held June 13, 2024.
Leveraging Generative AI to Drive Nonprofit InnovationTechSoup
In this webinar, participants learned how to utilize Generative AI to streamline operations and elevate member engagement. Amazon Web Service experts provided a customer specific use cases and dived into low/no-code tools that are quick and easy to deploy through Amazon Web Service (AWS.)
2. File Allocation Method
• The allocation methods define how the files are stored in the
disk blocks. There are three main disk space or file allocation
methods.
Contiguous Allocation
Linked Allocation
Indexed Allocation
3. Contiguous Allocation
• The directory entry for a file with contiguous allocation contains
Address of starting block
Length of the allocated portion.
4. Advantages:
•Both the Sequential and Direct
Accesses are supported by this.
For direct access, the address of
the kth block of the file which
starts at block b can easily be
obtained as (b+k).
•This is extremely fast since the
number of seeks are minimal
because of contiguous allocation
of file blocks
Disadvantages:
•This method suffers from both
internal and external fragmentation.
This makes it inefficient in terms of
memory utilization.
•Increasing file size is difficult
because it depends on the
availability of contiguous memory at
a particular instance.
5. Linked List Allocation
• Each file is a linked list of disk blocks which need not
be contiguous. The disk blocks can be scattered anywhere on
the disk.
• The directory entry contains a pointer to the starting and the
ending file block. Each block contains a pointer to the next block
occupied by the file.
6. Advantages:
•This is very flexible in terms of file
size. File size can be increased
easily since the system does not
have to look for a contiguous chunk
of memory.
•This method does not suffer from
external fragmentation. This makes it
relatively better in terms of memory
utilization.
Disadvantages:
•Because the file blocks are distributed
randomly on the disk, a large number
of seeks are needed to access every
block individually. This makes linked
allocation slower.
•It does not support random or direct
access. We can not directly access the
blocks of a file. A block k of a file can
be accessed by traversing k blocks
sequentially (sequential access ) from
the starting block of the file via block
pointers.
•Pointers required in the linked
7. Indexed Allocation
• A special block known as the Index block contains the pointers
to all the blocks occupied by a file.
• Each file has its own index block. The ith entry in the index
block contains the disk address of the ith file block.
• The directory entry contains the address of the index block as
shown in the image:
8. Advantages:
•This supports direct access to the blocks
occupied by the file and therefore provides
fast access to the file blocks.
•It overcomes the problem of external
fragmentation.
Disadvantages:
•The pointer overhead for indexed allocation
is greater than linked allocation.
•For very small files, say files that expand only
2-3 blocks, the indexed allocation would keep
one entire block (index block) for the pointers
which is inefficient in terms of memory
utilization. However, in linked allocation we
lose the space of only 1 pointer per block.
9. Disk Scheduling Algorithms
• Disk scheduling is done by operating systems to schedule I/O
requests arriving for the disk. Disk scheduling is also known as
I/O scheduling.
• Multiple I/O requests may arrive by different processes and only
one I/O request can be served at a time by the disk controller.
Thus other I/O requests need to wait in the waiting queue and
need to be scheduled.
• Two or more request may be far from each other so can result
in greater disk arm movement.
• Hard drives are one of the slowest parts of the computer system
and thus need to be accessed in an efficient manner.
10. • Seek Time:Seek time is the time taken to locate the disk arm to
a specified track where the data is to be read or write. So the
disk scheduling algorithm that gives minimum average seek
time is better.
• Rotational Latency: Rotational Latency is the time taken by
the desired sector of disk to rotate into a position so that it can
access the read/write heads. So the disk scheduling algorithm
that gives minimum rotational latency is better.
• Transfer Time: Transfer time is the time to transfer the data. It
depends on the rotating speed of the disk and number of bytes
to be transferred.
12. Disk Scheduling Algorithms - FCFS
In FCFS, the requests are addressed in the order they arrive in
the disk queue.
• Suppose the order of request is- (82,170,43,140,24,16,190)
And current position of Read/Write head is : 50
13. SSTF: Shortest Seek Time First
• In SSTF (Shortest Seek Time First), requests having shortest
seek time are executed first.
• So, the seek time of every request is calculated in advance in
the queue and then they are scheduled according to their
calculated seek time.
• As a result, the request near the disk arm will get executed first.
SSTF is certainly an improvement over FCFS as it decreases
the average response time and increases the throughput of
system.
14. Suppose the order of request is-
(82,170,43,140,24,16,190)
And current position of Read/Write head is :
50
So, total seek time:
=(50-43)+(43-24)+(24-16)+(82-16)+(140-82)+(170-
40)+(190-170)
=208
15. SCAN:
• In SCAN algorithm the disk arm moves into a particular
direction and services the requests coming in its path and after
reaching the end of disk, it reverses its direction and again
services the request arriving in its path. So, this algorithm works
as an elevator and hence also known as elevator algorithm.
• As a result, the requests at the midrange are serviced more and
those arriving behind the disk arm will have to wait.
16. Suppose the requests to be addressed are-82,170,43,140,24,16,190. And
the Read/Write arm is at 50, and it is also given that the disk arm should
move “towards the larger value”.
Therefore, the seek time is calculated as:
=(199-50)+(199-16)
=332
Advantages:
•High throughput
•Low variance of response time
•Average response time
Disadvantages:
•Long waiting time for requests for
locations just visited by disk arm
17. CSCAN
• The disk arm instead of reversing its direction goes to the other
end of the disk and starts servicing the requests from there.
• So, the disk arm moves in a circular fashion and this algorithm
is also similar to SCAN algorithm and hence it is known as C-
SCAN (Circular SCAN).
18. Suppose the requests to be addressed are-82,170,43,140,24,16,190. And
the Read/Write arm is at 50, and it is also given that the disk arm should
move “towards the larger value”.
Seek time is calculated as:
=(199-50)+(199-0)+(43-0)
=391
Advantages:
•Provides more uniform wait time
compared to SCAN
19. LOOK:
• It is similar to the SCAN disk scheduling algorithm except for
the difference that the disk arm in spite of going to the end of
the disk goes only to the last request to be serviced in front of
the head and then reverses its direction from there only.
• Thus it prevents the extra delay which occurred due to
unnecessary traversal to the end of the disk.
20. Suppose the requests to be addressed are-82,170,43,140,24,16,190. And
the Read/Write arm is at 50, and it is also given that the disk arm should
move “towards the larger value”.
So, the seek time is calculated as:
=(190-50)+(190-16)
=314