Lecture 19: File Systems 1 Flashcards

1
Q

Character devices (keyboard, display, modem)

A
  • input or output 1 character at a time

- data transfer: byte-at-a-time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Block devices (disk drive, tape drive)

A
  • input/output data in fixed size blocks

- data transfer: block-at-a-time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Block

A

-amount of data read in one READ operation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Files

A

logically contiguous, non-volatile, protected collection of related data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Directories

A

special-purpose files that contain information about other files

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

File Systems

A
  • allows for efficient and convenient access to disk
  • resides on disk
  • organized into layers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

I/O Control

A

– lowest layer of OS abstraction
– consists of device drivers (software layer between
application and device controller)
– translates commands such as: retrieve block 123
to hardware-specific instructions used by controller

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Basic file system

A

– issues generic commands to device driver to read, write blocks
– block-level addressing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

File organization module

A

– translates logical block addresses (file id + block offset) to physical block addresses
(drive #, cylinder #, track #, sector #)

– includes free space manager for allocating, deallocating disk blocks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Logical file system

A

– manages metadata about files (e.g., size, permissions)

– maintains with file control blocks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

File system data structures (on disk)

A
  1. Boot control block
    • 1 per bootable partition
    • info needed to boot OS from partition (bootstrap brings into RAM)
    • stored in fixed location within partition (e.g., 1st block)
  2. partition control block
    • 1 per partition
    • includes info about partition:
    – # blocks, size of blocks, free-block count, free-block pointers, …
  3. directory structure blocks
    • 1 per directory
    • file organization information for directory
4. file control block 
• 1 per file
• typical contents:
– permissions
– timestamps (created, last access, last write)
– owner
– group
– size
– data block locations...
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

File system data structures (memory)

A
  1. PartitionTable
    • information about all mounted (visible) partitions
  2. DirectoryStructureTable
    •information about recently accessed directories
  3. Open File Tables
    a) SystemOpenFileTable:
    • copies of file control blocks (FCB’s) for every open file system-wide b) Process Open File Tables:
    • lists of pointers to system open file entries for files opened by a process
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Block Allocation

A

Comparing the Schemes

  1. Contiguous
    - every file occupies a set of “contiguous” blocks on disk

+: good sequential, random access
-: poor disk utilization, files bounded in size

  1. Linked
    file = list of disk blocks which can be scattered on disk

+: good sequential access, disk utilization, unbounded file size -: poor random access

  1. Indexed
    • use dedicated “index blocks” to store pointers to data blocks

+: good disk utilization, unbounded file size,
good sequential, random access of few levels in index -: overhead of index blocks
access performance worsens with more levels

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Free space management: Bit vector

A

• one bit per block
+: easy to find free blocks
easy to find contiguous blocks
-: can get very large, yet should be kept in memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Free space management: linked list

A

• maintain pointer to 1st free block, which contains pointer to next free block, which contains pointer to next free block…

+: simple implementation little space overhead
-: traversing list is expensive, but typically you only need:

  • 1st block in list: to allocate a frame
  • last block in list: to deallocate a frame (keep 2nd pointer)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly