🎓 BookMCQ
← Back to 19. Windows 7

📝 Compression in Window 7 (8 MCQs)

Reducing NTFS Storage Use Through Compression

Windows 7 supports NTFS file compression, which reduces the storage space required for eligible files and folders. NTFS uses a compression algorithm to store file data in a more compact form and transparently decompresses it when applications read the content. Applications continue using ordinary file operations without directly managing the compressed representation.

Why Storage Efficiency Must Balance Processing Cost

Files can consume substantial disk capacity, particularly on systems with limited storage. Compression reduces physical space requirements, but compressing and decompressing data requires processor time. The best results occur when the data is compressible and storage capacity is more constrained than CPU processing resources.

Compression Attribute and Transparent File Access

A user or administrator enables compression on a supported NTFS file or directory. NTFS stores eligible file data in compressed units and tracks its allocation. During reads, the filesystem decompresses the required data before returning it to the application; writes are compressed as the filesystem updates storage.

Example of Compressing a Document Folder

A folder contains 100 MB of text documents that compress to 60 MB. Enabling NTFS compression reduces the allocated storage for those files, subject to cluster allocation and compression-unit effects. Applications continue opening and saving documents through normal file operations without manually decompressing each file.

Storage Savings and File Type Limitations

Compression can save space for text, logs, and other compressible files, but already compressed media may gain little. It adds CPU overhead and may reduce performance in heavily accessed workloads. NTFS file compression cannot be applied to files that are encrypted with EFS, so encryption and compression choices must be considered together.

Misconceptions About NTFS Compression

'Compression always reduces every file by the same percentage' ignores data characteristics. 'Compressed files must be manually extracted before reading' overlooks transparent decompression. 'NTFS can compress an EFS encrypted file normally' is false because NTFS file compression and EFS encryption are incompatible on the same file.

Exam Focus: Compression Ratio and Filesystem Behaviour

Calculate compression ratio and space savings from original and compressed sizes. Explain transparent compression during ordinary reads and writes. Questions may compare compression with encryption or ask why media files gain little space and why CPU overhead can affect performance.

Key Terms of NTFS Compression

  • Compression - Reducing storage size of file data.
  • NTFS - Windows filesystem supporting compression.
  • Compression unit - Group of clusters compressed together.
  • Decompression - Restoring the original data representation.
  • EFS - Encrypting File System.
2
Easy
4
Medium
2
Hard

📝 All Compression in Window 7 MCQs

Q1. How many bits are allocated for the page‑file offset in a page‑file PTE?

A.32 ✅
B.20
C.5
D.4
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: The page‑file PTE reserves a 32‑bit field to store the offset of the page within the paging file. This size allows the system to address a large number of pages, supporting typical page sizes of 4 KB. Options B, C, and D refer to other fields (reserved bits, protection bits, and paging‑file selector) but not the offset itself. Understanding the bit layout is essential for interpreting how Windows tracks pages on disk, which directly impacts virtual‑memory management.

Q2. When the VM manager uses a per‑working‑set LRU policy, which characteristic of a page determines its likelihood of being removed?

A.Total size of the page
B.Time since last reference ✅
C.Protection bits of the page
D.Whether the page is dirty
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The LRU (least‑recently‑used) algorithm bases its decision on how long it has been since the page was last referenced. Pages that have not been marked as referenced acquire a higher age and are prime candidates for trimming. The other options—size, protection bits, or dirty state—affect other aspects of memory management but not the LRU ranking. Recognizing this helps predict which pages the system will evict under pressure.

Q3. Why does Windows trim a process’s working set even when physical memory is abundant?

A.To enforce a hard limit on the process’s memory usage ✅
B.Because the process is idle and can be swapped out
C.To free disk space for other applications
D.To improve CPU cache usage
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: A hard limit is a predefined cap on the amount of physical memory a process may occupy. Even if the system has free RAM, the VM manager will respect that limit and trim pages that exceed it. Options B and C describe unrelated reasons, and D concerns cache performance rather than working‑set size. This behavior ensures predictable resource allocation and prevents a single process from monopolizing memory.

Q4. Process X has a hard working‑set limit of 200 MB but currently uses 250 MB while the system has plenty of free RAM. Which pages will the VM manager most likely trim?

A.All pages above 200 MB regardless of recent use ✅
B.Only pages that have not been referenced since the last LRU pass
C.Only dirty pages that need to be written to disk
D.Pages belonging to the system process
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: When a hard limit is exceeded, the manager looks for the oldest pages—those not referenced since the previous LRU scan—to free space without disrupting recent activity. Option A would violate the LRU principle by trimming arbitrarily; C focuses on dirty state, which is secondary to age; D is unrelated to the specific process’s limit. Selecting the unreferenced pages respects both the limit and recent usage patterns.

Q5. In Windows 7, the VM manager may trim rapidly growing processes even when memory is plentiful. What primary system benefit does this policy provide?

A.It reduces the total number of processes running
B.It lowers the latency of interactive applications ✅
C.It increases the size of the paging file
D.It prevents disk fragmentation
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: By trimming fast‑growing processes early, the system keeps enough free physical memory for foreground, interactive applications, thereby improving their responsiveness. The other options either describe unrelated effects (process count, paging‑file size, disk fragmentation) or are not direct consequences of the trimming policy. This approach demonstrates how proactive memory management can enhance user experience even before memory becomes scarce.

Q6. What does it mean that the T, P, and V bits are all zero in a page‑file PTE?

A.The page is currently present in RAM
B.The page is not present and has not been referenced
C.The page is a zero‑on‑demand page allocated on demand ✅
D.The page is shared among multiple processes
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: When the T (transition), P (present), and V (valid) bits are cleared, the entry describes a page that is not resident and will be allocated as zero‑on‑demand when first accessed. This differs from a present page (P = 1) or a referenced page (V = 1). Options A and B misinterpret the bits, and D refers to sharing, which is indicated by different flags. Recognizing this encoding helps understand how Windows lazily allocates memory.

Q7. A page‑file PTE contains a 32‑bit offset of 0x0010ABCD and a 4‑bit paging‑file selector value of 3. If each page is 4 KB, what is the byte address of the page within paging file 3?

A.3×4KB+0x0010ABCD3 \times 4\text{KB} + 0x0010ABCD
B.0x0010ABCD×4KB0x0010ABCD \times 4\text{KB}
C.0x0010ABCD+3×40960x0010ABCD + 3 \times 4096 ✅
D.3×4096+0x0010ABCD3 \times 4096 + 0x0010ABCD
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: The selector value identifies paging file 3, but the actual byte offset is given directly by the 32‑bit field. Multiplying the offset by the page size is unnecessary because the offset already counts bytes. Therefore the correct byte address is the sum of the offset and the selector’s contribution: 0x0010ABCD+3×40960x0010ABCD + 3 \times 4096. Options A and D repeat the same expression but in a different order; B incorrectly multiplies by the page size, yielding an address far beyond the intended range.

Q8. A process has three pages with ages 2, 5, and 5 after two LRU passes. Which page will the VM manager remove first when trimming the working set?

A.The page with age 2
B.Either of the pages with age 5 (choice is arbitrary)
C.The page that was most recently referenced ✅
D.The page with the highest protection level
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: When ages are equal, the manager can choose any of the oldest pages because they are indistinguishable by age alone. The page with age 2 is younger and thus less likely to be removed. Option C refers to recent references, which would have kept the page younger, not older. Option D concerns protection bits, which do not affect trimming order. Therefore, either of the two pages with age 5 may be selected, reflecting the tie‑breaking behavior of the algorithm.

🔗 Related Topics (MCQs)