CS FundamentalsHardGATE CS
A slab allocator is used inside many kernels. Which statement explains its main advantage?
- A. It lets user processes share kernel memory
- B. Caches of pre-initialised objects of one size remove internal fragmentation for those objects and make allocation and free very fast
- C. It uses buddy splitting to reduce external fragmentation of the disk
- D. It avoids the need for paging
Correct answer: B. Caches of pre-initialised objects of one size remove internal fragmentation for those objects and make allocation and free very fast
Each cache holds slabs of objects of exactly one kernel type (e.g. inodes, PCBs); objects are reused without re-initialisation, there is no rounding to powers of two, and allocation is a list pop.
More Operating Systems questions
- Buddy allocation of a 33 KB request from a 1 MB pool gives a block of what size, and how much is internal fragmentation?
- Which file-allocation method supports BOTH efficient direct access and no external fragmentation?
- A directory with 10,000 entries is stored as an unsorted linear list. File creation must check that the name does not already exist. Which…
- A file system uses a buffer cache with write-back. The system crashes right after a program's write() returned. Which statement is correct?
- Which of these is the correct reason that the Unix rename(old, new) within one file system is widely used to update a file safely (write a…
- A process opens the same file twice with two separate open() calls, getting fd 3 and fd 4, and also calls dup(3) to get fd 5. It then…