Module 13: The OS File System Flashcards

1
Q

System calls for files:

A

fopen(): open file for reading and writing
fwrite(): writes data to a file
fseek(): sets the position of the stream to the given offset, allowing seeking a specified part of the file
fread(): read from the file
fclose(): close the file

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

disk block

A

basic logic unit of storage on disk of a contiguous set of bytes

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

disk partitions

A

logical split of the actual disk drive; the OS views each partition as a distinct disk, and different OS may be run in each split; each partition has at least one directory, in which all the partition’s files are listed

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

typical internal structure of the disk parition:

A
  1. boot block: contains info on the disk layout and code for loading the OS into the kernel space
  2. superblock: contains basic information about the file system, including the file system size, list of free blocks, list of allocated blocks, and time of the last modification to the partition; the superblock can be read into memory at boot time
  3. free space data structure: tracks the free space in the disk
  4. i-nodes list: stores information about the individual files stored on disk
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

master boot record

A

stores information about the entire drive

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

partition table

A

specifies the beginning of each partition

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

disk space allocation

A

managing data in the disk with the aims to ensure fast sequential success, fast random access, the ability to grow a file system quickly, and to minimize fragmentation

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

4 methods for managing disk space allocation

A
  1. contiguous allocation
  2. linked-list allocation
  3. file allocation table (FAT)
  4. linked list with indexing or i-nodes
    - -> i-node: a kernel structure storing information about each file in the file system; contains a pointer to the disk blocks containing the file’s data, and information such as the file permissions, ownership, modification time, and file type
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

directory

A

a file that holds the list of filenames and their i-nodes; provides information needed to find the disk data blocks of a file

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

hard links

A

to represent two different paths for a file, create a single i-node and have two directory entries that point to the same i-node; relies on the link-counter

link-counter: counts the number of ways that an i-node can be retrieved along different paths

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

symbolic/soft link

A

original file has its own i-node and for each reference or path to the file, there is a separate i-node of type LINK, for a file that just contains the path name to the original file

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

free space management

A

tracking unallocated blocks in a portion of the disk partition

  • -> bitmap: maintains the entire disk partition with one encoding the fact that the block of a particular number is free and zero otherwise
  • -> linked list: storing the free blocks
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

in-memory cache

A

uses a scheme to store blocks that are likely to be requested from disk, to shortcut the need for a disk search and propagate the data to the requesting process
–> LRU scheme: given the limited in-memory cache size, evicts the least recently used block from the cache when new blocks are being added in

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

incremental backups

A

every time you synchronize with your server, it will only backup files that have been changed since the last time

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

physical backup

A

physically copy block by block from one disk to another

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

logical backup

A

copies files from one disk to another