File Systems and Storage Management Flashcards (89 cards)

All cards

1Question

What is a file?

Answer

A named collection of related information recorded on secondary storage.

2Question

What determines the meaning of information in a file?

Answer

Its creator and user.

3Question

How are a file’s information and structure determined?

Answer

By its creator, depending on the file type.

4Question

Which attributes are typical for a file?

Answer

Name, identifier, type, location, size, protection, and creation, modification, and use time, date, and user identification.

5Question

What two steps are required to create a file?

Answer

Find space in the file system and add an entry to the directory.

6Question

What advances after each file read or write operation?

Answer

The file-position pointer advances after each operation.

7Question

What happens when a file is truncated?

Answer

Its contents are released and its length is reset to zero, while its attributes are preserved.

8Question

What file structure must an operating system support to load and run programs?

Answer

An executable-file structure.

9Question

How does sequential access process file information?

Answer

In order, one record after another.

10Question

Which operations advance the file pointer in sequential access?

Answer

Read-next and write-next operations.

11Question

How does direct access identify a file block to read or write?

Answer

By specifying its block number.

12Question

Which operations can file protection control?

Answer

Reading, writing, executing, appending, deleting, and listing.

13Question

What does an access-control list associate with each file or directory?

Answer

User names and their permitted access types.

14Question

Which user classes does a compact file-protection scheme define?

Answer

Owner, group, and universe.

15Question

What access may the three permission fields encode as rwx bits?

Answer

Read, write, and execute access.

16Question

Which structures are stored on disk for each file system?

Answer

A boot control block and volume control block per volume, a directory structure, and a file control block per file.

17Question

Which structures are kept in memory by a file system?

Answer

A mount table, directory-structure cache, system-wide and per-process open-file tables, and buffers for blocks being read or written.

18Question

What does opening a file create in a process's open-file table?

Answer

An entry pointing to the file's system-wide open-file-table entry.

19Question

What happens to a file control block when a file is opened?

Answer

It is copied into the system-wide open-file table if needed.

20Question

How does a linear-list directory find a file entry?

Answer

By performing a linear search.

21Question

What information does a linear-list directory store in each entry?

Answer

A file name and a pointer to its data blocks.

22Question

What does a hash-table directory compute from a file name?

Answer

A value used to return a pointer to the corresponding name in a linear list.

23Question

How does contiguous allocation store a file on disk?

Answer

In a consecutive run of disk blocks.

24Question

What file-location details does a contiguous-allocation directory entry record?

Answer

The starting block and allocated length.

25Question

Which access methods does contiguous allocation support?

Answer

Sequential and direct access.

26Question

What disk-seek requirement does contiguous allocation usually have?

Answer

It usually requires few disk seeks.

27Question

Which strategies commonly choose a free hole in contiguous allocation?

Answer

First-fit and best-fit.

28Question

How does linked allocation represent a file across disk blocks?

Answer

Each block points to the next, while the directory records the first and last blocks.

29Question

What fragmentation and growth benefits does linked allocation provide?

Answer

It avoids external fragmentation and lets files grow as free blocks become available without disk compaction.

30Question

How does linked allocation handle sequential access?

Answer

It supports sequential access efficiently.

31Question

Why is direct access inefficient in linked allocation?

Answer

Finding a particular block requires following pointers from the beginning.

32Question

What does indexed allocation store in each file’s index block?

Answer

The addresses of the file’s data blocks.

33Question

What address does the directory store for an indexed-allocation file?

Answer

The address of its index block.

34Question

In indexed allocation, what does the ith index-block entry point to?

Answer

The ith file block.

35Question

What fragmentation does indexed allocation avoid?

Answer

External fragmentation.

36Question

How do magnetic disks organize information on platter surfaces?

Answer

Platter surfaces are divided into tracks and sectors.

37Question

What forms a cylinder on a magnetic disk?

Answer

Tracks at the same arm position.

38Question

Which two components make up magnetic-disk positioning time?

Answer

Seek time and rotational latency.

39Question

Why can an SSD outperform a magnetic disk?

Answer

It has no moving parts, seek time, or rotational latency.

40Question

How does SSD reliability compare with magnetic disks?

Answer

SSDs can be more reliable than magnetic disks.

41Question

What does disk scheduling select when a drive or controller is busy?

Answer

Which pending disk I/O request to service next.

42Question

How far does SSTF move the head for the example queue starting at cylinder 53?

Answer

236 cylinders.

43Question

What does SCAN do after moving the disk arm from one end to the other?

Answer

It reverses direction.

44Question

What distinguishes C-SCAN from SCAN when the arm returns across the disk?

Answer

C-SCAN does not service requests on the return trip.

45Question

What does low-level formatting create on a blank magnetic disk?

Answer

Sectors containing a header, data area, and trailer.

46Question

What are the two steps for preparing a disk for file storage?

Answer

Partitioning it into cylinder groups, then logically formatting it with initial file-system structures.

47Question

How is a text file organized?

Answer

As characters arranged into lines and possibly pages.

48Question

How is a source file organized?

Answer

As functions containing declarations followed by executable statements.

49Question

What can a loader do with code sections in an executable file?

Answer

Bring them into memory and execute them.

50Question

How does a file name differ from its identifier?

Answer

A name is human-readable; an identifier is a unique, usually numeric, non-human-readable file-system tag.

51Question

What does a file’s location attribute record?

Answer

The device and location where the file is stored.

52Question

What does seeking change without necessarily performing I/O?

Answer

The current file-position pointer.

53Question

What does the system-wide open-file table store?

Answer

Process-independent file information and an open count.

54Question

What commonly indicates a file’s type to users and the operating system?

Answer

Its file extension.

55Question

How does index access locate a file block?

Answer

It searches an index of pointers and follows the relevant pointer.

56Question

How does an operating system decide access under an access-control list?

Answer

It checks whether the requesting user is listed for the requested operation, then allows or denies access.

57Question

What drawback do per-file passwords create for users?

Answer

Users must remember multiple passwords.

58Question

What happens if a shared password for all files is discovered?

Answer

Protection becomes all-or-none.

59Question

How can duplicate file copies help after accidental file-system destruction?

Answer

They can provide reliability through backups such as disk-to-tape copies.

60Question

What is the UFS volume control block called?

Answer

The superblock.

61Question

Where is NTFS volume information stored?

Answer

In the master file table.

62Question

What happens to the system-wide open count when a file is closed?

Answer

It is decremented after the per-process entry is removed.

63Question

What happens when a file's system-wide open count reaches zero?

Answer

Updated metadata is written back and the system-wide entry is removed.

64Question

How can a deleted linear-list directory entry be handled?

Answer

It can be marked unused, linked to a free-entry list, or replaced by the last entry as the directory shrinks.

65Question

How does a chained-overflow hash table resolve collisions?

Answer

It stores each hash entry as a linked list and adds colliding entries to that list.

66Question

Which blocks does a contiguous file of n blocks starting at b occupy?

Answer

Blocks b through b+n−1b+n-1.

67Question

How does compaction reduce external fragmentation in contiguous allocation?

Answer

It relocates files to create one large free region.

68Question

What can preallocating a file’s final size cause?

Answer

Internal fragmentation that wastes space.

69Question

What overhead can clustering reduce in linked allocation, and what can it increase?

Answer

Clustering reduces pointer overhead but can increase internal fragmentation.

70Question

What can a damaged pointer do to a linked-allocation file?

Answer

It can mislink the file into the free-space list or another file.

71Question

What are partial solutions to damaged pointers in linked allocation?

Answer

Doubly linked lists or storing file names and relative block numbers in blocks.

72Question

What does each file-allocation table entry represent?

Answer

It points to the next block in a file, with a special value marking the final block.

73Question

How does indexed allocation’s pointer overhead compare with linked allocation’s?

Answer

It is generally greater.

74Question

How can indexed allocation support large files?

Answer

By linking index blocks, using multilevel indexes, or combining direct and indirect inode pointers.

75Question

In the combined inode scheme, what do the first 12 pointers address?

Answer

Direct data blocks.

76Question

With 4 KB blocks and 12 direct pointers, how much file data can the combined scheme directly access?

Answer

48 KB.

77Question

What determines disk bandwidth?

Answer

Bytes transferred divided by the time from the first service request to completion of the last transfer.

78Question

What causes a head crash on a magnetic disk?

Answer

A disk head damages a platter’s magnetic surface.

79Question

How does SSD cost per megabyte compare with hard disks?

Answer

SSDs are more expensive per megabyte.

80Question

In what order does FCFS service disk requests?

Answer

Arrival order.

81Question

How far does FCFS move the head for the stated queue starting at cylinder 53?

Answer

640 cylinders.

82Question

Why can SSTF cause starvation?

Answer

Nearby requests may indefinitely delay a request farther from the current head position.

83Question

Where do LOOK and C-LOOK reverse or wrap around?

Answer

At the final request in the current direction.

84Question

How large is a sector’s data area usually?

Answer

512 bytes.

85Question

What information can a sector’s header and trailer contain?

Answer

The sector number and an error-correcting code.

86Question

What does a disk controller do with an error-correcting code during writes and reads?

Answer

It stores the code when writing and recalculates it when reading to detect corruption.

87Question

What can initial file-system structures include?

Answer

Maps of free and allocated space and an empty directory.

88Question

How can grouping blocks into clusters affect efficiency?

Answer

It can improve efficiency.

89Question

What distinguishes raw I/O from logical formatting?

Answer

Raw I/O accesses logical blocks without file-system structures; logical formatting creates those structures for file-based use.

Test yourself with the quiz

Answer 34 questions on File Systems and Storage Management.

1. Which description best defines a file in an operating system?

2. Two files contain different kinds of data and have different internal organizations. What best explains this difference?

Take the quiz →

Read the study guide

Go over the full study guide for File Systems and Storage Management.

Read the study guide →

Related classes

Make your own flashcards

Upload your class notes and Revizly writes your flashcards in about a minute.

Flashcard maker