Logical file system that implements paging, multithreading, etc.
Run each cell on Google Colab
OR
Run locally: python main.py
- No. of Pages: 10,000
- Page Size: 64 B
- If a thread opens a file for modification, the changes it makes will not be saved until it closes the file.
- Reading a file's contents is already thread safe (point 3 touches this further).
- A thread cannot read the updated contents of a file until the writer thread has closed the file.
- A file is locked for modification by a single thread.
Additional Features
- Global File Table that maps that uses filename to index into the threads that have opened the file and the associated file mode.
- Integers are returned by the FileSystem object to indicate failure status.