File System LayoutTrial 1.0The Contiguous Allocation6
6 File System Layout Trial 1.0 The Contiguous Allocation
Trial 1.0-the basicsJust like a book!Table of contentChapter 1p.1Chapter 2p.2p.10Chapter 3BookVSTrial#1BookTrial#1FilenameChapterStarting PageStartingAddressNILEndingAddress
7 Trial 1.0 – the basics • Just like a book! Table of content Chapter 1 . p.1 Chapter 2 . p.2 Chapter 3 . p.10 Book VS Trial #1 Book Trial #1 Chapter Filename Starting Page Starting Address NIL Ending Address
Trial 1.0-thebasicsJust like a book!BookvSTrial#1BookTrial#1ChapterFilenameSuppose we have 3files to storeStarting PageStartingAddressNILrock.mp3Ending Addresssweet.jpgsame.exeLikeabook,we need to some spacetoWe donot considerthe directorystorethetable of content,which recordsstructureatthis momentthe filename and the (starting and ending)addresses of thefile content.8
8 Trial 1.0 – the basics • Just like a book! Book VS Trial #1 Book Trial #1 Chapter Filename Starting Page Starting Address NIL Ending Address Suppose we have 3 files to store rock.mp3 sweet.jpg same.exe We do not consider the directory structure at this moment Like a book, we need to some space to store the table of content, which records the filename and the (starting and ending) addresses of the file content
Trial 1.0-thebasics Just like a book!BookvSTrial#1BookTrial#1ChapterFilenameThetable ofcontent!Starting PageStartingAddressNILEndingAddressFilenameStartingEndingAddressAddress0rock.mp3200020013456sweet.jpgFile attributes50005678game.exe9
9 Trial 1.0 – the basics • Just like a book! The table of content! Book VS Trial #1 Book Trial #1 Chapter Filename Starting Page Starting Address NIL Ending Address Filename Starting Address Ending Address rock.mp3 0 2000 sweet.jpg 2001 3456 game.exe 5000 5678 File attributes
Trial 1.0-thebasicsJust like a book!Contiguous allocation is verysimilartotheway we write a book. It starts with the table ofcontent, which we call the root directoryThetableofcontent!FilenameStartingEndingAddressAddress0rock.mp3200020013456sweet.jpgFileattributes50005678game.exeRootrock.mp3sweet.jpggame.exeDirectory10
10 Trial 1.0 – the basics • Just like a book! The table of content! Filename Starting Address Ending Address rock.mp3 0 2000 sweet.jpg 2001 3456 game.exe 5000 5678 File attributes Contiguous allocation is very similar to the way we write a book. It starts with the table of content, which we call the root directory. Root Directory rock.mp3 sweet.jpg game.exe