CS FundamentalsHardGATE CS
A file is stored with linked allocation (each block holds a pointer to the next) and nothing is cached. How many disk reads does it take to read logical block 100 (blocks numbered from 0, directory entry in memory), compared with indexed allocation whose single index block is not in memory?
- A. 100 versus 2
- B. 101 versus 2
- C. 101 versus 1
- D. 50 versus 2
Correct answer: B. 101 versus 2
Linked allocation must follow the chain from block 0, reading blocks 0 to 100: 101 reads. Indexed allocation reads the index block and then block 100 directly: 2 reads.
More Operating Systems questions
- Requests arrive at a server at 20 per second, and Little's law applies in steady state. If on average 6 requests are in the system, what…
- Pages are 4 KB and a process has 3 frames. It runs for (i = 0; i < 1024; i++) for (j = 0; j < 1024; j++) A[i][j] = 0; on an int…
- Which statement about the difference between an unsafe state and a deadlocked state (Banker's algorithm) is correct?
- A 32-bit system uses segmentation with paging. A logical address is (segment s, offset d) with d of 32 bits; within a segment, d is split…
- A thread library offers only kernel-level threads (one-to-one). Which change makes thread creation and switching cheapest without losing…
- A program creates threads with for (i = 0; i < 4; i++) pthreadcreate(&t[i], NULL, work, &i); and each thread reads arg as its index. What…