Download as pdf or txt
Download as pdf or txt
You are on page 1of 148

Noida Institute of Engineering and Technology Greater Noida

Operating Systems
ACSE0403A

Unit 5

I/O Management and Disk


Scheduling
Nisha
B. Tech 4th Semester Assistant Professor, Deptt of DS

Nisha ACSE0403A OS Unit 5 1


11 May 2023
Evaluation Scheme

11 May 2023 Nisha ACSE0403A OS Unit 5 2


Subject Syllabus

11 May 2023 Nisha ACSE0403A OS Unit 5 3


Subject Syllabus

11 May 2023 Nisha ACSE0403A OS Unit 5 4


Syllabus For Unit-5

UNIT-V I/O Management and Disk Scheduling:


I/O Devices, and I/O Subsystems, I/O Buffering, I/O Ports, Disk Storage: Seek Time,
Rotational Latency, Data Transfer Time, Average Access Time and Controller
Time,Disk Storage Strategies, Disk Scheduling:FCFS, SSTF, SCAN, C-SCAN, LOOK and
C-LOOK.

Directory and Directory Structure, File System: File concept, File Access Mechanism:
- Sequential Access, Direct Access and Index Access methods, File Allocation
Method: Contiguous, Linked and Indexed, Free Space Management: -Bit Vector,
Linked List, Grouping and Counting File System Implementation Issues, File System
Protection and Security, RAID.

11 May 2023 Nisha ACSE0403A OS Unit 5 5


Branch wise Applications

• Airlines reservation system.


• Air traffic control system.
• Systems that provide immediate updating.
• Used in any system that provides up to date and minute
information on stock prices.
• Defense application systems like RADAR.
• Networked Multimedia Systems.
• Command Control Systems.

11 May 2023 Nisha ACSE0403A OS Unit 5 6


Course Objectives

• Provide an understanding of the basic modules and architecture of an operating


system and the functions of the modules to manage, coordinate and control all the
parts of the
computer system.

• Processor scheduling, deadlocks, memory management, process synchronization,


system call and file system management.

Nisha ACSE0403A OS Unit 5


11 May 2023 7
Course Outcomes

Course outcome: After completion of this course students will be able to:

CO 1 Understand the fundamentals of an operating systems, functions and their K1, K2


structure and functions.

CO2 Implement concept of process management policies, CPU Scheduling and K5


thread management.

CO3 Understand and implement the requirement of process synchronization K2,K5


and apply deadlock handling algorithms.

CO4 Evaluate the memory management and its allocation policies. K5

CO5 Understand and analyze the I/O management and File systems K2, K4

11 May 2023 Nisha ACSE0403A OS Unit 5 8


Program Outcomes
1. Engineering knowledge
2. Problem analysis
3. Design/development of solutions
4.Conduct investigations of complex problems
5. Modern tool usage
6. The engineer and society
7. Environment and sustainability
8. Ethics:
9. Individual and team work
10. Communication
11. Project management and finance
12. Life-long learning

11 May 2023 Nisha ACSE0403A OS Unit 5 9


COs and POs Mapping
OPERATING SYSTEM (ACSE0403A )
CODE PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12

ACSE0403A .1 3 3 2 2 1 2 - 2 3 2 2 3

ACSE0403A .2 3 3 3 2 2 3 - 2 3 1 1 3

ACSE0403A .3 3 3 2 2 2 2 - 2 2 3 1 3

ACSE0403A .4 3 2 2 3 1 2 - 1 2 1 2 3

ACSE0403A .5 3 1 2 2 2 2 - 1 2 2 2 3

Average 3 2.4 2.2 2.2 1.6 2.2 - 1.8 2.2 1.8 1.6 3

11 May 2023 Nisha ACSE0403A OS Unit 5 10


Program Specific Outcomes(PSOs)
On successful completion of B. Tech. (I.T.) Program, the Information Technology graduates
will be able to:

• PSO1:- Work as a software developer, database administrator, tester or networking engineer


for providing solutions to the real world and industrial problems.
• PSO2:- Apply core subjects of information technology related to data structure and
algorithm, software engineering, web technology, operating system, database and
networking to solve complex IT problems.
• PSO3:-Practice multi-disciplinary and modern computing techniques by lifelong learning to
establish innovative career.
• PSO4:-Work in a team or individual to manage projects with ethical concern to be a
successful employee or employer in IT industry.

11 May 2023 Nisha ACSE0403A OS Unit 5 11


COs and PSOs Mapping

Program Specific Outcomes


Course
Outcomes PSO1 PSO2 PSO3 PSO4

ACSE0403A .1 2 1 2 2
ACSE0403A .2 2 2 1 2
ACSE0403A .3 2 3 3 2
ACSE0403A .4 2 2 1 2
ACSE0403A .5 2 2 2 2
Average 2 2 1.8 2

11 May 2023 Nisha ACSE0403A OS Unit 5 12


Program Educational Objectives (PEOs)

• PEO1:Apply sound knowledge in the field of information technology to fulfill the needs of IT
industry.
• PEO2:Design innovative and interdisciplinary systems through latest digital technologies.
• PEO3:Inculcate professional – social ethics, team work and leadership for serving the
society.
• PEO4:Inculcate lifelong learning in the field of computing for successful career in
organizations and R&D sectors.

11 May 2023 Nisha ACSE0403A OS Unit 5 13


Faculty wise Result Analysis

Semester & Section Subject Code Result

11 May 2023 Nisha ACSE0403A OS Unit 5 14


End Semester Question Paper Templates (Offline Pattern/Online Pattern

11 May 2023 Nisha ACSE0403A OS Unit 5 15


End Semester Question Paper Templates (Offline Pattern/Online Pattern

11 May 2023 Nisha ACSE0403A OS Unit 5 16


End Semester Question Paper Templates (Offline Pattern/Online Pattern

11 May 2023 Nisha ACSE0403A OS Unit 5 17


End Semester Question Paper Templates (Offline Pattern/Online Pattern

11 May 2023 Nisha ACSE0403A OS Unit 5 18


End Semester Question Paper Templates (Offline Pattern/Online Pattern

11 May 2023 Nisha ACSE0403A OS Unit 5 19


End Semester Question Paper Templates (Offline Pattern/Online Pattern

11 May 2023 Nisha ACSE0403A OS Unit 5 20


End Semester Question Paper Templates (Offline Pattern/Online Pattern

11 May 2023 Nisha ACSE0403A OS Unit 5 21


Prerequisite and Recap
Prerequisite
• First get your computer hardware basics cleared.
• Digital logic and it’s design (Basics will make understand storing memory and page faults,
Difference between ram and rom. etc.,)
• Computer Organization and Architecture( Design of Computer architecture will help you
understand computer peripherals and its storages, accessing them in operating system )
• Strong programming skills (Knowledge of C).
Recap
▪ Describe memory organization and explain memory management techniques.
▪ To analyze various memory management schemes.
▪ Compare and contrast various memory management schemes.
▪ To understand and analyze the virtual memory concept and solve the page replacement
problem.
▪ To understand the concept of thrashing
11 May 2023 Nisha ACSE0403A OS Unit 5 22
Unit -5 (Objective )
• To describe the physical structure of secondary storage devices and its effects on the uses of the
devices.
• To explain the performance characteristics of mass-storage devices.
• To evaluate disk scheduling algorithms.
• To explain the function of file systems.
• To discuss file system design tradeoffs, including access methods, file sharing, file locking, and
directory structures.
• To explore the structure of an operating system's I/O subsystem.
• To discuss the goals and principles of protection in a modern computer system.
• To discuss security threats and attacks.

11 May 2023 Nisha ACSE0403A OS Unit 5 23


Brief Introduction about the subject with video

An operating system acts as an intermediary between the user of a computer and


computer hardware. The purpose of an operating system is to provide an
environment in which a user can execute programs conveniently and efficiently

YouTube/other Video Links

• https://www.youtube.com/playlist?list=PLmXKhU9FNesSFvj6gASuWmQd23Ul5omtD

11 May 2023 Nisha ACSE0403A OS Unit 5 24


Prerequisite and Recap

• Basic knowledge of computer fundamentals.


• Basic knowledge of computer organization.
• Memory hierarchy
• Cache Organization
• Interrupt
• Registers
• Associative memory

11 May 2023 Nisha ACSE0403A OS Unit 5 25


Content

•I/O Management and Disk Scheduling:


•I/O Devices and I/O Subsystems
•I/O Buffering
•I/O Ports
• Disk Storage:
•Seek Time
•Rotational Latency
•Data Transfer Time
• Average Access Time and Controller Time
•Disk Storage Strategies
•Disk Scheduling
•FCFS
•SSTF
•SCAN
• C-SCAN
• LOOK and C-LOOK
•Directory and Directory Structure

11 May 2023 Nisha ACSE0403A OS Unit 5 26


Content
•File System
•File concept
•File Access Mechanism
•Sequential Access
•Direct Access and Index Access methods
•File Allocation Method:
•Contiguous
• Linked
•Indexed
•Free Space Management
•Bit Vector
• Linked List
•Grouping and Counting
•File System Implementation Issues
• File System Protection and Security
• RAID.

11 May 2023 Nisha ACSE0403A OS Unit 5 27


Unit 5 Objective

After going through this unit, you should be able to:


• understand the I/O subsystems.
• understand the disk scheduling techniques.
• understand the concept of RAID.
• compare and contrast different approaches to file organisations.
• compare and contrast different file allocation methods.
• know how to implement the file system and its protection against unauthorised usage
• .

Nisha ACSE0403A OS Unit 5


11 May 2023 28
Content

•I/O Management and Disk Scheduling:


•I/O Devices and I/O Subsystems
•I/O Buffering
•I/O Ports
• Disk Storage:
•Seek Time
•Rotational Latency
•Data Transfer Time
• Average Access Time and Controller Time
•Disk Storage Strategies
•Disk Scheduling
•FCFS
•SSTF
•SCAN
• C-SCAN
• LOOK and C-LOOK
•Directory and Directory Structure

11 May 2023 Nisha ACSE0403A OS Unit 5 29


Course Outcome of Unit 5

At the end of semester, students will be able to

CO5: Understand and analyse the I/O management and File systems

11 May 2023 Nisha ACSE0403A OS Unit 5 30


CO-PO Mapping

OPERATING SYSTEM(ACSE0403A)
CODE PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12

ACSE0403A.4

11 May 2023 Nisha ACSE0403A OS Unit 5 31


CO- PSO Mapping

Program Specific Outcomes


Course
Outcomes PSO1 PSO2 PSO3 PSO4

ACSE0403A.5

11 May 2023 Nisha ACSE0403A OS Unit 5 32


Topic Mapping with Course Outcome

Course Topics
Outcome Module 1 Module 2 Module 3 Module 4

ACSE0403A.4 3 2 2 2 2 1

11 May 2023 Nisha ACSE0403A OS Unit 5 33


Topic mapping with CO
Topic CO
I/O Management and Disk Scheduling CO5

Disk storage CO5

Disk scheduling CO5


Directory and Directory structure CO5
File System CO5

File Allocation Method CO5

File System Implementation Issues CO5

RAID CO5
11 May 2023 Nisha ACSE0403A OS Unit 5 34
Topic Objectives
Topic Objective
Students will be able to
I/O Management and Disk Scheduling: Understand the basic Input and output h/w devices and
buffering techniques .

Disk storage Understand the different types storage techniques.

Disk scheduling Understand the different disk scheduling techniques.


Directory and Directory structure Understand the directory structure
File System Know the different File system storage and access
mechanism.
RAID Understand the different levels of RAID.

11 May 2023 Nisha ACSE0403A OS Unit 5 35


Introduction (CO5)

• I/O devices are very important in the computer systems. They provide users the means of interacting
with the system. So there is a separate I/O system devoted to handling the I/O devices.
• I/O Hardware
• There are many I/O devices handled by the operating system such as mouse, keyboard, disk drive etc.
• There are different device drivers that can be connected to the operating system to handle a specific
device.
• The device controller is an interface between the device and the device driver.

For Video Lecture:-

11 May 2023 Nisha ACSE0403A OS Unit 5 36


I/O Devices and I/O Subsystems

11 May 2023 Nisha ACSE0403A OS Unit 5 37


I/O Systems(CO5)
• I/O management is a major component of operating system design
and operation
• Important aspect of computer operation
• I/O devices vary greatly
• Various methods to control them
• Performance management
• New types of devices frequent

• Ports, buses, device controllers connect to various devices

• Device drivers encapsulate device details

• Present uniform device-access interface to I/O subsystem

11 May 2023 Nisha ACSE0403A OS Unit 5 38


A Typical PC Bus Structure(CO5)

11 May 2023 Nisha ACSE0403A OS Unit 5 39


I/O Hardware(CO5)
• Incredible variety of I/O devices
• Storage
• Transmission
• Human-interface
• Common concepts – signals from I/O devices interface with computer
• Port – connection point for device
• Bus - daisy chain or shared direct access
• PCI bus common in PCs and servers, PCI Express (PCIe)
• expansion bus connects relatively slow devices
Controller (host adapter) – electronics that operate port, bus, device
• Sometimes integrated
• Sometimes separate circuit board (host adapter)
• Contains processor, microcode, private memory, bus controller, etc
• – 11 MaySome
2023 talk to per-device controller with bus
Nisha controller,
ACSE0403A OSmicrocode,
Unit 5 memory, etc 40
I/O Hardware (CO5)
• I/O instructions control devices

• Devices usually have registers where device driver places commands, addresses,
and data to write, or read data from registers after command execution
• Data-in register, data-out register, status register, control register
• Typically 1-4 bytes, or FIFO buffer
• Devices have addresses, used by

• Direct I/O instructions

• Memory-mapped I/O
• Device data and command registers mapped to processor address space
• Especially for large address spaces (graphics)

11 May 2023 Nisha ACSE0403A OS Unit 5 41


I/O Buffering(CO5)

• The buffer is an area in the main memory used to store or hold the data temporarily.
• The act of storing data temporarily in the buffer is called buffering.
• A buffer may be used when moving data between processes within a computer. Buffers can be
implemented in a fixed memory location in hardware or by using a virtual data buffer in software,
pointing at a location in the physical memory.
• In all cases, the data in a data buffer are stored on a physical storage medium.

11 May 2023 Nisha ACSE0403A OS Unit 5 42


Types of Buffering (CO5)

Single Buffer
In Single Buffering, only one buffer is used to transfer the data between two devices. The producer
produces one block of data into the buffer. After that, the consumer consumes the buffer. Only when the
buffer is empty, the processor or producer again produces the data.

11 May 2023 Nisha ACSE0403A OS Unit 5 43


Double Buffering (CO5)

In Double Buffering, two schemes or two buffers are used in the place of one. In this buffering, the
producer produces one buffer while the consumer consumes another buffer simultaneously. So, the
producer not needs to wait for filling the buffer. Double buffering is also known as buffer swapping.

11 May 2023 Nisha ACSE0403A OS Unit 5 44


Circular
Circular Buffer
Buffering (CO5)

circular Buffering

When more than two buffers are used, the buffers' collection is called a circular buffer. Each buffer
is being one unit in the circular buffer. The data transfer rate will increase using the circular buffer
rather than the double buffering.

11 May 2023 Nisha ACSE0403A OS Unit 5 45


I/O port
I/O port (CO5)

• An I/O port usually consists of four different registers. These are (1) status, (2) control, (3) data-
in, and (4) data-out registers.
• The data-in register is read by the host for getting input.
• The data-out register is written by the host for sending output.
• The status register holds bits which can be read by the host.
• The control register is written by the host for starting a command or for changing the mode of
any device.
• The data registers are usually 1 to 4 bytes in size. Some of the controllers have FIFO chips which
hold several bytes of input or output data for expanding the capacity of the controller beyond
the size of the data register.

11 May 2023 Nisha ACSE0403A OS Unit 5 46


Polling(CO5)
• For each byte of I/O
1. Read busy bit from status register until 0
2. Host sets read or write bit and if write copies data into data-out register
3. Host sets command-ready bit
4. Controller sets busy bit, executes transfer
5. Controller clears busy bit, error bit, command-ready bit when transfer done
• Step 1 is busy-wait cycle to wait for I/O from device
• Reasonable if device is fast
• But inefficient if device slow
• CPU switches to other tasks?
• But if miss a cycle data overwritten / lost

11 May 2023 Nisha ACSE0403A OS Unit 5 47


Interrupts(CO5)
• Polling can happen in 3 instruction cycles
• Read status, logical-and to extract status bit, branch if not zero
• How to be more efficient if non-zero infrequently?
• CPU Interrupt-request line triggered by I/O device
• Checked by processor after each instruction
• Interrupt handler receives interrupts
• Maskable to ignore or delay some interrupts
• Interrupt vector to dispatch interrupt to correct handler
• Context switch at start and end
• Based on priority
• Some nonmaskable
• Interrupt chaining if more than one device at same interrupt number

11 May 2023 Nisha ACSE0403A OS Unit 5 48


Direct Memory Access(CO5)
• Used to avoid programmed I/O (one byte at a time) for large data movement

• Requires DMA controller

• Bypasses CPU to transfer data directly between I/O device and memory

• OS writes DMA command block into memory


• Source and destination addresses
• Read or write mode
• Count of bytes
• Writes location of command block to DMA controller
• Bus mastering of DMA controller – grabs bus from CPU
• Cycle stealing from CPU but still much more efficient
• When done, interrupts to signal completion

11 May 2023 Nisha ACSE0403A OS Unit 5 49


Characteristics of I/O Devices(CO5)

11 May 2023 Nisha ACSE0403A OS Unit 5 50


Characteristics of I/O Devices(CO5)
• Subtleties of devices handled by device drivers

• Broadly I/O devices can be grouped by the OS into

• Block I/O

• Character I/O (Stream)

• Memory-mapped file access

• Network sockets

• For direct manipulation of I/O device specific characteristics, usually an


escape / back door

• Unix ioctl() call to send arbitrary bits to a device control register and
data to device data register

11 May 2023 Nisha ACSE0403A OS Unit 5 51


Block and Character Devices(CO5)
• Block devices include disk drives

• Commands include read, write, seek

• Raw I/O, direct I/O, or file-system access

• Memory-mapped file access possible

File mapped to virtual memory and clusters brought via demand paging

• DMA

• Character devices include keyboards, mice, serial ports

• Commands include get(), put()

• Libraries layered on top allow line editing

11 May 2023 Nisha ACSE0403A OS Unit 5 52


Network Devices(CO5)

• Subtleties of devices handled by device drivers

• Broadly I/O devices can be grouped by the OS into


• Block I/O
• Character I/O (Stream)
• Memory-mapped file access
• Network sockets
• For direct manipulation of I/O device specific
characteristics, usually an escape / back door

• Unix ioctl() call to send arbitrary bits to a device


control register and data to device data register

11 May 2023 Nisha ACSE0403A OS Unit 5 53


I/O Protection(CO5)

• User process may accidentally or purposefully attempt to disrupt normal


operation via illegal I/O instructions

• All I/O instructions defined to be privileged

• I/O must be performed via system calls

• Memory-mapped and I/O port memory locations must be protected too

11 May 2023 Nisha ACSE0403A OS Unit 5 54


Disk Storage(CO 5)
Disk storage (also sometimes called drive storage) is a general category of storage mechanisms where data is
recorded by various electronic, magnetic, optical, or mechanical changes to a surface layer of one or more
rotating disks.
A disk drive is a device implementing such a storage mechanism.

11 May 2023 Nisha ACSE0403A OS Unit 5 55


Disk structure(CO5)

11 May 2023 Nisha ACSE0403A OS Unit 5 56


Disk structure(CO5)

• Disk drives are addressed as large 1-dimensional arrays of logical blocks, where the
logical block is the smallest unit of transfer.
• The 1-dimensional array of logical blocks is mapped onto the sectors of the disk
sequentially.
–Sector 0 is the first sector of the first track on the outermost cylinder.
–Mapping proceeds in order through that track, then the rest of the tracks in that
cylinder, and then through the rest of the cylinders from outermost to innermost.

11 May 2023 Nisha ACSE0403A OS Unit 5 57


Disk Access Time(CO5)

• seek time: time to position heads on cylinder (a fixed head disk does not require seek time
but is more expensive than a moving-head disk)
• rotational latency: delay in accessing material once seek accomplished (time required to wait
for data to rotate around under head)
• Transmission time: time to transfer information once it is under the head.
• access time = seek time + rotational latency
+read/write transmission time
seek time >> read/write time

11 May 2023 Nisha ACSE0403A OS Unit 5 58


Disk Scheduling(CO5)

• The operating system is responsible for using hardware efficiently — for the disk drives,
this means having a fast access time and disk bandwidth.
–Disk bandwidth is the total number of bytes transferred, divided by the total time
between the first request for service and the completion of the last transfer.
• Accomplish this by minimizing seek time
–Seek time approximates seek distance

11 May 2023 Nisha ACSE0403A OS Unit 5 59


Disk I/O Request(CO5)
Disk I/O request specifies
• whether the operation is input or output
• disk address (block number, which is translated into drive, cylinder, surface, and sector
coordinates)
• memory address to copy to or from
• byte count giving the amount of information to be transferred

11 May 2023 Nisha ACSE0403A OS Unit 5 60


Disk Scheduling(CO5)

• Many requests may be pending at once. Which should be handled first?


• Head moving strategy developed
• Attempting to manage the overall disk seek time. Latency is not controllable and transfer time
depends on the size of the transfer request
• Different strategies:
–FCFS
–SSTF
–SCAN
–LOOK

11 May 2023 Nisha ACSE0403A OS Unit 5 61


FCFS Scheduling(CO5)

• Simplest form
• First-come, first-served scheduling
• Requests served in order of arrival
• Advantage: simple queueing
• Disadvantage: does not provide the “best” seek time

11 May 2023 Nisha ACSE0403A OS Unit 5 62


FCFS(CO5)
Illustration shows total head movement of 640 cylinders

11 May 2023 Nisha ACSE0403A OS Unit 5 63


SSTF(CO5)
•Shortest Seek Time First selects the request with the minimum seek time from the current head
position
•SSTF scheduling is a form of SJF scheduling; may cause starvation of some requests.
•Illustration shows total head movement of 236 cylinders

11 May 2023 Nisha ACSE0403A OS Unit 5 64


SSTF(CO5)

11 May 2023 Nisha ACSE0403A OS Unit 5 65


SCAN(CO5)

•The disk arm starts at one end of the disk, and moves toward the other end, servicing requests
until it gets to the other end of the disk, where the head movement is reversed and servicing
continues

•SCAN algorithm sometimes called the elevator algorithm

•Illustration shows total head movement of 208 cylinders

11 May 2023 Nisha ACSE0403A OS Unit 5 66


Daily Quiz-1

1. Differentiate between the seek time and rotational latency.


2. In _______ information is recorded magnetically on platters.
a) magnetic disks
b) electrical disks
c) assemblies
d) cylinders

3. The heads of the magnetic disk are attached to a _____ that moves all the heads as a unit.
a) spindle
b) disk arm
c) track

11 May 2023 Nisha ACSE0403A OS Unit 5 67


SCAN(CO5)

11 May 2023 Nisha ACSE0403A OS Unit 5 68


C-SCAN(CO5)

•Provides a more uniform wait time than SCAN


•The head moves from one end of the disk to the other, servicing requests as it goes
when it reaches the other end, however, it immediately returns to the beginning of the
disk, without servicing any requests on the return trip
•Treats the cylinders as a circular list that wraps around from the last cylinder to the first one

11 May 2023 Nisha ACSE0403A OS Unit 5 69


C-SCAN(CO5)

11 May 2023 Nisha ACSE0403A OS Unit 5 70


LOOK & C-LOOK(CO5)
•LOOK a version of SCAN, C-LOOK a version of C-SCAN

•Arm only goes as far as the last request in each direction, then reverses direction
immediately, without first going all the way to the end of the disk

11 May 2023 Nisha ACSE0403A OS Unit 5 71


C-LOOK(CO5)

11 May 2023 Nisha ACSE0403A OS Unit 5 72


Selecting a Disk-Scheduling Algorithm(CO5)

•SSTF is common and has a natural appeal for low load disks (quickly go to next request)
•LOOK, C-LOOK, SCAN and C-SCAN perform better for systems that place a heavy load on the disk (no
starvation, more predictable delays)
•Performance depends on the number and types of requests
•Requests for disk service can be influenced by the
file-allocation method

11 May 2023 Nisha ACSE0403A OS Unit 5 73


Disk Management(CO5)

•Low-level formatting, or physical formatting — Dividing a disk into sectors that the disk controller
can read and write
•Each sector can hold header information, plus data, plus error correction code (ECC)
•Usually 512 bytes of data but can be selectable
•To use a disk to hold files, the operating system still needs to record its own data structures on the
disk
•Partition the disk into one or more groups of cylinders, each treated as a logical disk
•Logical formatting or “making a file system”
•To increase efficiency most file systems group blocks into clusters
•Disk I/O done in blocks
•File I/O done in clusters of blocks

11 May 2023 Nisha ACSE0403A OS Unit 5 74


Disk Management(CO5)

•Raw disk access for apps that want to do their own block management, keep OS out of the
way (databases for example)
•Boot block initializes system
•The bootstrap is stored in ROM
•Bootstrap loader program stored in boot blocks of boot partition
•Methods such as sector sparing used to handle bad blocks

11 May 2023 Nisha ACSE0403A OS Unit 5 75


Daily Quiz-2
1. Consider a disk queue with requests for I/O to blocks on cylinders.
98 183 37 122 14 124 65 67
Considering FCFS (first cum first served) scheduling, the total number of head movements is, if
the disk head is initially at 53 is?
a) 600
b) 620
c) 630
d) 640
2. Consider a disk queue with requests for I/O to blocks on cylinders.
98 183 37 122 14 124 65 67
Considering SSTF (shortest seek time first) scheduling, the total number of head movements is,
if the disk head is initially at 53 is?
a) 224
b) 236
c) 245
d) 240
11 May 2023 Nisha ACSE0403A OS Unit 5 76
Daily Quiz-2
3. SSTF algorithm, like SJF __________ of some requests.
a) may cause starvation
b) will cause starvation
c) does not cause starvation
d) causes aging

4. In the ______ algorithm, the disk arm starts at one end of the disk and moves toward the other
end, servicing requests till the other end of the disk. At the other end, the direction is reversed
and servicing continues.
a) LOOK
b) SCAN
c) C-SCAN
d) C-LOOK

11 May 2023 Nisha ACSE0403A OS Unit 5 77


Booting from a Disk in Windows(CO5)

11 May 2023 Nisha ACSE0403A OS Unit 5 78


Directory Structure(CO5)

• Directory can be defined as the listing of the related files on the disk. The directory may
store some or the entire file attributes.
• To get the benefit of different file systems on the different operating systems, A hard disk
can be divided into the number of partitions of different sizes. The partitions are also
called volumes or mini disks.
• Each partition must have at least one directory in which, all the files of the partition can
be listed. A directory entry is maintained for each file in the directory which stores all the
information related to that file.

11 May 2023 Nisha ACSE0403A OS Unit 5 79


Directory Structure
Directory Structure(CO5)

11 May 2023 Nisha ACSE0403A OS Unit 5 80


Single Level Directory(CO5)

The simplest method is to have one big list of all the files on the disk. 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.

11 May 2023 Nisha ACSE0403A OS Unit 5 81


Single Level Directory(CO5)

Characteristics :
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.
• 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 and limits the number of files in the system
because most of the Operating System limits the number of characters used to construct the file
name.

11 May 2023 Nisha ACSE0403A OS Unit 5 82


Two Level3Directory(CO5)

In two level directory systems, we can create a separate directory for each user. 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.

11 May 2023 Nisha ACSE0403A OS Unit 5 83


Characteristics Two
of
wotwo levelDirectory(CO5)
Level
Level directory system
Directory(CO5)

Characteristics :
• Each file 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 use

11 May 2023 Nisha ACSE0403A OS Unit 5 84


system
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. However,
the user has the permission to read the root's data but he cannot write or modify this.
Only administrator of the system has the complete access of root 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.

11 May 2023 Nisha ACSE0403A OS Unit 5 85


system
Tree structured directory

11 May 2023 Nisha ACSE0403A OS Unit 5 86


File Concept(CO5)

•Contiguous logical address space


•File = collection of related information recorded on secondary storage

•Types:
•Data File “interpretation” is up to user/program
•Numeric (text, ASCII; “LINE_MAX” bytes)
•Character (text, ASCII; “LINE_MAX” bytes)
•Binary (executable, readable by computer)
•Program

11 May 2023 Nisha ACSE0403A OS Unit 5 87


File Concept(CO5)
File
A file is a named collection of related information that is recorded on secondary storage such as magnetic
disks, magnetic tapes and optical disks. In general, a file is a sequence of bits, bytes, lines or records whose
meaning is defined by the file creator and user.

File Structure
• A File Structure should be according to a required format that the operating system can understand.
• A file has a certain defined structure according to its type.
• A text file is a sequence of characters organized into lines.
• A source file is a sequence of procedures and functions.
• An object file is a sequence of bytes organized into blocks that are understandable by the machine.
• When operating system defines different file structures, it also contains the code to support these file
structures. Unix, MS-DOS support minimum number of files.

11 May 2023 Nisha ACSE0403A OS Unit 5 88


File Attributes(CO5)

• Name – only information kept in human-readable form

• Identifier – unique tag (number) identifies file within file system

• Type – needed for systems that support different types

• Location – pointer to file location on device

• Size – current file size

• Protection (ACL) – controls who can do reading, writing, executing

• Time, date, and user identification – data for protection, security, and usage monitoring

• Information about files are kept in the directory structure, which is maintained on the disk

11 May 2023 Nisha ACSE0403A OS Unit 5 89


File Operations(CO5)
• File is an abstract data type

• Basic operations on files:


– Create
– Write
– Read
– Reposition within file
– Delete
– Truncate
• Open(Fi) – search the directory structure on disk for entry Fi, and move the content of entry to
memory

• Close (Fi) – move the content of entry Fi in memory back to directory structure on disk

• Opening files: “remember” used files; efficiency; convenience

11 May 2023 Nisha ACSE0403A OS Unit 5 90


File Types – Name, Extension(CO5)

11 May 2023 Nisha ACSE0403A OS Unit 5 91


Access Methods(CO5)

• Sequential Access
read next
write next
reset
skip forward
• Direct Access
read n
write n
position to n
read next
write next
rewrite n
n = relative block number

11 May 2023 Nisha ACSE0403A OS Unit 5 92


Sequential-Access File(CO5)

11 May 2023 Nisha ACSE0403A OS Unit 5 93


Simulation of Sequential Access on
Direct-Access File(CO5)

11 May 2023 Nisha ACSE0403A OS Unit 5 94


Indexed Access

• If a file can be sorted on any of the filed then an index can be assigned to a group of certain records.
However, A particular record can be accessed by its index. The index is nothing but the address of a
record in the file.
• In index accessing, searching in a large database became very quick and easy but we need to have
some extra space in the memory to store the index value.

11 May 2023 Nisha ACSE0403A OS Unit 5 95


Allocation Methods(CO5)
An allocation method refers to how disk blocks are allocated for files.
•Allocation Methods:
•Contiguous allocation
•Linked allocation
•Indexed allocation

11 May 2023 Nisha ACSE0403A OS Unit 5 96


Contiguous allocation(CO5)

Contiguous allocation :
•each file occupies set of contiguous blocks
•Provides efficient direct access.
•Simple – only starting location (block #) and length (number of blocks) are required
•Both sequential and direct access can be supported
•First fit and best fit are the most common used strategies.
•External fragmentation can be a problem
•Best performance in most cases
•Problems include finding space for file, knowing file size, external fragmentation, need for
compaction ,off-line (downtime) or on-line.

11 May 2023 Nisha ACSE0403A OS Unit 5 97


Contiguous allocation(CO5)

11 May 2023 Nisha ACSE0403A OS Unit 5 98


Linked Allocation(CO5)

• Each file is a linked list of fixed-size disk blocks.

• Blocks may be scattered anywhere on the disk.

• Allocate blocks as needed as the file grows, wherever they are available on the disk

• The directory contains a pointer to the first and last blocks of the file.

• Each block contains a pointer to the next block (not accessible by users)

11 May 2023 Nisha ACSE0403A OS Unit 5 99


Linked Allocation(CO5)
• Simple – only need to keep the starting address of each file.

• No external fragmentation. Any free block can be used to satisfy a request for more space.

• Creating a file is easy, declared of size zero (null pointer to the first block) then grow easily

as long as free blocks are available


• No efficient direct access.

• Effective for sequential access.

• Pointers saved in the blocks consume some space

11 May 2023 Nisha ACSE0403A OS Unit 5 100


Linked Allocation(CO5)

• Use of clusters (a set of blocks which the system deals with as a unit)

• Decreases overhead of pointers (4 blocks = 1 cluster needs 1 ptr)

• Increases throughput (fewer head seeks).

• Increases internal fragmentation.

• Reliability: if a pointer is lost, blocks (clusters) can’t be traversed

11 May 2023 Nisha ACSE0403A OS Unit 5 101


Linked Allocation(CO5)

11 May 2023 Nisha ACSE0403A OS Unit 5 102


Indexed Allocation(CO5)

• Each file has its own index block, which is an array of disk-block addresses

• The directory contains the address of the index block, from which the ith block can be accessed

directly

11 May 2023 Nisha ACSE0403A OS Unit 5 103


Indexed Allocation(CO5)

11 May 2023 Nisha ACSE0403A OS Unit 5 104


Indexed Allocation(CO5)

• More efficient direct access than linked allocation.

• No external fragmentation. Any free block can be used to satisfy a request for more space.

• Suffers from a wasted space due to the use of index block. (pointer overhead is larger)

• How large the index block should be? What if a file is too large for one index block?

• Linked scheme: use one block. To allow larger files, link several index blocks

• Multilevel index: use a first-level index block to point to a second-level index blocks

• Combined scheme: used in UNIX.

11 May 2023 Nisha ACSE0403A OS Unit 5 105


Free-Space Management(CO5)
• File system maintains free-space list to track available
blocks/clusters
– (Using term “block” for simplicity)
• Bit vector or bit map (n blocks)

Block number calculation


0 1 2 n-1
(number of bits per word) *

(number of 0-value words) +
offset of first 1 bit


1  block[i] free
bit[i] = CPUs have instructions
0  block[i] occupied to return offset within
word of first “1” bit

11 May 2023 Nisha ACSE0403A OS Unit 5 106


Free-Space Management(CO5)
• Bit map requires extra space
– Example:
block size = 4KB = 212 bytes
disk size = 240 bytes (1 terabyte)
n = 240/212 = 228 bits (or 256 MB)
if clusters of 4 blocks -> 64MB of memory
• Easy to get contiguous files

• Linked list (free list)


– Cannot get contiguous space easily
– No waste of space
– No need to traverse the entire list (if # free blocks recorded)

11 May 2023 Nisha ACSE0403A OS Unit 5 107


Linked Free Space List on Disk(CO5)

• Linked list (free list)


• Cannot get
contiguous space
easily
• No waste of space
• No need to traverse
the entire list (if # free
blocks recorded)

11 May 2023 Nisha ACSE0403A OS Unit 5 108


Free-Space Management(CO5)

• Grouping

– Modify linked list to store address of next n-1 free blocks in first free block,
plus a pointer to next block that contains free-block-pointers (like this one)

• Counting

– Because space is frequently contiguously used and freed, with contiguous-


allocation allocation, extents, or clustering.

– Keep address of first free block and count of following free blocks.

– Free space list then has entries containing addresses and counts

11 May 2023 Nisha ACSE0403A OS Unit 5 109


Bit Vector

• In this approach, the free space list is implemented as a bit map vector. It contains
the number of bits where each bit represents each block.
• If the block is empty then the bit is 1 otherwise it is 0. Initially all the blocks are
empty therefore each bit in the bit map vector contains 1.
• LAs the space allocation proceeds, the file system starts allocating blocks to the files
and setting the respective bit to 0.

11 May 2023 Nisha ACSE0403A OS Unit 5 110


Linked List

• It is another approach for free space management. This approach suggests linking
together all the free blocks and keeping a pointer in the cache which points to the
first free block.
• Therefore, all the free blocks on the disks will be linked together with a pointer.
Whenever a block gets allocated, its previous free block will be linked to its next
free block.

11 May 2023 Nisha ACSE0403A OS Unit 5 111


Daily Quiz-3

1. What is file. Write the operation of a file

2. Explain the different directory level structure.

3. Write down the various file access and allocation scheme.

4. Explain any two free space management techniques.

11 May 2023 Nisha ACSE0403A OS Unit 5 112


Daily Quiz-5
1. To organize file systems on disk _______________
a) they are split into one or more partitions
b) information about files is added to each partition
c) they are made on different storage spaces
d) all of the mentioned
2. What will happen in the single level directory?
a) All files are contained in different directories all at the same level
b) All files are contained in the same directory
c) Depends on the operating system
d) None of the mentioned
3. File attributes consist of ____________
a) name
b) type
c) identifier
d) all of the mentioned
11 May 2023 Nisha ACSE0403A OS Unit 5 113
Daily Quiz-6
4. The three major methods of allocating disk space that are in wide use are _____________
a) contiguous
b) linked
c) indexed
d) all of the mentioned
5. In linked allocation _____________
a) each file must occupy a set of contiguous blocks on the disk
b) each file is a linked list of disk blocks
c) all the pointers to scattered blocks are placed together in one location
d) none of the mentioned
6. In indexed allocation _____________
a) each file must occupy a set of contiguous blocks on the disk
b) each file is a linked list of disk blocks
c) all the pointers to scattered blocks are placed together in one location
d) none of the mentioned

11 May 2023 Nisha ACSE0403A OS Unit 5 114


Threats to Protection and Security
• Protection and security requires that computer resources such as CPU, software's, memory etc. are
protected. This extends to the operating system as well as the data in the system. This can be done
by ensuring integrity, confidentiality and availability in the operating system. The system must be
protect against unauthorized access, viruses, worms etc.

• Threats to Protection and Security


A threat is a program that is malicious in nature and leads to harmful effects for the system.
Some of the common threats that occur in a system are −
Virus
Viruses are generally small snippets of code embedded in a system. They are very dangerous and can
corrupt files, destroy data, crash systems etc. They can also spread further by replicating themselves
as required.
Trojan Horse
A trojan horse can secretly access the login details of a system. Then a malicious user can use these
to enter the system as a harmless being and wreak havoc.

11 May 2023 Nisha ACSE0403A OS Unit 5 115


Threats to Protection and Security

• Trap Door
A trap door is a security breach that may be present in a system
without the knowledge of the users. It can be exploited to harm the data or files
in a system by malicious people.
• Worm
A worm can destroy a system by using its resources to extreme levels. It
can generate multiple copies which claim all the resources and don't allow
any other processes to access them. A worm can shut down a whole network in
this way.
• Denial of Service
These type of attacks do not allow the legitimate users to access a
system. It overwhelms the system with requests so it is overwhelmed and
cannot work properly for other user

11 May 2023 Nisha ACSE0403A OS Unit 5 116


Protection and Security Methods

• The different methods that may provide protect and security for different computer systems are −
• Authentication
This deals with identifying each user in the system and making sure they are who they
claim to be. The operating system makes sure that all the users are authenticated before they
access the system. The different ways to make sure that the users are authentic are:
• Username/ PasswordEach user has a distinct username and password combination and they need
to enter it correctly before they can access the system.
• User Key/ User CardThe users need to punch a card into the card slot or use they individual key
on a keypad to access the system.
• User Attribute IdentificationDifferent user attribute identifications that can be used are
fingerprint, eye retina etc.

11 May 2023 Nisha ACSE0403A OS Unit 5 117


Protection and Security Methods

One Time Password


These passwords provide a lot of security for authentication purposes. A one time password
can be generated exclusively for a login every time a user wants to enter the system. It cannot
be used more than once. The various ways a one time password can be implemented are −
Random Numbers
The system can ask for numbers that correspond to alphabets that are pre arranged. This
combination can be changed each time a login is required.
Secret Key
A hardware device can create a secret key related to the user id for login. This key can change
each time.

11 May 2023 Nisha ACSE0403A OS Unit 5 118


RAID Structure(CO5)

•RAID – redundant array of inexpensive/independent disks


•Multiple disk drives provides reliability via redundancy
•Increases the mean time to failure
•Mean time to repair – exposure time when another failure could cause data loss
•Mean time to data loss based on above factors
•If mirrored disks fail independently, consider disk with 100,000 mean time to failure and 10 hour
mean time to repair
•Mean time to data loss is 100,0002 / (2 ∗ 10) = 500 ∗ 106 hours, or 57,000 years!
•Frequently combined with NVRAM to improve write performance
•RAID is arranged into six different levels

11 May 2023 Nisha ACSE0403A OS Unit 5 119


RAID(CO5)
•Several improvements in disk-use techniques involve the use of multiple disks
working cooperatively
•Disk striping uses a group of disks as one storage unit
•RAID schemes improve performance and improve the reliability of the storage
system by storing redundant data
•Mirroring or shadowing (RAID 1) keeps duplicate of each disk
•Striped mirrors (RAID 1+0) or mirrored stripes (RAID 0+1) provides high
performance and high reliability
•Block interleaved parity (RAID 4, 5, 6) uses much less redundancy.

11 May 2023 Nisha ACSE0403A OS Unit 5 120


RAID(CO5)

•RAID within a storage array can still fail if the array fails, so automatic replication of the data
between arrays is common
•Frequently, a small number of hot-spare disks are left unallocated, automatically replacing a
failed disk and having data rebuilt onto them

11 May 2023 Nisha ACSE0403A OS Unit 5 121


RAID Levels(CO5)

11 May 2023 Nisha ACSE0403A OS Unit 5 122


RAID (0 + 1) and (1 + 0)(CO5)

11 May 2023 Nisha ACSE0403A OS Unit 5 123


Faculty Video Links, Youtube & NPTEL Video Links and Online
Courses Details

Youtube/other Video Links

• https://www.youtube.com/watch?v=aKmuGwHj3Cw
• https://www.youtube.com/playlist?list=PLmXKhU9FNesSFvj6gASuWmQd23Ul5omtD
• https://www.youtube.com/watch?v=Fizc0nXRm2g
• https://www.youtube.com/watch?v=RgYU5r9A5TU
• https://nptel.ac.in/courses/106108101

11 May 2023 Nisha ACSE0403A OS Unit 5 124


Daily Quiz

1. In the ______ algorithm, the disk arm starts at one end of the disk and moves toward
the other end, servicing requests till the other end of the disk. At the other end, the
direction is reversed and servicing continues.
A. LOOK
B. SCAN
C. C-SCAN
D. C-LOOK
2. In the sequential access method, information in the file is processed ____________
A. one disk after the other, record access doesnt matter
B. one record after the other
C. one text document after the other
D. none of the mentioned

11 May 2023 Nisha ACSE0403A OS Unit 5 125


Daily Quiz

3. Random access in magnetic tapes is _________ compared to magnetic disks.


A. Fast
B. very fast
C. Slow
D. very slow

4. Whenever a process needs I/O to or from a disk it issues a ______________


A. system call to the CPU
B. system call to the operating system
C. a special procedure
D. all of the mentioned

11 May 2023 Nisha ACSE0403A OS Unit 5 126


Daily Quiz

5. Virtual memory uses disk space as an extension of _________

A. secondary storage
B. main memory
C. tertiary storage
D. none of the mentioned

6. RAID stands for ____________


A. Redundant Allocation of Inexpensive Disks
B. Redundant Array of Important Disks
C. Redundant Allocation of Independent Disks
D. Redundant Array of Independent Disks

11 May 2023 Nisha ACSE0403A OS Unit 5 127


Daily Quiz

7. Consider a disk queue with requests for I/O to blocks on cylinders 98 183 37 122 14
124 65 67
Considering FCFS (first come first served) scheduling, the total number of head
movements is, if the disk head is initially at 53 is?
A. 600
B. 620
C. 630
D. 640
8. Data cannot be written to secondary storage unless written within a ______
A. File
B. swap space
C. directory
D. text format

11 May 2023 Nisha ACSE0403A OS Unit 5 128


Daily Quiz
9. In the ______ algorithm, the disk arm starts at one end of the disk and moves toward
the other end, servicing requests till the other end of the disk. At the other end, the
direction is reversed and servicing continues.
A. LOOK
B. SCAN
C. C-SCAN
D. C-LOOK

10. In the ______ algorithm, the disk arm goes as far as the final request in each direction,
then reverses direction immediately without going to the end of the disk.
A. LOOK
B. SCAN
C. C-SCAN
D. C-LOOK

11 May 2023 Nisha ACSE0403A OS Unit 5 129


MCQ

1. In the sequential access method, information in the file is processed ____________

A. one disk after the other, record access doesnt matter


B. one record after the other
C. one text document after the other
D. none of the mentioned

2. What will happen in the single level directory?

A. All files are contained in different directories all at the same level
B. All files are contained in the same directory
C. Depends on the operating system
D. None of the mentioned

11 May 2023 Nisha ACSE0403A OS Unit 5 130


MCQ
3. What will happen in the two level directory structure?

A. each user has his/her own user file directory


B. the system doesn’t its own master file directory
C. all of the mentioned
D. none of the mentioned

4. Which of the following are the types of Path names?

A. absolute & relative


B. local & global
C. global & relative
D. relative & local

11 May 2023 Nisha ACSE0403A OS Unit 5 131


MCQ

5. The three major methods of allocating disk space that are in wide use are
_____________

A. Contiguous
B. Linked
C. Indexed
D. all of the mentioned

6. In indexed allocation _____________

A. each file must occupy a set of contiguous blocks on the disk


B. each file is a linked list of disk blocks
C. all the pointers to scattered blocks are placed together in one location
D. none of the mentioned

11 May 2023 Nisha ACSE0403A OS Unit 5 132


MCQ
7. One difficulty of contiguous allocation is _____________

A. finding space for a new file


B. inefficient
C. Costly
D. time taking

8. In indexed allocation _____________

A. each file must occupy a set of contiguous blocks on the disk


B. each file is a linked list of disk blocks
C. all the pointers to scattered blocks are placed together in one location
D. none of the mentioned

11 May 2023 Nisha ACSE0403A OS Unit 5 133


MCQ
9. Indexed allocation _________ direct access.

A. Supports
B. does not support
C. is not related to
D. none of the mentioned

10. Consider a disk where blocks 2, 3, 4, 5, 8, 9, 10, 11, 12, 13, 17, 18, 25, 26 and 27 are
free and the rest of the blocks are allocated. Then the free space bitmap would be
_____________

A. 10000110000001110011111100011111…
B. 110000110000001110011111100011111…
C. 01111001111110001100000011100000…
D. 001111001111110001100000011100000

11 May 2023 Nisha ACSE0403A OS Unit 5 134


Weekly Assignment

1. Explain Seek Time and Rotational Latency

2. Discuss the file access mechanisms

3. Explain Seek Time and Rotational Latency

4. Name the file allocation methods

5. Write the full form of RAID

11 May 2023 Nisha ACSE0403A OS Unit 5 135


Glossary Question
(C-SCAN, Supports, the request will be placed in the queue of pending requests for
that drive, system call to the operating system)

1. Indexed allocation _________ direct access.

2. In __________ disk scheduling algorithm, the disk head moves from one end to other
end of the disk, serving the requests along the way. When the head reaches the other end,
it immediately returns to the beginning of the disk without serving any requests on the
return trip.

3. Whenever a process needs I/O to or from a disk it issues a ______________

4. If a process needs I/O to or from a disk, and if the drive or controller is busy then
____________

11 May 2023 Nisha ACSE0403A OS Unit 5 136


Old Question Papers

11 May 2023 Nisha ACSE0403A OS Unit 5 137


Old Question Papers

11 May 2023 Nisha ACSE0403A OS Unit 5 138


Old Question Papers

11 May 2023 Nisha ACSE0403A OS Unit 5 139


Old Question Papers

11 May 2023 Nisha ACSE0403A OS Unit 5 140


Old Question Papers

Last 12 Years University paper Link:-

https://drive.google.com/drive/folders/1UPXvZ7NY09OunSLrEkTFWpw_M3xLzjhs?usp=sharing

11 May 2023 Nisha ACSE0403A OS Unit 5 141


Expected Questions for University Exam

1. What are the different file organizations? Discuss access mechanisms in detail.

2. Discuss FCFS, CSCAN, LOOK and CLOOK disk scheduling algorithms with
example.

3. Explain different levels of RAID file structure.

4. Discuss various File allocation methods.

11 May 2023 Nisha ACSE0403A OS Unit 5 142


Expected Questions for University Exam

5. Suppose the moving head disk with 300 cylinders is currently serving a request at track
47 and has just finished a request track 63. If the queue of request is kept in FIFO
order58,37,148,90,97,193,225,24. Explain are total head movements for the following Disk
scheduling algorithm?
i. FCFS ii. SSTF iii. C-SCAN iv. C LOOK

6. Differentiate between Blocking and Non blocking I/O

11 May 2023 Nisha ACSE0403A OS Unit 5 143


Recap of Unit

In this module, we have studied the following:


• I/O Devices,
• and I/O Subsystems, I
• /O Buffering, I/O Ports
• Disk structure
• Disk Scheduling Algorithms
• FCFS
• SSTF
• SCAN
• C-SCAN
• LOOK
• C-LOOK

11 May 2023 Nisha ACSE0403A OS Unit 5 144


Recap of Unit

• Disk Management
• RAID
• File access methods
• Directory structure
• File sharing and protection

• File allocation methods


• Contiguous allocation
• Linked allocation
• Indexed allocation
• Free space management

11 May 2023 Nisha ACSE0403A OS Unit 5 145


References

Books :
1. Silberschatz, Galvin and Gagne, “Operating Systems Concepts”, Wiley
2. SibsankarHalder and Alex A Aravind, “Operating Systems”, Pearson Education
3. Harvey M Dietel, “ An Introduction to Operating System”, Pearson Education
4. D M Dhamdhere, “Operating Systems : A Concept basedApproach”, McGraw Hill.
5. Charles Crowley, “Operating Systems: A Design-Oriented Approach”, Tata McGraw Hill
Education”.
6. Stuart E. Madnick & John J. Donovan, “ Operating Systems”, Tata McGraw

11 May 2023 Nisha ACSE0403A OS Unit 5 146


References

Books :
1. Silberschatz, Galvin and Gagne, “Operating Systems Concepts”, Wiley
2. SibsankarHalder and Alex A Aravind, “Operating Systems”, Pearson Education
3. Harvey M Dietel, “ An Introduction to Operating System”, Pearson Education
4. D M Dhamdhere, “Operating Systems : A Concept basedApproach”, McGraw Hill.
5. Charles Crowley, “Operating Systems: A Design-Oriented Approach”, Tata McGraw Hill
Education”.
6. Stuart E. Madnick & John J. Donovan, “ Operating Systems”, Tata McGraw

11 May 2023 Nisha ACSE0403A OS Unit 5 147


11 May 2023 Nisha ACSE0403A OS Unit 5 148

You might also like