implimenting file system
TRANSCRIPT
SEMINAR ON OPERATING SYSTEM
Topic : Implementing a file Structure
By..
Anand M. Khandare
M.Sc. - I
CONTENT :
File System Structure Allocation Methods Free Space Management Disk Structure Disk Scheduling Algorithm Disk Management RAID (concept) I/O System
2
Anand
04
/15
/23
FILE SYSTEM STRUCTURE
File structure Logical storage unit Collection of related information
File system resides on secondary storage (disks) Provided user interface to storage, mapping logical to
physical Provides efficient and convenient access to disk by
allowing data to be stored, located retrieved easily Disk provides in-place rewrite and random access
I/O transfers performed in blocks of sectors (usually 512 bytes)
File control block – storage structure consisting of information about a file
Device driver controls the physical device File system organized into layers 3
Anand
04
/15
/23
LAYERED FILE SYSTEM
4
Anand
04
/15
/23
ALLOCATION METHODS
Why Allocation Method ? Utilization Of Disk Space
Effectively To Increase the Accession Speed
Major Method of Allocation:ContiguousLinked Indexes
5
Anand
04
/15
/23
Contiguous Allocation
A Set Of Contiguous Block Example : IMB VM/CMS Access :
Sequential Direct
6
Anand
04
/15
/23
CONTIGUOUS ALLOCATION OF DISK SPACE
7
Anand
04
/15
/23
PROBLEMS
Finding Space For new File? Chosen To manage free space determine ,
how this task complete ?Solutions : First fit And Best Fit
External FragmentationSolution: Floppy Disk
Time consuming Operation solution : Preallocation , Modified Contiguous
Allocation Scheme8
Anand
04
/15
/23
LINKED ALLOCATION
Solved All problems of Contiguous allocation Linked list of disk block Contains a Pointer. Block Size 512 bytes Initially Pointer is nil . No external Fragmentation
9
Anand
04
/15
/23
LINKED ALLOCATION
10
Anand
04
/15
/23
PROBLEMS
Used only for sequential Access file A pointer require a disk Space About 0.78% Solution:1. collections of block in clusters .2.FAT What happen when Pointer were lost or
damage? Solution: Sore the file name and relative
block number in each block11
Anand
04
/15
/23
INDEXED ALLOCATION METHODS
Fragmentation And Size declaration Problem in contiguous can`t solve with out FAT.
Bringing all pointers At ONE locations. Each file one Index block Support Direct access.
Linked scheme Multilevel index Combined Scheme
12
Anand
04
/15
/23
EXAMPLE OF INDEXED ALLOCATION
13
Anand
04
/15
/23
PROBLEMS
In the case if file if the file is small then you are create one index?
14
Anand
04
/15
/23
REUSEThe concept of Reusing in Computer Science
15
Anand
04
/15
/23
FREE-SPACE MANAGEMENT
Reuse the space Reuse is not physically possible. Free Space list Different way to Management
Bit Vector Linked list Grouping Counting
16
Anand
04
/15
/23
BIT VECTOR OR BIT MAP
…
0 1 2 n-1
bit[i] = 1 block[i] free
0 block[i] occupied
1 And 0 traversing bit by bit
17
Anand
04
/15
/23
LINKED FREE SPACE LIST ON DISK
Link together all the free disk , blocks , keeping pointer to first free block in special location on the disk And catching it in the memory
It is efficient as compare to bit vector In FAT method incorporates free block
accounting
18
Anand
04
/15
/23
EXAMPLE
19
Anand
04
/15
/23
DISK STRUCTURE
20
Anand
04
/15
/23
DISK STRUCTURE
Large one dimensional array of logical block Logical block – Smallest unit of transfer (512 byte) CLV( Constant Linear Velocity)
CD-ROM DVD-ROM
CAV(Constant Angular Velocity) HDD
21
Anand
04
/15
/23
DISK SCHEDULING
Why Disk Scheduling ? Use the hardware efficiently Fast access time Large disk Bandwidth“Bandwidth” is total no of byte
transferred ,divided by the total time between the first request for service and completion of the last transfer.
Way for Disk Scheduling FCFS Scheduling SSTF Scheduling SCAN Scheduling C- SCAN Scheduling LOOK
22
Anand
04
/15
/23
FCFS SCHEDULING First Come First Serve Simple to manipulate Does not provide fastest service
04
/15
/23
23
Anand
SSTF SCHEDULING Shortest Seek Time First Select the request with the minimum seek
time SSTF may cause starvation of some requests
04
/15
/23
24
Anand
SCAN SCHEDULING Variant of SCAN design to provide It immediately returns beginning of the disk SCAN algorithm Sometimes called the elevator
algorithm
04
/15
/23
25
Anand
C- SCAN SCHEDULING Provides a more uniform wait time than SCAN Reverse of SCAN
04
/15
/23
26
Anand
LOOK SCHEDULING Combination of SCAN and C- SCAN They look for request before continuing to
move in the given direction
04
/15
/23
27
Anand
DISK MANAGEMENT Disk initialization Booting from Disk Bad Block Recovery Boot block Disk Formatting
Low Level Physical/high level
04
/15
/23
28
Anand
BOOT BLOCK
Contain The machine Code Loaded in RAM We can Select boot device Boot Start up in ROM A disk that has boot partition is called system
Disk/Boot Disk
04
/15
/23
29
Anand
DIAGRAMMATIC REPRESENTATION :0
4/1
5/2
3
30
Anand
SWAP-SPACE MANAGEMENT
“Swap-space” Virtual memory uses disk space as an extension of main memory
Moving Entire process Between disk And Main Memory
Modern operating system implementation Low Level Task Swap Space use Swap space Location
raw
04
/15
/23
31
Anand
RAID
Redundant Array Of Inexpensive Disks Data storage virtualization technology Purposes of data redundancy or performance
improvement An error protection scheme
04
/15
/23
32
Anand
I/O SYSTEMS
Main job of computer I/O Hardware I/O Services provided by the OS Control I/O operation and divices
04
/15
/23
33
Anand
I/O HARDWARE
Storage Devices Transmission devices Human interface device Communicate via signal
04
/15
/23
34
Anand
INTERRUPTS
signal to the processor emitted by hardware or software Hardware Interrupt Software Interrupt
Interrupts Request Line Interrupts Handler
04
/15
/23
35
Anand
DMA
Direct memory access (DMA) is a feature of computerized systems that allows certain hardware subsystems to access main system memory independently of the central processing unit
04
/15
/23
36
Anand
APPLICATION OF I/O INTERFACE
I/O is the communication between an information processing system (such as a computer) and the outside world, possibly a human or another information processing system. Inputs are the signals or data received by the system and outputs are the signals or data sent from it
04
/15
/23
37
Anand
KERNEL OF I/O SUB SYSTEM
04
/15
/23
38
Anand
REFERENCES
Wikipidia.com Operating System Principle
by..
ABRAHAM SILBERSCHATZ
GREG GAGNE
PETERBAER GALVIN
04
/15
/23
39
Anand
04
/15
/23
40
Anand
04
/15
/23
41
Anand