Download slide-2

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
File Systems
File Structure
2017, Spring
Pusan National University
Joon-Seok Kim
1
File
A collection of
information
Where is the file that
I am looking for?
System
A way of organizing something which
follows a set of rules
#2 #3
Aisles
New File
#4
Blocks
#1 #2 #3 #4 #5 #6
#1
PNU
STEM
File

From user’s point of view


From user process’s point of view


A named, persistent collection of data
A sequence of bytes of arbitrary length
From operating system’s point of view

A collection of disk blocks
5
PNU
STEM
Logical File Structure
Flat file of bytes
Fixed-length records
Variable-length records
6
PNU
STEM
File System Levels
User processes
File system interface
(system calls)
Device driver interface
File system
implementation
I/O system implementation
Hardware interface
Disk hardware
8
PNU
STEM
What is a File System?

File system



A way of organizing and storing files on any storage device
such as a hard disk drive, solid-state drive
A collection of files, blocks, directories, and file descriptors, all
on one logical disk
Partition


Each storage device has one or more partitions, and each
partition is formatted with a file system.
The formatting process simply creates an empty file system of
that type on the device.
9
PNU
STEM
Types of File Systems



Disk file systems
Distributed file systems
Special file systems
10
PNU
STEM
Examples of Disk File System
Operating system
Default file systems
Unix
Unix File System (UFS1, UFS2)
MINIX
MINIX File System
Linux
Extended File System (ext2, ext3, ext4)
Extents File System (XFS)
Mac OS
Hierarchical File System (HFS, HFS+)
MS-DOS
File Allocation Table (FAT12, FAT16, FAT32)
Windows
New Technology File System (NTFS)
11
Boot block
File system descriptor
File descriptors 0-7
File descriptors 8-15
File descriptors 16-23
...
PNU
reserved
block
STEM
Layout of a File System
block number
0 1 2 3 …
Data blocks
12
PNU
STEM
File System Descriptor


Called superblock in UNIX
Contents of the file system descriptor






The total size of file system
The size of the file descriptor area
The first block on the free block list
The location of the file descriptor of the root directory
The time the file system was created, last modified, and last
used
Other file system meta-data
13
PNU
STEM
File Descriptors


Called inode (index node) in UNIX
Data structure that records all the meta-information
about the file




Maintained by the file system
Separate from file itself
Usually attached or connected to the file
Some information visible to user/application


Dates, permissions, type, name, etc.
Some information primarily for OS

Location on disk, locks, cached attributes
14
Related documents