Chap 4: Distributed File Systems - PowerPoint PPT Presentation

About This Presentation
Title:

Chap 4: Distributed File Systems

Description:

Title: PowerPoint Presentation Last modified by: Tiko Kameda Created Date: 1/1/1601 12:00:00 AM Document presentation format: On-screen Show Other titles – PowerPoint PPT presentation

Number of Views:39
Avg rating:3.0/5.0
Slides: 20
Provided by: sfu97
Category:

less

Transcript and Presenter's Notes

Title: Chap 4: Distributed File Systems


1
Chap 4 Distributed File Systems
2
4.1 Review of conventional FS
Directory
File service
Block service
3
Moving-Head Disk Mechanism
4
Block service interface
  • Obtain new block
  • bAllocateBlock( )
  • Release block
  • FreeBlock(b)
  • Read/Write block
  • buf GetBlock(b)
  • PutBlock(b, data)
  • Must manage
  • Free block list
  • Caching

Block service
5
File service interface
  • Realizes flat file system
  • fid CreateFile( )
  • DeleteFile(fid)
  • buf Read(fid, position, bytes)
  • Write(fid, position, buf)
  • Need to maintain File Control Block (FCB),
  • e.g., Unix inode, containing index, owner,
    creation time, last modify time, etc.

File Service
Block Service
6
Directory service
Directory service
File service
Block service
7
4.2 Unix (s5fs) example

inode blocks
Sup- block
Boot area
Data blocks
(a) Disk layout
Free inodes cache
Free data blocks cache
empty
empty
Link to next pointers block (next slide)
(b) Superblock structure
8
Linked free blocks list
In Super- block
a
b
c
0
Data blocks are used to store addresses of free
blocks.
Sep 26
9
Block buffer cache
10
Inode
Set uid
group
owner
other
u g s r w x r w x r w x
Type (4 bits)
sticky bit
11
Inode and 3-level index
Inode
4 KB
1
4 KB
1K pointers
12
13
14
1K pointers
15
1K pointers
12
Managing open files in File Service layer
Swappable per process
Kernel-resident
Disk-resident
0
1
inode
2
3
Parents OFT
data
0
System OFT (stores position pointers)
1
In-core inode table
2
Childs OFT
OFT Open File Table (one entry per open)
13
Digression
14
Digression
15
Logical structure of directory hierarchy
foo
usr
bin
vmunix
/
Root directory
etc
16
Implementing directories
.
Lnk_cnt2
Lnk_cnt1
..
foo
Hello world!
6
4
6
bin
.
..
usr
4
VMUNIX
5
2
vmunix
.
5
local
3
..
foo
6
3
bin2
/usr/bin
8
8
17
Unix links
  • ln file hlink /file is in current
    directory/
  • ln s file slink
  • ls li
  • 10606 - rw-r- - r- - 2 tiko May 23 0005
    file
  • 10606 - rw-r- - r- - 2 tiko May 23 0005
    hlink
  • 10607 lrwxrwxrwx 1 tiko May 23 0059
    slink

  • ?file
  • ln s nonesuch devoid /nonsuch non-existent
  • ls l devoid
  • ..devoid
    ?nonesuch

18
Mapping file systems to physical devices
19
Mounting
/
Root file system
bin etc usr
Mount point
cc date sh passwd getty
/
/dev/sd0g
bin src include
yacc ban awk uts stdio.h
Write a Comment
User Comments (0)
About PowerShow.com