CS FundamentalsModerateGATE CS · Amazon/Microsoft SDE MCQ
A file system uses 4 KB blocks. A file of 10,001 bytes is stored. How much space is lost to internal fragmentation in its last block?
- A. 2,287 bytes
- B. 1,807 bytes
- C. 0 bytes
- D. 4,095 bytes
Correct answer: A. 2,287 bytes
10,001 bytes need ⌈10,001 / 4096⌉ = 3 blocks = 12,288 bytes, so 12,288 − 10,001 = 2,287 bytes are wasted. Using 1000-byte kilobytes gives the wrong figure 1,999.
More Operating Systems questions
- Statement 1: A context switch between two threads of the same process need not flush the TLB. Statement 2: A context switch between two…
- A process's page table has valid entries for pages 0-5 only. With 1 KB pages, which logical address causes a trap instead of a translation?
- A machine has 46-bit virtual addresses, 16 KB pages and 4-byte page-table entries. Lower page-table levels are full 16 KB pages; the top…
- A machine has 48-bit virtual addresses, 4 KB pages and 4 GB of physical memory and uses a hashed inverted page table. Each IPT entry (one…
- A 3-level paging system has TLB lookup 20 ns and memory access 100 ns. On a TLB miss the three page-table levels are read from memory and…
- A system with a single-level page table has a TLB (lookup 10 ns, done before every access, hit ratio 90%) and a 100 ns memory; a TLB miss…