1 / 19

Troisième Partie Chapitre 7 L’organisation des mémoires périphériques et la gestion des fichiers

Troisième Partie Chapitre 7 L’organisation des mémoires périphériques et la gestion des fichiers. Physical disk organization Logical to physical mapping DOS & Windows : File Access Table (FAT16) UNIX – LINUX : inode Windows NT : Master File Table Disk directories System calls.

skah
Download Presentation

Troisième Partie Chapitre 7 L’organisation des mémoires périphériques et la gestion des fichiers

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Troisième Partie Chapitre 7 L’organisation des mémoires périphériques et la gestion des fichiers

  2. Physical disk organization Logical to physical mapping DOS & Windows : File Access Table (FAT16) UNIX – LINUX : inode Windows NT : Master File Table Disk directories System calls Contents

  3. Disk Organization Track Sector Cylinder

  4. What is the optimal size of a disk sector ? Small sectors : good for small disks Reduce slack Large sectors : good for large disks Increase disk throughput Reduce number of bits in sector number It is desirable to have a single sector size for all disks ! Solution : define clusters as groups of sectors with size optimized for each specific disk. Transfer entire clusters instead of sectors Each cluster on disk has a Physical Cluster Number (PCN) Clusters vs. Sectors

  5. Format of 3.5” diskettes for PC’s. Double Density High density 2 Tracks/cylinder 2 Cylinders 80 80 Sectors/track 9 18 Bytes/sector 512 512 Total Capacity(in bytes) 737 280 1 474 560 Sectors/Cluster 2 1

  6. Tracks/cylinder Cylinders Sectors/track Bytes/sector Total Capacity(in bytes) Format of 428 MBytes Hard Disk. 15 899 62 512 428 067 840 Sectors/Cluster 16

  7. File/disc mapping Logical file structure Physical Disc Structure

  8. 10 5 12 13 11 14 LCN = 0 1 2 3 MS/DOS : the FAT 16 Stream a 1 2 9 0 Stream b 3 4 Stream c 8 ... Stream d 15 16 17 18 19 ... PCN ... Free 6 7

  9. File Access Table(MS/DOS) Cluster x FAT One entry per Physical Cluster Number Cluster 0 DISK Two copies of the FAT are stored on track 0.

  10. Minimum Cluster Size (with a 16 bit FAT) When cluster numbers have only 16 bit, no more than 65536 clusters can be defined on any disk, this implies very large clusters on large disks Disk Size 128 MB 256 MB 512 MB 1 GB 2 GB 4 GB 8 GB Sectors/Cluster 4 8 16 32 64 128 256 Cluster Size 2 kB 4 kB 8 kB 16 kB 32 kB 64 kB 128 KB

  11. UNIX/LINUX inode 10 Logical clusters of data on disk 256 256 256 ... ... ... Logical clusters of data on disk (up to 256) 256 256 ... ... 256 256 ... ... Logical clusters of data on disk (up to 256*256) 256 256 256 256 ... ... ... ... Logical clusters of data on disk (up to 256*256*256)

  12. 0 1355 4 4 1588 5 LCN to PCN mapping in MS/NT starting LCN starting PCN no.of clusters 4 5 6 7 8 0 1 2 3 LCN= 1588 1589 1590 1591 1592 1355 1356 1357 1358 PCN=

  13. Directory Tree \ info ex 1b 2b acs 3E \info\ex\3E

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

  15. Unix Directories \ info txt ex new 3E \info\ex\3E \txt\new

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

  17. MS/NT Data Files Small file: File Name Standard Information Security Descriptor Actual Data Large file: File Name Standard Information Security Descriptor LCN to PCN mappings 4 5 6 7 8 0 1 2 3 LCN= 1588 1589 1590 1591 1592 1355 1356 1357 1358 PCN=

  18. LCN= PCN= MS/NT Directories Small directory: File Name Standard Information Security Descriptor Index of files in MFT f1,f2,f3 Large directory (organized as a Btree): File Name Standard Information Security Descriptor LCN to PCN mappings + bitmap f3 f7 0 1 2 3 4 5 6 7 8 9 10 11 f6 f1 f2 f4 f5 f8 f9 1355 1356 1357 1358 1588 1589 1590 1591 1648 1649 1650 1651

  19. create file, delete file open, close read, write, reposition get file attributes, set file attributes System CallsFile Manipulation

More Related