Free Space Management, Efficiency & Performance, Recovery and NFS

11,717 views 14 slides Apr 06, 2016
Slide 1
Slide 1 of 14
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14

About This Presentation

A short presentation on Free Space Management, Efficiency & Performance, Recovery and Network File System in operating system.


Slide Content

Free Space Management, Efficiency & Performance, Recovery and NFS Department of Computer Science & Engineering Hamdard University Bangladesh

Free Space Management To keep track of disk space : The system maintains a free space list The free space list records all disk blocks that are free

Various Implementations of Free Space List Bit Vector Linked List Grouping Counting

Bit Vector Free space list is implemented as a bit map or bit vector If the block is free the bit is set to 1 If the block is allocated the bit is set to 0

Bit vector ( n blocks) … 1 2 n-1 bit[ i ] =   block[ i ] free 1  block[ i ] occupied Block number calculation (number of bits per word) * (number of 0-value words) + offset of first 1 bit Bit Vector

Bit map requires extra space. Example: block size = 2 12 bytes (4 K) disk size = 2 30 bytes (1 gigabyte) n = 2 30 /2 12 = 2 18 bits (or 32K bytes) Easy to get contiguous files Linked list (free list) Cannot get contiguous space easily No waste of space Grouping Large free blocks can be quickly found Counting Bit Vector

Linked List Link all free disk blocks together Keep a pointer to the first free block This block contains a pointer to next free block, and so on

Linked Free Space List on Disk Example: Pointer to block 2, as the first free block Block 2 would contain a pointer to block 3, Which would point to block 4, Which would point 5,8,9,10,11,12,13,17,18,25,26,27

Grouping Store addresses of n free blocks in the first free block The first n-1 of these are actually free The last block contains the address as of another free blocks. Block No . Block No . . Block No Block No . Block No Block No Block No . . . Block No Block No . . . First Free block

Counting Based on the fact that several contiguous blocks may be allocated and freed simultaneously Holds the address of the first free block and number “n” of free contiguous blocks that follow the first block Each entry is the free space list consist of a disk address and a count

Counting Entry in a free space list consists of Disk address Count

Efficiency and Performance Efficiency dependent on: disk allocation and directory algorithms types of data kept in file’s directory entry Performance disk cache – separate section of main memory for frequently used blocks free-behind and read-ahead – techniques to optimize sequential access improve PC performance by dedicating section of memory as virtual disk, or RAM disk.

Recovery Techniques Consistency checking – compares data in directory structure with data blocks on disk, and tries to fix inconsistencies Use system programs to back up data from disk to another storage device (floppy disk, magnetic tape, other magnetic disk, optical ) Recover lost file or disk by restoring data from backup

An implementation and a specification of a software system for accessing remote files across LANs (or WANs ). The implementation is part of the Solaris and SunOS operating systems running on Sun workstations using an unreliable datagram protocol (UDP/IP protocol and Ethernet. Network File System (NFS)
Tags