Presentation is loading. Please wait.

Presentation is loading. Please wait.

J.Tiberghien Chapitre 9 Organisation des disques et gestion des fichiers.

Similar presentations


Presentation on theme: "J.Tiberghien Chapitre 9 Organisation des disques et gestion des fichiers."— Presentation transcript:

1 J.Tiberghien Chapitre 9 Organisation des disques et gestion des fichiers

2 J.Tiberghien Disk organization & File Management Physical data recording on magnetic disks Physical organization of data on magnetic disks Logical disk organization –Contiguous blocks –Random blocks: MS/DOS, UNIX, MS/NT Directories System Calls

3 J.Tiberghien Disk organization & File Management Physical data recording on magnetic disks Physical organization of data on magnetic disks Logical disk organization –Contiguous blocks –Random blocks: MS/DOS, UNIX, MS/NT Directories System Calls

4 J.Tiberghien Writing on magnetic memories i

5 J.Tiberghien Manchester Code i t

6 J.Tiberghien Reading from magnetic memory e

7 J.Tiberghien Data blocks HeaderData BlockCheck XXXXXXXXX Check = f(data block) Synchronization sequence

8 J.Tiberghien Disk organization & File Management Physical data recording on magnetic disks Physical organization of data on magnetic disks Logical disk organization –Contiguous blocks –Random blocks: MS/DOS, UNIX, MS/NT Directories System Calls

9 J.Tiberghien Disk Organization Sector Track Cylinder

10 J.Tiberghien Tracks/cylinder Cylinders Sectors/track Bytes/sector Total Capacity(in bytes) Double Density High density Format of 3.5 diskettes for PCs. Sectors/Cluster 2 1

11 J.Tiberghien Tracks/cylinder Cylinders Sectors/track Bytes/sector Total Capacity(in bytes) Format of 428 MBytes Hard Disk. Sectors/Cluster (16 bit fat)16

12 J.Tiberghien Minimum Cluster Size (with a 16 bit FAT) Disk Size 128 MB 256 MB 512 MB 1 GB 2 GB 4 GB Cluster Size 2 kB 4 kB 8 kB 16 kB 32 kB 64 kB Sectors/Cluster

13 J.Tiberghien Space lost to Slack Block SizeUsed SpaceSlack (Bytes)(MBytes)(%)

14 J.Tiberghien Disk organization & File Management Physical data recording on magnetic disks Physical organization of data on magnetic disks Logical disk organization –Contiguous blocks –Random blocks: MS/DOS, UNIX, MS/NT Directories System Calls

15 J.Tiberghien Mapping the Files on the Disk Contiguous Block Allocation –When throughput is critical –When almost no file creation or deletion –Regular space reorganizations required Random Block Allocation –When disk space is critical –When lots of file creations and deletions –Disk space optimizations beneficial for performance

16 J.Tiberghien Contiguous Block Allocation FreeF7F1F5F3.1F3F2F6F4 Del F1, F5 F8 Save F8 Sorry, Insufficient Disk Space ! Pack FreeF7Free F3.1F3F2F6F4 FreeF7F6F3F2F4 Save F8 F8FreeF7F6F3F2F4

17 J.Tiberghien Mapping the Files on the Disk Contiguous Block Allocation –When throughput is critical –When almost no file creation or deletion –Regular space reorganizations required Random Block Allocation –When disk space is critical –When lots of file creations and deletions –Disk space optimizations beneficial for performance

18 J.Tiberghien File Access Table (MS/DOS) DISK FAT Cluster 0 Cluster x One entry per Logical Cluster Number

19 J.Tiberghien Conceptual FAT model Stream a Stream b Stream c Stream d... Free VCN =0123 LCN

20 J.Tiberghien Partial view of FAT Directory PointerLCN FAT contents Disk contents Stream a >0 1 Stream a, cluster Stream a, cluster Stream a, cluster 2 Stream b >3 4 Stream b, cluster Stream b, cluster 1 5 END Stream b, cluster 2 Free Space >6 7 Free 7 11 Free Stream c >8 12 Stream c, cluster Stream a, cluster 3 10 END Stream a, cluster Free Stream c, cluster 1 13 END Stream c, cluster Free Stream d >15 16 Stream d, cluster Stream d, cluster Stream d, cluster Stream d, cluster 3...

21 J.Tiberghien UNIX Inode Logical clusters of data on disk (up to 256) Logical clusters of data on disk (up to 256*256) Logical clusters of data on disk Logical clusters of data on disk (up to 256*256*256)

22 J.Tiberghien VCN to LCN mapping in MS/NT starting VCN starting LCN no.of clusters VCN= LCN=

23 J.Tiberghien Disk organization & File Management Physical data recording on magnetic disks Physical organization of data on magnetic disks Logical disk organization –Contiguous blocks –Random blocks: MS/DOS, UNIX, MS/NT Directories System Calls

24 J.Tiberghien Directory Tree \ info ex 1k 2kasti 3E \info\ex\3E

25 J.Tiberghien MS/DOS Directory Entry bit 0: read only bit 1: hidden bit 2: system file bit 3: volume label bit 4: subdirectory bit 5: archive bit Base Name Extension Attributes Time of creation Date of creation Starting FAT entry File size 8 bytes 3 bytes 1 byte 2 bytes 4 bytes

26 J.Tiberghien Unix Directories \ info ex 3E \info\ex\3E txt \txt\new new

27 J.Tiberghien MS/NT Master File Table Security Descriptor File Name Standard Information Data 1,2 or 4 KBytes

28 J.Tiberghien MS/NT Data Files Security Descriptor File Name Standard Information Actual Data Security Descriptor File Name Standard Information VCN to LCN mappings Small file: Large file: VCN= LCN=

29 J.Tiberghien MS/NT Directories Security Descriptor File Name Standard Information Index of files in MFT f1,f2,f3 Small directory: Large directory (organized as a Btree): Security Descriptor File Name Standard Information VCN to LCN mappings + bitmap VCN= LCN= f1f2f4f5 f6 f3f f8f9

30 J.Tiberghien Disk organization & File Management Physical data recording on magnetic disks Physical organization of data on magnetic disks Logical disk organization –Contiguous blocks –Random blocks: MS/DOS, UNIX, MS/NT Directories System Calls

31 J.Tiberghien System Calls File Manipulation create file, delete file open, close read, write, reposition get file attributes, set file attributes


Download ppt "J.Tiberghien Chapitre 9 Organisation des disques et gestion des fichiers."

Similar presentations


Ads by Google