THE WINDOWS NT FILE SYSTEM
Original uncompressed file
Five runs (of which two empties)
(a) An example of a 48-block file being compressed to 32 blocks.
(b) The MFT record for the file after compression.
NTFS supports two mechanisms for programs to detect changes to files and di-
rectories. First is an operation,
, that passes a buffer
and returns when a change is detected to a directory or directory subtree.
sult is that the buffer has a list of
. If it is too small, records are lost.
The second mechanism is the NTFS change journal.
NTFS keeps a list of all
the change records for directories and files on the volume in a special file, which
programs can read using special file-system control operations, that is, the
option to the
API. The journal
file is normally very large, and there is little likelihood that entries will be reused
before they can be examined.
Computers are used nowadays to store all kinds of sensitive data, including
plans for corporate takeovers, tax information, and love letters, which the owners
do not especially want revealed to anyone. Information loss can happen when a
notebook computer is lost or stolen, a desktop system is rebooted using an MS-
DOS floppy disk to bypass Windows security, or a hard disk is physically removed
from one computer and installed on another one with an insecure operating system.
Windows addresses these problems by providing an option to encrypt files, so
that even in the event the computer is stolen or rebooted using MS-DOS, the files
will be unreadable.
The normal way to use Windows encryption is to mark certain
directories as encrypted, which causes all the files in them to be encrypted, and
CASE STUDY 2: WINDOWS 8
new files moved to them or created in them to be encrypted as well.
The actual en-
cryption and decryption are not managed by NTFS itself, but by a driver called
Encryption File System
), which registers callbacks with NTFS.
EFS provides encryption for specific files and directories.
There is also anoth-
er encryption facility in Windows called
which encrypts almost all the
data on a volume, which can help protect data no matter what—as long as the user
takes advantage of the mechanisms available for strong keys. Given the number of
systems that are lost or stolen all the time, and the great sensitivity to the issue of
identity theft, making sure secrets are protected is very important.
number of notebooks go missing every day.
Major Wall Street companies sup-
posedly average losing one notebook per week in taxicabs in New York City alone.
11.9 WINDOWS POWER MANAGEMENT
rides herd on power usage throughout the system.
torically management of power consumption consisted of shutting off the monitor
display and stopping the disk drives from spinning.
But the issue is rapidly becom-
ing more complicated due to requirements for extending how long notebooks can
run on batteries, and energy-conservation concerns related to desktop computers
being left on all the time and the high cost of supplying power to the huge server
farms that exist today.
Newer power-management facilities include reducing the power consumption
of components when the system is not in use by switching individual devices to
standby states, or even powering them off completely using
Multiprocessors shut down individual CPUs when they are not needed, and even
the clock rates of the running CPUs can be adjusted downward to reduce power
consumption. When a processor is idle, its power consumption is also reduced
since it needs to do nothing except wait for an interrupt to occur.
Windows supports a special shut down mode called
, which copies
all of physical memory to disk and then reduces power consumption to a small
trickle (notebooks can run weeks in a hibernated state) with little battery drain.
Because all the memory state is written to disk, you can even replace the battery on
a notebook while it is hibernated.
When the system resumes after hibernation it re-
stores the saved memory state (and reinitializes the I/O devices). This brings the
computer back into the same state it was before hibernation, without having to
login again and start up all the applications and services that were running.
dows optimizes this process by ignoring unmodified pages backed by disk already
and compressing other memory pages to reduce the amount of I/O bandwidth re-
quired. The hibernation algorithm automatically tunes itself to balance between
I/O and processor throughput.
If there is more processor available, it uses expen-
sive but more effective compression to reduce the I/O bandwidth needed.
I/O bandwidth is sufficient, hibernation will skip the compression altogether.