File Systems, Pt. 1 Flashcards

1
Q

Two File System Design Problems

A
  • Interface (how file system looks to users)

- Implementation (data structures/algorithms to map logical file systems onto physical devices)

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

File System: Layered Structure

A

Application programs -> logical file system -> file-organization module -> basic file system -> I/O control -> devices

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

Logical File System

A
  • View files as logical blocks

- Maintain metadata

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

File-Organization Module

A

Maps logical blocks to physical blocks

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

Basic File System

A

View data as physical blocks present on devices

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

I/O Control

A
  • Device drivers and device-specific instructions

- Read/write bit patterns to device controller

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

From user’s perspective, file is a…

A

…storage unit

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

A file is a named collection of…

A

…related information recorded on a secondary storage

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

File Attributes

A
  • Name (only information kept in human-readable form)
  • Identifier (unique tag identifies file within file system)
  • Type (needed for systems that support different types)
  • Location (pointer to file location on device)
  • Size (self explanatory)
  • Protection (rwx)
  • Time/date/user identification (for protection and usage monitoring)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Information about files is kept in a…

A

…directory, which is maintained on the disk as well

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

Primitive File Operations

A
  • Create
  • Write
  • Read
  • Reposition within file
  • Delete
  • Truncate
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

To perform operations on a file, we must first…

A

…open it (duh)

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

Directory

A
  • A logical grouping of files
  • Contains an entry for each file under it
  • Some systems treat directories just as files
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Directory Operations

A
  • Search for a file
  • Create a file
  • Delete a file
  • List a directory
  • Rename a file
  • Traverse the system
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Design the directory architecture to achieve:

A
  • Efficiency (quickly locating files)
  • Naming (convenient to users; ie. two users can have the same name for different files, the same file can have different names, etc.)
  • Grouping (logical grouping of files by properties)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

____ structured directories are the most common

A

Tree

17
Q

Links make tree structures complicated. Why?

A

The directory is no longer a tree because different files can link to each other outside of the hierarchy

18
Q

Problem with Acyclic Graph Directories

A

When a file gets deleted, links may still point to it.

19
Q

Solutions for Dangling Links in Unix

A
  • Symbolic link (let the user figure it out)

- Hard link (keep a reference counter, and only delete the file after all links to it have been deleted)

20
Q

Problems with General Graph Directories

A

When searching for a file or backing up the system, we may visit the same directory several times, or even infinite times if there are cycles.

21
Q

Solution to Cycles in General Graph Directories

A

Ignore links when traversing the file system

22
Q

A file system must be ____ before it can be accessed

A

Mounted

23
Q

How File System Mounting Works

A
  • OS is given name of the device and a mount point
  • OS checks device to make sure it has a valid file system
  • OS makes the new file system available
24
Q

True or False: Multiple file systems can be mounted at the same time

A

True (typically)

25
Q

Each file system has its own:

A
  • File/directory structure
  • Allocation methods
  • Algorithms and data structure
26
Q

Virtual File System

A

-VFS layer shields users from differences between file systems

27
Q

VFS provides a ____ to all file systems

A

Common interface (API)

28
Q

To implement a file system, we need:

A
  • On-disk structures

- In-memory structures

29
Q

On-disk Structure Examples

A

Directory structure, data blocks, number of blocks, location of free blocks, boot information

30
Q

In-memory Structures:

A
  • Improve performance (caching)

- Manage file system

31
Q

Volume Control Block (VCB)

A
  • On-disk structure
  • Information about the volume (partition)
  • Num. blocks, block size, free block count, etc.
32
Q

File Control Block (FCB)

A
  • On-disk structure
  • Details about each file (one per file)
  • Size, location of data blocks, permissions, ownership
  • Unix calls it “inode”
33
Q

Mount Table

A
  • In-memory structure

- Info on each mounted volume (partition)

34
Q

Directory Structure Cache

A
  • In-memory structure

- Info on recently accessed directories

35
Q

System-wide Open-file Table

A
  • In-memory structure
  • Copy of the FCB of each open file in the system
  • Info on which process is currently using which file
36
Q

Per-process Open-file Table

A
  • In-memory structure
  • Pointer to entry in the system-wide open-file table
  • Info regarding file usage by the current process (current file pointer, open mode, etc.)