📝 NTFS file system Internal Layout in window 7 (14 MCQs)
NTFS On Disk Structure and Metadata Organisation
NTFS is the primary advanced filesystem associated with Windows 7 installations. Its internal layout organises files and directories through Master File Table records, attributes, data runs, allocation metadata, and a transaction log. This structure supports large volumes, access control, journaling, compression, encryption, and recovery while presenting applications with a familiar hierarchical file interface.
Why NTFS Uses Records Rather Than Simple Directory Entries
Large filesystems require more detailed metadata than a simple filename-to-block list. NTFS stores file information in structured records and represents many properties as attributes. This design supports flexible metadata, large files, alternate data streams, and efficient indexing, although the internal structures require careful consistency management.
MFT Records, Attributes and Data Runs
The Master File Table contains records describing files and directories. Each record holds attributes such as filename, security information, timestamps, and data mapping. Small files may store data directly in a resident data attribute, while larger files use nonresident attributes containing mapping information for disk clusters.
Example of Locating a File's Data
A directory entry identifies a file through its MFT record reference. The record contains filename and metadata attributes, together with a data attribute. If the file is nonresident, its data runs identify allocated cluster ranges, allowing NTFS to locate the required contents on the volume.
Scalability, Metadata Overhead and Recovery
NTFS structures support large directories, permissions, sparse files, compression, and journaling. Metadata updates require coordinated writes, and damaged MFT records can affect file accessibility. The filesystem maintains backup metadata structures and a transaction log, but serious storage failures may still require recovery tools or backups.
Misconceptions About NTFS Layout
'The MFT stores every file's contents directly' is false because large file data is usually nonresident. 'A directory is only a flat text list' ignores indexed directory structures. 'Journaling prevents every file content loss' overlooks the distinction between metadata consistency and data durability.
Exam Focus: MFT, Attributes and Cluster Mapping
Explain the roles of MFT records, attributes, data runs, and directory indexes. Distinguish resident from nonresident file data. Questions may trace a filename to its file record and then to allocated clusters, or examine how NTFS stores metadata and recovers structural consistency after a crash.
Key Terms of NTFS Internal Layout
- MFT - Master File Table.
- Attribute - Metadata or data stored in an MFT record.
- Data run - Mapping to allocated disk clusters.
- Resident data - File data stored inside an MFT record.
- Cluster - NTFS allocation unit on a volume.
📝 All NTFS file system Internal Layout in window 7 MCQs
Q1. A page-file PTE reserves 32 bits for the page‑file offset. What is the maximum offset value (in bytes) that can be represented if each offset unit corresponds to a 4‑KB page?
📖 Explanation: The offset field counts pages, not bytes. With 32 bits you can address up to 2^{32} pages. Multiplying by the page size of 4 KB (2^{12} bytes) gives 2^{32+12}=2^{44} bytes as the highest representable offset. Option B states this value, making it correct. The other options either ignore the page‑size multiplication or use the wrong exponent, so they do not match the maximum byte offset that the PTE can encode.
Q2. A server process has a working set of 120 MB. The system detects low free memory and decides to trim 15 % of the working set. Approximately how many megabytes will be removed?
📖 Explanation: Fifteen percent of 120 MB is calculated as 0.15 × 120 = 18 MB. Option C matches this result, so it is the correct answer. Option A (12 MB) corresponds to a 10 % trim, Option B (15 MB) would be a 12.5 % reduction, and Option D (20 MB) reflects a 16.7 % cut. Understanding percentage calculations helps administrators predict memory reclamation during low‑memory conditions.
Q3. Process A frequently accesses pages 1‑4, while Process B accesses pages 5‑8 intermittently. If the VM manager must free 2 pages using the per‑working‑set LRU policy, which pages are most likely selected?
📖 Explanation: The LRU policy removes pages that have not been used recently. Because Process B’s pages (5‑8) are accessed intermittently, they become older than the constantly referenced pages of Process A. Therefore the two oldest pages are most likely among 5‑6, making option C correct. Options A and B contain frequently used pages, so they are unlikely to be chosen. Option D could also be old, but the first two older pages are typically 5‑6.
Q4. Process X has a hard limit of 64 MB on its working set but currently uses 70 MB. Which action will the VM manager take?
📖 Explanation: When a process exceeds its hard limit, the VM manager actively trims pages to bring usage back within the allowed range. Option B describes this behavior and is therefore correct. The manager does not raise the limit automatically (Option A), nor does it swap the whole process (Option C). Ignoring the limit until memory pressure occurs (Option D) would violate the hard‑limit contract.
Q5. A PTE contains 4 bits to select the paging file. How many distinct paging files can the system address?
📖 Explanation: Four bits provide 2^{4}=16 different combinations, allowing the system to address up to 16 separate paging files. Option D reflects this calculation and is correct. Options A, B, and C correspond to 2^{2}, 2^{3}, and an incorrect linear count, respectively, and thus underestimate the addressable range.
Q6. Process Y's working set grows from 200 MB to 350 MB within a minute while memory is abundant. What policy does Windows 7 employ that may still trigger trimming?
📖 Explanation: Windows 7 introduced a policy that monitors the rate of working‑set growth. Even when overall memory is plentiful, a process that expands quickly can be trimmed to protect system responsiveness. Option C captures this behavior. The other options describe older or nonexistent policies: trimming solely on low memory (A), relying only on hard limits (B), or never trimming (D) are not accurate for Windows 7.
Q7. The VM manager makes a pass through a working set every 5 seconds, incrementing the age of pages not marked referenced. If a page has not been referenced for 20 seconds, what is its age value assuming the initial age is 0?
📖 Explanation: A pass occurs at 5‑second intervals: at 5 s, 10 s, 15 s, and 20 s. Each pass adds one to the age for pages that remain unreferenced, resulting in four increments. Therefore the age becomes 4, matching option C. Options A and B underestimate the number of passes, while Option D adds an extra increment that does not occur within the 20‑second window.
Q8. Why are the T, P, and V bits set to zero in a page‑file PTE?
📖 Explanation: In a page‑file PTE, the T (Transition), P (Present), and V (Valid) bits being zero signals that the page is not currently resident in physical memory. This status tells the memory manager that the page must be fetched from the paging file when accessed. Option B correctly describes this meaning. The other choices either imply the page is present (A), assign read‑only status (C), or suggest a reserved purpose (D), none of which align with the zero‑bit semantics.
Q9. What is the purpose of incrementing the age of pages that have not been marked as referenced since the last VM manager pass?
📖 Explanation: Increasing the age of unreferenced pages creates a metric that the VM manager uses to decide which pages are least recently used. Older pages become prime candidates for trimming, helping reclaim memory. Option B captures this intention. Options A and C misinterpret the age as a positive attribute, and Option D suggests a file‑management action not performed by the aging mechanism.
Q10. How does using a per‑working‑set LRU replacement policy improve overall system responsiveness?
📖 Explanation: The per‑working‑set LRU policy selects pages that have not been used recently, freeing those that are least likely to be needed again soon. By removing such pages, the system avoids swapping out heavily used data, reducing latency and keeping interactive tasks responsive. Option C accurately describes this benefit. The other options either misstate the policy’s effect (A, B) or refer to unrelated hardware performance (D).
Q11. When the VM manager decides how much of a working set to trim, which factor is NOT typically considered by its heuristics?
📖 Explanation: Heuristics evaluate memory pressure, process importance, and recent page activity to balance performance and fairness. The size of the paging file, however, does not directly influence how many pages to trim from a specific process, making Option D the correct answer. Options A, B, and C are all common inputs to the trimming decision, so they are not the correct choice.
Q12. What is the most likely use of the 20 reserved bits in a page‑file PTE?
📖 Explanation: Reserved bits are kept for potential future enhancements without breaking compatibility. They are often allocated for features like compression status, encryption flags, or other metadata that may be added later. Option A reflects this forward‑looking purpose. The other options describe concrete information that already has dedicated fields elsewhere (physical address, process ID, file path) and would not be placed in reserved bits.
Q13. How many bits in a page‑file PTE are allocated for page protection?
📖 Explanation: The page‑file PTE specification includes a 5‑bit field dedicated to page‑protection attributes, allowing a variety of read, write, and execute permissions. Option C correctly states this number. Options A, B, and D either underestimate or overestimate the allocated bits, making them incorrect.
Q14. Which bit in a PTE is cleared when a page is not referenced during a VM manager pass?
📖 Explanation: The Referenced (or Accessed) bit records whether a page has been accessed since the last scan. During each VM manager pass, pages that remain unreferenced have this bit cleared, allowing the age counter to increase. Option C correctly identifies this bit. The Valid bit indicates presence, the Modified bit tracks writes, and the Dirty bit is a synonym for Modified; none of these are cleared solely due to lack of reference.