0
0
Operating Systemsknowledge~20 mins

Contiguous allocation in Operating Systems - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Contiguous Allocation Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Contiguous Allocation

Which of the following best describes contiguous allocation in file storage?

AFiles are stored in scattered blocks linked by pointers, reducing fragmentation but slowing access.
BFiles are stored in consecutive blocks on the disk, making access faster but causing external fragmentation.
CFiles are divided into fixed-size blocks stored anywhere on the disk with an index table.
DFiles are stored in a hierarchical directory structure without concern for physical location.
Attempts:
2 left
💡 Hint

Think about how files are placed physically on the disk and the impact on speed and fragmentation.

📋 Factual
intermediate
2:00remaining
Fragmentation in Contiguous Allocation

What type of fragmentation is most commonly associated with contiguous allocation?

AInternal fragmentation due to fixed block sizes.
BFragmentation caused by file system journaling.
CNo fragmentation occurs in contiguous allocation.
DExternal fragmentation caused by scattered free spaces.
Attempts:
2 left
💡 Hint

Consider how free space is divided when files are stored in consecutive blocks.

🚀 Application
advanced
2:00remaining
Calculating Free Space for Contiguous Allocation

A disk has 1000 blocks. Files A, B, and C occupy 200, 300, and 100 contiguous blocks respectively. If the free space is fragmented into three parts of 150, 100, and 150 blocks scattered across the disk, what is the largest file size that can be stored contiguously?

A400 blocks
B300 blocks
C150 blocks
D450 blocks
Attempts:
2 left
💡 Hint

Look for the largest single free space chunk available for contiguous storage.

🔍 Analysis
advanced
2:00remaining
Comparing Contiguous Allocation with Other Methods

Which of the following is a key disadvantage of contiguous allocation compared to linked allocation?

AIt suffers from external fragmentation and requires compaction.
BIt requires more disk space for pointers.
CIt cannot support random access to file blocks.
DIt causes slower sequential access to files.
Attempts:
2 left
💡 Hint

Think about how files are stored and the impact on free space management.

Reasoning
expert
2:00remaining
Effect of File Size Changes in Contiguous Allocation

If a file stored using contiguous allocation needs to grow beyond its allocated space, what is the most likely consequence?

AThe file must be moved to a larger contiguous free space, causing overhead.
BThe file can automatically extend into the next free block without moving.
CThe file system will split the file into linked blocks to accommodate growth.
DThe file size cannot be changed once allocated.
Attempts:
2 left
💡 Hint

Consider the requirement for contiguous blocks and what happens if the next blocks are occupied.