Περιεχόμενα
description
Transcript of Περιεχόμενα
-
: .
: AM:155
.
*
-
. 3. 13 19FAT32.. 32NTFS 41UFS.. 47FFS.. 63VFS.. 69ext2, ext3, ext4.. 74HFS. 77Yaffs 85 90
-
(1)
(Operating System) .
(interface) . .
-
(2) (resource allocation). .
, . , , , , .
. .
-
(3)
. . .
-
- .
.
.
(, .), .
, .
(1)
-
(2)
.
.
. , , , , / .
-
Windows (98, NT, 2000, XP, Vista, 7, Server)FreeBSDLinux Distributions (Ubuntu, Fedora, Mandriva)Macintosh OS v 10.x (Leopard, Tiger)AndroidWindows Mobile CEHaikuSolarisIPhone OSCentOSOpenBSDUnix
-
. , , , , .
, .
/ . (1)
-
, , .
, , I-nodes, soft links, hard links. (2)
-
FAT (FAT12, FAT16, FAT32, exFAT)NTFSHFS HFS+HPFSUFS ext2, ext3, ext4 btrfsISO 9660ODS-5Veritas File SystemZFSUDF .
-
Pipes I nodes (Unix)
-
(Files)
-
, (attributes - properties). . , :
- (1)
-
(read only)
: ,
(2)
-
. , 0. , .
. , .
, . : , , ( ). , . (1)
-
. , .
. , ' .
. . . (2)
-
(3)
, . . , . (.. ), .
. .. , . , , . .
-
(Directories)
-
(Directories): file system. .
-
/ Directories(1)
/ Create: directory.
/ Delete: directory. directory .
/ Open: directory . open.
/ Close: .
/ Rename:
-
/ Directories(2)
Link: linking directories. directory . directories.
Unlink: link directory. unlink directory file system.
-
/ .
-
(1)
.
#x, , * .
,
.
-
(2)
-
(1)
,
.
.
.
-
(2)
-
(1)
.
.
.
.
-
(2)
-
(1)
-
(2)
boot block superblock filesystem, blocks ... bitmap blocks. i-nodes, , . root directory file system tree .
-
FAT32 (File Allocation Table)
-
FAT32: File Allocation Table 32
Windows 95OSR2, FAT 32 bit 16 bit .
2 GB.FAT32 (1)
-
FAT32 65536 clusters clusters . cluster 512 Bytes volume 2 TB, cluster 4096 Bytes 16TB.
32 bit 28 FAT cluster, 4 .
FAT32 (2)
-
sector Master Boot Record (MBR). sector 512 Bytes , 512 Bytes sector 446 Bytes . 64 Bytes 4 16 Bytes. Partition Table. Bytes 0x55, 0xAA bytes MBR , . 4, .FAT32 1
-
FAT32 2
-
(partition) 16 bytes 5 byte, Type Code, , bytes 9 12 .
FAT32 Type Code 0x0B 0x0C.
sectors .
FAT32 3
-
FAT32 sector Volume ID.
LBA .
FAT (12, 16)
sector .
FAT32 4
-
FAT32 5
FieldMicrosoft's NameOffsetSizeValueBytes Per SectorBPB_BytsPerSec0x0B16 BitsAlways 512 BytesSectors Per ClusterBPB_SecPerClus0x0D8 Bits1,2,4,8,16,32,64,128Number of Reserved SectorsBPB_RsvdSecCnt0x0E16 BitsUsually 0x20Number of FATsBPB_NumFATs0x108 BitsAlways 2Sectors Per FATBPB_FATSz320x2432 BitsDepends on disk sizeRoot Directory First ClusterBPB_RootClus0x2C32 BitsUsually 0x00000002Signature(none)0x1FE16 BitsAlways 0xAA55
-
FAT32 . sector Volume ID, sectors. sectors (2) File Allocation Table (FAT), clusters .
FAT32 6
-
NTFS (New Technology File System)
-
NTFS: New Technology File System, 32 Bit . FAT , . , . Microsoft , .
NTFS (1)
-
Windows NT (NT, XP, Vista, 7, Server Editions) . Windows , .
NTFS (2)
-
:
NTFS .
.
cluster .
NTFS (1)
-
NTFS
RAID Volumes . rebuild .
UNICODE .
4 GB NTFS , flash drives 4 GB NTFS 4 GB.NTFS (2)
-
NTFS
, .
Server Active Directory (domain), .
(user quotas) .NTFS (3)
-
Unix File System (UFS)
-
Layers Unix
access
through
user mode
access through
kernel mode
Users
Shells
UNIX operating system (kernel)
Hardware
-
Unix
Computer hardware
The shell and other basic time-sharing utilities
The UNIX system kernel
Compilers
Spreadsheet calculators
Mail and message facilities
Editors
Interpreters
Database management systems
Word processors
Calendar systems
Inventory control systems
Formatters
-
Unix
Application
Users
Interface
(AUI)
Application
Programmers
Interface
(API)
Operating
System
Applications: Compilers, word processors, spreadsheets, ftp, telnet, Web browser, etc.
UNIX shell
Language libraries: C, C++, Java, Fortran, etc.
System call interface (entry points to kernel)
UNIX kernel:
File management
Interprocess communication (IPC)
Process management
CPU
scheduler
Primary and secondary storage management
Device drivers: Mouse driver, printer driver, CD-ROM driver, hard disk driver, etc.
Hardware: Wires, capacitors, resistors, transistors, Ics, mouse, display monitor, keyboard, CPU, RAM, hard disk, CD-ROM, printer, etc.
-
. : (source & ) :, ,
-
: , . .
:
char/block special:
Pipe : , .
-
Passwd Motd " "Mtab Utmp Termcap
/etc
consol UNIXnull E Lp mt# tty#
/dev
-
(directory, ) : . directory directories . "", "" "" , "" . - Directories
-
Unix (1)
i-node, . i-node 15 . 12 . , index, . , .
-
Unix (2)
-
I nodes (1)
H I node :
Field
Example
Owner of the file
fred
Group Id (group to which owner belongs)
staff
File Type
regular
Permissions (see notes below)
rwxr-xr-x
Last accessed
10 Dec 1991 12:00
Last Modified
21 Nov 1991 17:45
Last Inode Modification
21 Nov 1991 17:45
File size
10300 bytes
Number of links
3
Pointers to disk allocations
See below
-
I nodes (2)
Type: e.g., normal, directory, special
User-id and group-id of owner
Access permissions
Time of creation, last update and last access
Reference count (number of links to this inode)
Direct blocks
Indirect blocks
Double-indirect blocks
Triple-indirect blocks
Indirect blocks
File contents
Direct blocks
Direct blocks
-
I nodes (3)
INODE POINTERS
DATA
BLOCKS
INDEX BLOCKS
Direct 0
Direct 1
Direct 2
Direct 9
Single Indirect
Double Indirect
Triple Indirect
-
Volume (1) *Boot Block. .Super Block. .
Boot Block
Inode Block
Super Block
Data Blocks
-
Volume (2) *
I-node Block. i-node (information node) Data Block. Data Blocks. . , .
Inodes Files
Owner Group Type Permisn Time Address
-
Unix
read(3, &buffer, 1024)
User space
Boot block
Disk
Inode table Data blocks
Super-block Super-block
Top of free inode list
Top of free block list
Per-process
open file table
0
1 Kernel
2
3
In-memory copy
of super-block System open file table Active inode table
offset=1234
Metadata
-
Fast file system (ffs)
-
FFS(1)
FreeBSD Fast File System FFS, Unix, UFS. FreeBSD, .
FreeBSD , , .. USB , flash, . , - , Extended File System (EXT) LinuxR Z File System (ZFS) Sun.
-
FFS(2)
T (cylinder groups) .
i-nodes data blocks.
, i-nodes data blocks. .
blocks, superblocks : , , , (free list), . data blocks .
-
FFS(3)
data block (. data block data blocks - fragments).
data blocks , "" data blocks fragments frags.
data blocks , fragments .
fragment data block 1/8 . .
-
FFS(4)
T data blocks fragments data blocks / fragments .
,
(. data block 8 KBytes - fragment 1 KByte) .
-
FFS(5)
FFS (fast filesystem) FreeBSD single C ( 8-bit clean), . , 8-bit .
, FFS wide multibyte. patches FFS .
-
Linux VFS (Virtual File System)
-
Linux VFS
Linux ( mount) .
To Linux 4 slide.Page cachei-node cacheBuffer cacheDirectory cache
VFS (layer) I/O . (abstraction layer).
-
Linux VFS Context
-
(1)
VFSInode CacheDirectory CacheNTFSExt2CryptFSBuffer CacheDisk DriversUser space
-
(2)
-
ext2, ext3, ext4 (Extended File System)
-
Ext4 (1)
ext2, ext3, ext4: GNU/Linux Ubuntu ext4 .
Ext4 ( Extended File System) Ext3 .
ext4, ext3, , .
-
Ext4 (2)
64-bit .
Ext3 Ext2 .
Persistent Pre allocation.
Delayed allocation.
.
-
Hierarchical File System (HFS / HFS+)
-
HFS (1)
HFS Apple 1985, Apple Macintosh, Macintosh(MFS)
To HFS (Catalog File) (B trees) .
512 bytes.
HFS + HFS Plus Apple Inc HFS ( File System) , Mac OS.
-
HFS (1)
Sector: read/write driver . ( 512Bytes)
allocation block: allocate filesystem ( 4KB). allocation block allocation number .
Clumps: groups allocation blocks. allocation block clump fragmation.
Extent: allocation blocks fork(data resource). . allocation number block allocation blocks.
-
HFS (2)
Special files: filesystem folders, user files, attributes. files:
Catalog file (B-Tree): . catalog information files, folders. catalog file b-tree.
Attributes file (B-Tree): .
Extents overflow file (B-Tree): extents 8 catalog file.
-
HFS (3)
Allocation file (bitmap): allocation block used or free.
Startup file: MAC OS. Volume Header.
B-Trees: B-Trees catalog, extents overflow attributes. B+-Trees . data fork . B-tree nodes, records, data. B-Tree . .
-
HFS (1)
HFS :
0 1 , .
2 Master Directory Block (MDB). , , , , Bitmap .
-
HFS (2)
3 Volume Bitmap, .
MDB Alternate Master Directory Block (Alternate MDB) . Extents .
Extent Overflow File - , extents .
-
HFS (3)
(Catalog File) - . . File Thread Record File Record Directory Thread Record Directory Record. (CNID Catalog Node ID).
-
Yaffs (Yet Another File System)
-
YAFFS (1)
YAFFS NAND , Android (smart phones) .
Linux, ucLinux, Windows CE.
JFFSv1 JFFSv2 NAND .
-
YAFFS
(easily ported)
log (log structured file systems) (wear leveling techniques). NAND.
(fast mount).
RAM .
-
YAFFS
-
YAFFS1, YAFFS2
, .
512 bytes. 1 0 byte, .H 2KB, . / . RAM, 50%. MLC NAND TOSHIBA SANDISK.
-
(1)
http://en.wikipedia.org/wiki/NTFS
http://en.wikipedia.org/wiki/File_Allocation_Table
http://en.wikipedia.org/wiki/Hierarchical_File_System
http://www.cslab.ntua.gr/courses/os/files/2011-12/os-07-filesystems.pdf
http://docs.fedoraproject.org/el-GR/Fedora/9/html/Release_Notes/sn-FileSystems.html
http://en.wikipedia.org/wiki/Unix_File_System
http://static.usenix.org/event/usenix01/full_papers/kroeger/kroeger_html/node8.html
-
(2)
http://www.geeksforgeeks.org/archives/20091
http://igm.univ-mlv.fr/~dr/XPOSE/NTFSvsUFS/right.htm
http://www.yaffs.net/
http://en.wikipedia.org/wiki/YAFFS
http://wookware.org/talks/yaffscelf2007.pdf
www.google.com
*