Chapter 10: File Systems Flashcards

1
Q

A file system (FS)

A

has the function to implement the concept of files.

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

A record is a

A

structure of related data items, possibly of different data types, identified within a file by a record number or a unique key field.

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

An access method is a set of

A

operations provided by the OS as part of the user interface to access files. The most common access method is sequential.

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

A Seek is generally not necessary for __________ record files

A

Fixed-length record files. Any record can be accessed by directly specifying the record number.

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

Metadata is information about the format and

A

organization of a file’s data and is generally stored in a file header

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

A file header is a

A

portion of the file preceding the actual data and is visible to only the FS itself.

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

The magic number is a short sequence of

A

characters at the start of the file header, which identifies the file type. The file type, in turn, determines which programs are allowed to access and interpret the file.

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

A file extension is a

A

sequence of one or more characters following the file name.

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

A file directory (or folder) is a special-purpose file that

A

records information about other files and possibly other directories. The directory consists of a set of entries, each containing the name of a file followed by other information necessary to access the file.

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

A tree-structured directory hierarchy is a collection of __________ organized such that (1) __________, and (2) __________

A

A tree-structured directory hierarchy is a collection of directories organized such that (1) every directory points to zero or more files or directories at the next lower level, and (2) every file and directory except the root is pointed to by exactly one parent directory at the next higher level.

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

The root of a tree-structured directory hierarchy is

A

the highest level directory, which does not have a parent directory.

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

An absolute path name of a file, uniquely identified by an __________, is the __________ leading from __________ to __________

A

internal ID, f, is the concatenation of the directory and file names leading from the root to the file f.

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

A relative path name is a

A

concatenation of file names starting with the current directory.

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

Change (Directory Operation)

A

Change the current working directory to another directory specified by a path name.

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

Create (Directory Operation)

A

Create a new named directory and a new entry in the current working directory, which points to the new directory.

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

Delete (Directory Operation)

A

Delete directory d specified by a path name. Delete also all files and directories reachable using any path name starting from d.

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

Move (Directory Operation)

A

Move a file or directory from one directory to another.

18
Q

Rename (Directory Operation)

A

Change the name of a file or directory specified by a path name.
List List the file names and optionally other attributes of all files contained in a directory specified by a path name.

19
Q

Find (Directory Operation)

A

Find a file or directory specified by a name.

20
Q

A directed acyclic directory hierarchy organizes directories such that any directory at a given level may point to zero or more files or other directories at lower levels but also

A

permits any file or directory to have more than one parent directory.

21
Q

A reference count is a non-negative integer associated with a file f, which indicates

A

how many directories are pointing to the file.

22
Q

A symbolic link (or shortcut) is a directory entry that

A

points to a file or directory just like a regular entry but is treated differently with respect to deletion. A delete operation only removes the link but not the file itself.

23
Q

A File control block (FCB) is a

A

data structure associated with a filename that contains all relevant attributes of the file. FCBs are stored apart from file directories and are pointed to by the corresponding directory entries.

24
Q

In Unix and other OSs an FCB is called an

A

i-node.

25
Q

The open file table (OFT) is a

A

data structure that keeps track of all files currently in use to facilitate efficient access to and manipulation of the files.

26
Q

The open file operation prepares a file for

A

efficient access and manipulation by retrieving relevant file information from the FCB and storing the information in an entry of the OFT. Subsequent accesses to the file then occur via an index into the OFT.

27
Q

A read file operation

A

copies data from an open file to a specified area in main memory.

28
Q

A write file operation

A

copies data from an area in main memory to a specified open file. A generic sequential write operation has the form:

write i, m, n

29
Q

A seek operation

A

moves the current position of an open file to a new specified position. A generic seek operation has the form:

seek i, k

30
Q

The close file operation

A

reverses the effects of the open operation by saving the current state of the file in the FCB and freeing the OFT entry.

31
Q

A disk block is a

A

fixed sequence of bytes on the disk, which can only be accessed as a single unit using low-level read-block and write-block operations.

32
Q

In a contiguous block allocation scheme, every file is

A

mapped into a contiguous sequence of disk blocks. The FCB points to the first disk block. The file length, also maintained in the FCB, determines how many blocks are occupied by the file.

33
Q

With a linked block allocation scheme, the blocks containing a file may be

A

scattered throughout the disk. The FCB points to the first block and each block points to the logically next block.

34
Q

A clustered block allocation scheme links together sequences of

A

contiguous blocks. The last block of any cluster points to the beginning of the logically next cluster.

35
Q

A File allocation table (FAT) is an

A

array where each entry corresponds to a disk block. The FAT keeps track of which disk blocks belong to a file by linking the blocks in a chain of indices.

36
Q

With an indexed block allocation scheme, file blocks may reside

A

anywhere on the disk. An index table is provided for each file, which keeps track of the blocks belonging to the file.

37
Q

Differences between linked and indexed block allocation scheme

A

The indexed block allocation scheme provides fast random access to file blocks through an index block, but requires additional overhead for storing and maintaining the index. The linked block allocation scheme allows for dynamic allocation and flexible resizing of files, but may have slower random access due to traversing linked lists and increased disk seek time. The choice between the two schemes depends on factors such as the access patterns, file sizes, and trade-offs between random access performance and space efficiency.

38
Q

A bitmap is a data structure where each bit represents

A

one disk block. A 1 indicates that the block is allocated and a 0 indicates that the block is free.

39
Q

We can use the virtual memory techniques discussed in Virtual Memory to treat file I/O as routine memory accesses. This approach, known as __________, allows a part of the virtual address space to be logically associated with the file.

A

memory mapping a file

40
Q

The general outline for creating a region of shared memory using memory-mapped files in the Windows API involves first creating a __________ for the file to be mapped and then establishing a view of the mapped file in a process’s virtual address space.

A

file mapping

41
Q

To establish a memory-mapped file, a process first opens the file to be mapped with the CreateFile() function, which returns a HANDLE to the opened file. The process then creates a mapping of this file HANDLE using the CreateFileMapping() function. Once the file mapping is done,

A

the process establishes a view of the mapped file in its virtual address space with the MapViewOfFile() function. The view of the mapped file represents the portion of the file being mapped in the virtual address space of the process—the entire file or only a portion of it may be mapped.

42
Q

The call to CreateFileMapping() creates a

A

named shared-memory object called SharedObject.