File Systems: Tanenbaum & Bo, Modern Operating Systems:4th Ed., (C) 2013 Prentice-Hall, Inc. All Rights Reserved
File Systems: Tanenbaum & Bo, Modern Operating Systems:4th Ed., (C) 2013 Prentice-Hall, Inc. All Rights Reserved
Chapter 4
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
File Systems (1)
Essential requirements for long-term
information storage:
1.It must be possible to store a very large
amount of information.
2.Information must survive termination of
process using it.
3.Multiple processes must be able to access
information concurrently.
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
File Systems (2)
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
File Systems (3)
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
File Naming
1. Create 7. Append
2. Delete 8. Seek
3. Open 9. Get attributes
4. Close 10. Set attributes
5. Read 11. Rename
6. Write
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Example Program Using File System Calls (1)
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Example Program Using File System Calls (3)
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Single-Level Directory Systems
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Hierarchical Directory Systems
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Path Names
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
File System Layout
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Implementing Files
Contiguous Layout
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Implementing Files
Linked List Allocation
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Implementing Files
Linked List – Table in Memory
Figure 4-13. An
example i-node.
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Implementing Directories (1)
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Shared Files (2)
Figure 4-17. (a) Situation prior to linking. (b) After the link is
created. (c) After the original owner removes the file.
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Journaling File Systems
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Virtual File Systems (1)
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Virtual File Systems (2)
Figure 4-21. The dashed curve (left-hand scale) gives the data rate of a disk. The
solid curve (right-hand scale) gives the disk space efficiency. All files are 4 KB.
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Keeping Track of Free Blocks (1)
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
File System Backups (2)
Figure 4-25. A file system to be dumped. The squares are directories and the circles are
files. The shaded items have been modified since the last dump. Each directory and file is
labeled by its i-node number.
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
File System Backups (3)
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
File System Consistency
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
File System Performance (2)
• Some blocks rarely referenced two times
within a short interval.
• Leads to a modified LRU scheme, taking two
factors into account:
1. Is the block likely to be needed again soon?
2. Is the block essential to the consistency of the
file system?
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Reducing Disk Arm Motion
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
The MS-DOS File System (2)
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
The UNIX V7 File System (2)
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
The UNIX V7 File System (3)
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
The ISO 9660 File System
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Rock Ridge Extensions
1. PX - POSIX 5. NM - Alternative
attributes. name.
2. PN - Major and 6. CL - Child location.
minor device 7. PL - Parent location.
numbers. 8. RE - Relocation.
3. SL - Symbolic link. 9. TF - Time stamps.
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Joliet Extensions
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
End
Chapter 4
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.