Symbolic links, file organization, internal vs external fragmentation

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/99

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 7:29 PM on 4/17/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

100 Terms

1
New cards

What is a file directory

A special file that stores information about other files and directories

2
New cards

What does each directory entry contain

A file name and information needed to access that file

3
New cards

What is a tree structured directory hierarchy

A structure where each directory has one parent and can point to multiple children

4
New cards

What is the root directory

The top level directory with no parent

5
New cards

What is a file system internal ID

A unique identifier assigned to each file or directory for internal use

6
New cards

Are internal IDs visible to users

No

7
New cards

What do users use instead of internal IDs

ASCII names

8
New cards

What is an absolute path

A full path from the root to a file

9
New cards

What symbol usually separates names in a path

Forward slash or backslash

10
New cards

What is a relative path

A path that starts from the current working directory

11
New cards

What is the current working directory

The directory the user is currently in

12
New cards

What does ".." represent

The parent directory

13
New cards

What does the change operation do

Changes the current working directory

14
New cards

What does the create operation do

Creates a new directory

15
New cards

What does the delete operation do

Deletes a directory and all its contents

16
New cards

What does the move operation do

Moves a file or directory to another location

17
New cards

What does the rename operation do

Changes the name of a file or directory

18
New cards

What does the list operation do

Displays contents of a directory

19
New cards

What does the find operation do

Searches for a file or directory by name

20
New cards

What is a directed acyclic directory structure

A structure where files can have multiple parents but no cycles

21
New cards

What problem exists in a tree structure that DAG solves

Limited file sharing

22
New cards

What does the link operation do

Creates another reference to a file or directory

23
New cards

What is a reference count

The number of directory entries pointing to a file

24
New cards

When is a file actually deleted in a DAG

When its reference count becomes 1 and the last link is removed

25
New cards

What happens when a link is deleted but reference count is greater than 1

Only the link is removed and count decreases

26
New cards

What is a cycle in a directory structure

A loop where a directory points back to a higher level directory

27
New cards

Why are cycles dangerous

They can cause infinite loops during searches

28
New cards

What is a symbolic link

A special directory entry that points to a file or directory

29
New cards

How is a symbolic link different from a regular link

Deleting it removes only the link, not the actual file

30
New cards

Why are symbolic links used

To allow sharing without creating multiple parent relationships or cycles

31
New cards

What is a file

A named collection of information stored on secondary storage

32
New cards

What is the purpose of a file system

To manage files and provide access to stored data

33
New cards

Why is direct device management impractical for users

Because devices have complex and varied interfaces

34
New cards

What does the file system hide from users

Details of how data is stored on physical devices

35
New cards

How does a user view a file

As a single abstract unit of data

36
New cards

What are two common views of file structure

Byte stream and record based

37
New cards

What is a byte stream file

A file viewed as a sequence of bytes

38
New cards

What is a record

A group of related data items within a file

39
New cards

How are records identified

By record number or key field

40
New cards

What is an example of a key field

A student ID

41
New cards

What is an access method

A set of operations used to access files

42
New cards

What is the most common access method

Sequential access

43
New cards

How does sequential access work

It reads or writes the next data in order

44
New cards

What does the file system track for sequential access

The current position in the file

45
New cards

What does a read operation do in sequential access

Reads the next n bytes or next record

46
New cards

What is direct access

Accessing data at a specific position

47
New cards

How is direct access performed

By specifying a record number or key

48
New cards

What operation moves to a specific position in a file

Seek

49
New cards

What is required for direct access in record files

A way to calculate record position

50
New cards

What is a fixed length record

A record with the same size as others

51
New cards

Why are fixed length records useful

They allow direct access

52
New cards

How is position calculated in fixed length records

Record number times record length

53
New cards

What is a variable length record

A record with a size that can vary

54
New cards

Why is direct access difficult with variable length records

Because positions cannot be calculated directly

55
New cards

What must be done to find a record in variable length files

Read all previous records

56
New cards

What is file data

The part of the file visible to the user

57
New cards

What is metadata

Information about file structure and organization

58
New cards

Where is metadata stored

In the file header

59
New cards

What is a file header

A section before the file data that stores metadata

60
New cards

What is the purpose of the file header

To help the system understand and manage the file

61
New cards

What is external fragmentation in memory management?

Loss of usable memory due to small gaps between allocated blocks.

62
New cards

What causes external fragmentation when using variable-sized memory allocation?

Allocating and freeing blocks of different sizes creates scattered holes.

63
New cards

What is a “hole” in the context of external fragmentation?

A free block of memory between occupied blocks.

64
New cards

Why does external fragmentation make memory unusable even if free space exists?

Free space is split into small pieces that cannot satisfy large requests.

65
New cards

What is the main difference between a hole and an occupied block?

A hole is free memory. An occupied block is in use by a program.

66
New cards

According to the 50% rule, what is the ratio of holes to occupied blocks?

1 hole for every 2 occupied blocks.

67
New cards

Write the formula that represents the 50% rule.

n = 0.5m

68
New cards

Does the 50% rule depend on allocation strategy? Explain.

No. The ratio stays the same regardless of allocation strategy.

69
New cards

What assumption must hold for the 50% rule to apply?

The probability of finding an exact match is near zero.

70
New cards

Does the 50% rule describe number of holes or total space wasted?

It describes the number of holes, not total space.

71
New cards

How does average hole size affect total memory waste?

Larger holes increase wasted space. Smaller holes reduce waste.

72
New cards

If hole size equals block size, what fraction of memory is wasted?

One third of memory.

73
New cards

Why can smaller hole sizes improve memory utilization?

They reduce the amount of unused memory space.

74
New cards

What happens to the number of holes when a block of type A is released?

It decreases by 1.

75
New cards

What happens to the number of holes when a block of type B or C is released?

It stays the same.

76
New cards

What happens to the number of holes when a block of type D is released?

It increases by 1.

77
New cards

Why does releasing blocks not change the number of holes on average?

All block types are equally likely, so changes cancel out.

78
New cards

Why does allocation not change the number of holes when exact matches are rare?

Allocation only reduces hole size, not the number of holes.

79
New cards

What is meant by a “stable state” in memory allocation?

Average releases equal average allocations.

80
New cards

Why does the hole-to-block ratio remain constant in a stable state?

Because neither allocation nor release changes the average number of holes.

81
New cards

What is memory compaction and how does it address external fragmentation?

It shifts blocks to combine holes into one large hole.

82
New cards

What is swapping and how can it help when no large hole exists?

It moves a block to disk to create a larger free space.

83
New cards

What is internal fragmentation?

Loss of usable memory inside allocated space.

84
New cards

What causes internal fragmentation in paging systems?

Program size is not a multiple of page size.

85
New cards

Where does internal fragmentation occur within a page?

At the end of the last page.

86
New cards

Why does paging eliminate external fragmentation?

All pages and frames have equal size, so no gaps form between them.

87
New cards

Why can paging still lead to wasted memory space?

The last page may not be fully used.

88
New cards

Compare the causes of internal fragmentation and external fragmentation.

Internal is caused by fixed-size pages. External is caused by variable-size allocation.

89
New cards

Compare where unused memory appears in internal vs external fragmentation.

Internal is inside allocated blocks. External is between blocks.

90
New cards

Which type of fragmentation is reduced by compaction and which is not?

Compaction reduces external fragmentation. It does not reduce internal fragmentation.

91
New cards

In contiguous allocation, what does the FCB store to locate a file

The starting block and the file length

92
New cards

A file starts at disk block 50. What disk block stores file block 3

53

93
New cards

Why is sequential access fast in contiguous allocation

Blocks are adjacent, so no seek operations are needed

94
New cards

What is the main cause of fragmentation in contiguous allocation

Free space becomes split into variable sized gaps over time

95
New cards

Why is file expansion difficult in contiguous allocation

The next block may be occupied, so the file must be copied elsewhere

96
New cards

In linked allocation, how is the next block found

Each block contains a pointer to the next block

97
New cards

How many disk reads are needed to access block 2 in a 4 block linked file

3 reads

98
New cards

What is one major disadvantage of linked allocation

Direct access is not possible

99
New cards

In clustered allocation, what does the last block of a cluster store

A pointer to the next cluster and cluster size information

100
New cards

Why is clustered allocation faster than linked allocation

Blocks within a cluster are contiguous, so fewer seeks are needed