SlideServe
Menu
Préférences
© SlideServe · v2026

ThreadOS: File System Implementation

yeshaya avatar
10 diapositives · 415 Views · Jan 08, 2013

ThreadOS: File System Implementation. Joe McCarthy. File-System Structure. File system interface provides applications with various system calls and commands such as open, write, read, seek, etc..

ThreadOS: File System Implementation - slide 1
01 / 10ThreadOS: File System Implementation
1 / 17

Télécharger la présentation

ThreadOS: File System Implementation
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. ThreadOS:File System Implementation Joe McCarthy CSS 430: Operating Systems - File System Implementation

  2. File-System Structure • File system interface provides applications with various system calls and commands such as open, write, read, seek, etc.. • File system maintains disk space in blocks and allocates available blocks to each stream-oriented file. • Basic file system (BIOS) maintains data in physical blocks • Device driver reads / writes disk blocks which consists of one (or more) sector(s). • Disk maintains physical block locations indexed by drive#, cylinder#, track# and sector# track sector cylinder CSS 430: Operating Systems - File System Implementation

  3. File-System Implementation • Boot control block contains info needed by system to boot OS from that volume • Volume control block contains volume details • # blocks, block size, free block count/pointers • Directory structure organizes the files • Per-file File Control Block (FCB) contains many details about the file CSS 430: Operating Systems - File System Implementation

  4. In-Memory File System Structures CSS 430: Operating Systems - File System Implementation

  5. Indexed Allocation  outer-index file index table CSS 430: Operating Systems - File System Implementation

  6. Combined Scheme: UNIX UFS 4K bytes per block CSS 430: Operating Systems - File System Implementation

  7. ThreadOS Superblock & Inodes Superblock int totalBlocks; int totalInodes; int freeList; Block #0 Free Block #x Free Block #y Free Block #z Inode #0 32bytes Inode #1 Block #1 Inode #15 / root directory Block #2 Inode #inodeBlocks -1 Block #(totalBlocks – 1) css430 file-system implementation

  8. ThreadOS Root Directory (“/”) • Directory() • Initialize “/” directory • bytes2directory( byte data[]) • Initialize directory with byte[] which have been retrieved from disk • directory2bytes() • Converts directory information into byte[] • ialloc( String filename ) • Allocate an iNumber for filename • ifree( short iNumber ) • Deallocate the iNumber • namei( String filename ) • Return filename’s iNumber Entry[] fsizes fnames (iNumber) 0 1 2 3 4 5 6 7 8 9 10 inodeBlock-1 1 4 4 4 4 5 5 6 6 9 6 6 5 / init fsck clri motd mount mknod passwd umount checklist fsdblb config getty css430 file-system implementation

  9. CSS430 ThreadOS File System Thread int fd = SysLib.open(“fileA”, mode); SysLib.read(fd, …); A simplified structure of Unix file system TCB 0 1 2 3 31 stdin stdout Inode: length count 1 direct[11] indirect stderr struct file: count 1 inode Disk User file Descriptor table Inode File Table css430 file-system implementation

  10. CSS 430: Operating Systems - File System Implementation