Pint os filesystem

12
File System File System PintOS-Project4 PintOS-Project4

Transcript of Pint os filesystem

Page 1: Pint os filesystem

File SystemFile System

PintOS-Project4PintOS-Project4

Page 2: Pint os filesystem

Tasks:Tasks:

1. Buffer Cache1. Buffer Cache2. Indexed & Extensible Files2. Indexed & Extensible Files3. Subdirectories3. Subdirectories4. 4. SynchronizationSynchronization

Build a simple file systemBuild a simple file system

Page 3: Pint os filesystem

Indexed & Extensible FilesIndexed & Extensible Files Base File System LayoutBase File System Layout

Page 4: Pint os filesystem

Indexed & Extensible FilesIndexed & Extensible Files

Base File System Layout DefectsBase File System Layout Defects

1.1. External FragmentationExternal Fragmentation2.2. Limitation on growing file sizeLimitation on growing file size

Page 5: Pint os filesystem

Indexed & Extensible FilesIndexed & Extensible Files

Add IndexAdd Index

1. Don’t have to follow any prescribed layout1. Don’t have to follow any prescribed layout2. Can pick any layout strategy that doesn’t suffer from 2. Can pick any layout strategy that doesn’t suffer from external external 3. fragmentation and can grow files3. fragmentation and can grow files

If you lack better ideas, use Unix-style direct, single indirect, double If you lack better ideas, use Unix-style direct, single indirect, double indirect indirect iNode layoutiNode layout

4. Can pick any on-disk iNode layout (you must design your 4. Can pick any on-disk iNode layout (you must design your own, the own, the existing one does not work)existing one does not work)5. Can pick any directory layout (although existing directory 5. Can pick any directory layout (although existing directory layout layout suffices)suffices)

Page 6: Pint os filesystem

Indexed & Extensible FilesIndexed & Extensible Files Layout strategyLayout strategy

Linked AllocationLinked Allocation

Page 7: Pint os filesystem

Indexed & Extensible FilesIndexed & Extensible Files Layout strategyLayout strategy

Indexed AllocationIndexed Allocation

Page 8: Pint os filesystem

Indexed & Extensible FilesIndexed & Extensible Files Layout strategyLayout strategy

Indexed Allocation ProIndexed Allocation Pro

Page 9: Pint os filesystem

Buffer CacheBuffer Cache

Buffer Cache VS. Virtual MemoryBuffer Cache VS. Virtual Memory

Improve Performance.Improve Performance.

Page 10: Pint os filesystem

BIG PictureBIG Picture

Page 11: Pint os filesystem

Implement OrderImplement Order

You should think about You should think about synchronization synchronization throughoutthroughout

implement & pass all regression testsimplement & pass all regression testsBuffer Cache

implement & pass file growth testsimplement & pass file growth testsExtensible Files

Subdirectories

Page 12: Pint os filesystem

ContinuingContinuing