🎓 BookMCQ
← Back to 19. Windows 7

📝 NTFS file system B+ tree in window 7 (8 MCQs)

Indexed Directory Organisation in NTFS

NTFS uses B-tree family indexing structures, commonly described as B+ tree style indexes, to organise directory entries and support efficient filename lookup. The index stores key information such as filename attributes and references to file records. This structure allows directories containing many entries to be searched and updated without scanning every filename sequentially.

Why Large Directories Need Balanced Indexes

A linear directory search becomes increasingly expensive as the number of entries grows. Balanced tree structures reduce the number of comparisons needed to locate a name and can support insertions and deletions efficiently. NTFS uses index allocation structures to manage directory entries beyond the smallest resident index representation.

Index Root, Allocation and Lookup

A directory contains an index root attribute holding initial index information. When the directory grows, additional index buffers are allocated and organised through index structures. NTFS compares filename keys during traversal and follows child references until it locates a matching entry or determines that the name is absent.

Example of Searching a Large Directory

A directory contains 10,000 filenames. Rather than comparing the requested name against every entry in sequence, NTFS uses its directory index to follow an ordered path through index nodes. The search visits a limited number of index levels, making lookup more efficient than a full linear scan.

Lookup Performance and Index Maintenance

Balanced indexing improves lookup and insertion behaviour for large directories. Index structures require additional metadata and maintenance when files are created, renamed, or deleted. The exact layout is an NTFS implementation detail, and textbook B+ tree descriptions simplify the actual index and collation rules used by Windows.

Misconceptions About NTFS Directory Indexes

'Every NTFS directory is stored as one flat list' ignores its index structures. 'The B+ tree stores all file contents' confuses filename indexing with data allocation. 'Tree lookup requires checking every entry' overlooks the efficiency of balanced hierarchical searching.

Exam Focus: Directory Index Searching and Growth

Explain how balanced indexes reduce directory lookup work and identify the roles of index root and index allocation. Compare indexed lookup with linear search. Questions may ask why large directories benefit from tree structures or distinguish filename indexes from MFT records and file data runs.

Key Terms of NTFS B+ Tree Indexing

  • B+ tree - Balanced hierarchical search index.
  • Index root - Directory's initial index structure.
  • Index buffer - Storage for additional index entries.
  • Key - Value used to order index entries.
  • Lookup - Search for a directory entry.
3
Easy
3
Medium
2
Hard

📝 All NTFS file system B+ tree in window 7 MCQs

Q1. A Windows system is running low on physical memory. Which of the following actions will the VM manager most likely take first to free memory?

A.Increase each process's minimum working set
B.Trim the oldest pages from each process's working set ✅
C.Disable the LRU aging mechanism
D.Move all pages to the standby list
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The VM manager follows a per‑working‑set LRU policy, so when memory is scarce it looks for the least‑recently used pages in each process. Trimming the oldest pages removes memory that has not been accessed recently, freeing space quickly. Option B describes this behavior. Options A and D would increase memory pressure, while C would stop the aging mechanism, preventing the manager from identifying candidates for removal.

Q2. If a process has a hard limit on its physical memory usage, what will happen when the system has plenty of free memory?

A.The process's working set will automatically expand
B.The process will be forced to swap out pages despite free memory
C.The VM manager will ignore the limit
D.The process will be prevented from growing beyond the limit, even though memory is available ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: A hard limit caps the amount of physical memory a process may occupy, regardless of overall system availability. Therefore the process cannot exceed that cap, and the VM manager will enforce the limit by refusing to allocate additional pages, even if free RAM exists. Option D correctly reflects this enforcement. Option A is opposite, B would cause unnecessary swapping, and C suggests the limit is ignored, which contradicts the definition of a hard limit.

Q3. A page‑file PTE contains 5 bits for protection, a 32‑bit offset, 4 bits for paging‑file selection, and 20 reserved bits. How many bits in total are defined for this PTE?

A.5+32+4+20=615 + 32 + 4 + 20 = 61 bits ✅
B.64 bits
C.56 bits
D.48 bits
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Add the individual fields: 5 protection bits plus 32 bits for the offset, plus 4 bits that identify which paging file, plus 20 reserved bits. The sum is 5+32+4+20=615 + 32 + 4 + 20 = 61 bits, which is the total size of the defined fields. Option A presents the correct calculation. The other options give common round numbers but do not match the actual field sizes described.

Q4. During the periodic pass that ages pages, the VM manager increments the age counter only for pages that have not been marked as referenced. How does this policy affect the ordering of pages for trimming?

A.Pages referenced most recently receive the highest age
B.All pages receive the same age regardless of reference
C.Pages not referenced recently obtain higher age values, making them more likely to be trimmed ✅
D.Age counters are reset to zero for all pages each pass
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: By increasing the age only for pages that lacked a reference bit, the manager assigns larger age values to pages that have not been used recently. Those pages rise to the top of the trim list, so they are the first candidates for removal. Option C captures this effect. Option A reverses the relationship, B ignores the reference status, and D would erase the aging information each cycle, preventing any prioritization.

Q5. Why does Windows use a per‑working‑set LRU replacement policy instead of a single global LRU list?

A.It isolates the impact of one process on others, improving fairness ✅
B.It reduces overall system complexity
C.Global LRU would require more CPU time
D.Per‑working‑set LRU allows unlimited memory use per process
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: A per‑working‑set LRU keeps each process’s memory management independent, so a single heavy‑user cannot evict pages belonging to other processes. This isolation promotes fairness and predictable performance. Option A describes that benefit. Option B is vague; the policy actually adds some complexity. Option C is inaccurate because the CPU overhead is comparable. Option D is false because limits still exist; the policy does not remove memory caps.

Q6. What is the significance of having 4 bits dedicated to selecting the paging file in a page‑file PTE?

A.It limits the system to 16 pages per file
B.It enables up to 2 GB of paging space
C.It allows the OS to address up to 16 distinct paging files ✅
D.It provides encryption keys for each page
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: Four bits can represent 24=162^{4}=16 different values, so the OS can distinguish up to sixteen separate paging files. This capability is useful on systems that spread paging data across multiple files for performance or capacity reasons. Option C reflects this combinatorial capacity. Option A confuses bits with page count, B relates to size rather than file selection, and D invents a security function that is not part of the paging‑file selection field.

Q7. When the T, P, and V bits are all zero in a PTE, what does this indicate about the page?

A.The page is locked in memory
B.The page is a prototype page
C.The page is stored in the page file and not currently resident ✅
D.The page is a system page
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: All three control bits (T for transition, P for prototype, V for valid) being zero means the page is neither present in RAM nor a prototype; instead it resides in the page file awaiting demand load. Therefore the page is non‑resident. Option C matches this interpretation. Options A and D describe different states, and B would require the P bit to be set, which is not the case here.

Q8. How many bits are allocated for page protection in a page‑file PTE?

A.4 bits
B.5 bits ✅
C.6 bits
D.8 bits
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The specification states that the page‑file PTE includes 5 bits dedicated to page protection, which encode read, write, execute, and other attributes. Thus the correct answer is 5 bits. Option B provides this number. The other options (4, 6, 8) do not match the defined field size and would either omit needed protection flags or allocate unnecessary space.

🔗 Related Topics (MCQs)