implimenting file system

41
SEMINAR ON OPERATING SYSTEM Topic : Implementing a file Structure By.. Anand M. Khandare M.Sc. - I

Upload: anand-khandare

Post on 31-Jul-2015

55 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Implimenting file system

SEMINAR ON OPERATING SYSTEM

Topic : Implementing a file Structure

By..

Anand M. Khandare

M.Sc. - I

Page 2: Implimenting file system

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

Page 3: Implimenting file system

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

Page 4: Implimenting file system

LAYERED FILE SYSTEM

4

Anand

04

/15

/23

Page 5: Implimenting file system

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

Page 6: Implimenting file system

Contiguous Allocation

A Set Of Contiguous Block Example : IMB VM/CMS Access :

Sequential Direct

6

Anand

04

/15

/23

Page 7: Implimenting file system

CONTIGUOUS ALLOCATION OF DISK SPACE

7

Anand

04

/15

/23

Page 8: Implimenting file system

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

Page 9: Implimenting file system

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

Page 10: Implimenting file system

LINKED ALLOCATION

10

Anand

04

/15

/23

Page 11: Implimenting file system

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

Page 12: Implimenting file system

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

Page 13: Implimenting file system

EXAMPLE OF INDEXED ALLOCATION

13

Anand

04

/15

/23

Page 14: Implimenting file system

PROBLEMS

In the case if file if the file is small then you are create one index?

14

Anand

04

/15

/23

Page 15: Implimenting file system

REUSEThe concept of Reusing in Computer Science

15

Anand

04

/15

/23

Page 16: Implimenting file system

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

Page 17: Implimenting file system

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

Page 18: Implimenting file system

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

Page 19: Implimenting file system

EXAMPLE

19

Anand

04

/15

/23

Page 20: Implimenting file system

DISK STRUCTURE

20

Anand

04

/15

/23

Page 21: Implimenting file system

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

Page 22: Implimenting file system

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

Page 23: Implimenting file system

FCFS SCHEDULING First Come First Serve Simple to manipulate Does not provide fastest service

04

/15

/23

23

Anand

Page 24: Implimenting file system

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

Page 25: Implimenting file system

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

Page 26: Implimenting file system

C- SCAN SCHEDULING Provides a more uniform wait time than SCAN Reverse of SCAN

04

/15

/23

26

Anand

Page 27: Implimenting file system

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

Page 28: Implimenting file system

DISK MANAGEMENT Disk initialization Booting from Disk Bad Block Recovery Boot block Disk Formatting

Low Level Physical/high level

04

/15

/23

28

Anand

Page 29: Implimenting file system

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

Page 30: Implimenting file system

DIAGRAMMATIC REPRESENTATION :0

4/1

5/2

3

30

Anand

Page 31: Implimenting file system

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

Page 32: Implimenting file system

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

Page 33: Implimenting file system

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

Page 34: Implimenting file system

I/O HARDWARE

Storage Devices Transmission devices Human interface device Communicate via signal

04

/15

/23

34

Anand

Page 35: Implimenting file system

INTERRUPTS

signal to the processor emitted by hardware or software Hardware Interrupt Software Interrupt

Interrupts Request Line Interrupts Handler

04

/15

/23

35

Anand

Page 36: Implimenting file system

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

Page 37: Implimenting file system

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

Page 38: Implimenting file system

KERNEL OF I/O SUB SYSTEM

04

/15

/23

38

Anand

Page 39: Implimenting file system

REFERENCES

Wikipidia.com Operating System Principle

by..

ABRAHAM SILBERSCHATZ

GREG GAGNE

PETERBAER GALVIN

04

/15

/23

39

Anand

Page 40: Implimenting file system

04

/15

/23

40

Anand

Page 41: Implimenting file system

04

/15

/23

41

Anand