Modern Operating Systems by Herbert Bos ...
Modern_Operating_Systems_by_Herbert_Bos_and_Andrew_S._Tanenbaum_4th_Ed.pdf-M ODERN O PERATING S YSTEMS
Showing 986-987 out of 1137
Modern Operating Systems by Herbert Bos and Andrew...
Modern_Operating_Systems_by_Herbert_Bos_and_Andrew_S._Tanenbaum_4th_Ed.pdf-M ODERN O PERATING S YSTEMS
Modern Operating Systems by Herbert...
Modern_Operating_Systems_by_Herbert_Bos_and_Andrew_S._Tanenbaum_4th_Ed.pdf-M ODERN O PERATING S YSTEMS
Page 986
SEC. 11.8
CP/M, where each directory entry was called an extent. A bitmap keeps track of
which MFT entries are free.
The MFT is itself a file and as such can be placed anywhere within the volume,
thus eliminating the problem with defective sectors in the first track.
the file can grow as needed, up to a maximum size of 2
The MFT is shown in Fig. 11-39. Each MFT record consists of a sequence of
(attribute header, value) pairs.
Each attribute begins with a header telling which
attribute this is and how long the value is.
Some attribute values are variable
length, such as the file name and the data.
If the attribute value is short enough to
fit in the MFT record, it is placed there.
If it is too long, it is placed elsewhere on
the disk and a pointer to it is placed in the MFT record.
This makes NTFS very ef-
ficient for small files, that is, those that can fit within the MFT record itself.
The first 16 MFT records are reserved for NTFS metadata files, as illustrated
in Fig. 11-39. Each record describes a normal file that has attributes and data
blocks, just like any other file. Each of these files has a name that begins with a
dollar sign to indicate that it is a metadata file. The first record describes the MFT
file itself.
In particular, it tells where the blocks of the MFT file are located so that
the system can find the MFT file. Clearly, Windows needs a way to find the first
block of the MFT file in order to find the rest of the file-system information.
way it finds the first block of the MFT file is to look in the boot block, where its
address is installed when the volume is formatted with the file system.
Metadata files
1 KB
First user file
(Reserved for future use)
(Reserved for future use)
(Reserved for future use)
(Reserved for future use)
Extentions: quotas,etc
Case conversion table
Security descriptors for all files
$BadClus List of bad blocks
Bootstrap loader
Bitmap of blocks used
Root directory
Attribute definitions
Volume file
$LogFile Log file to recovery
Mirror copy of MFT
Master File Table
Figure 11-39.
The NTFS master file table.

Page 987
CHAP. 11
Record 1 is a duplicate of the early portion of the MFT file. This information
is so precious that having a second copy can be critical in the event one of the first
blocks of the MFT ever becomes unreadable.
Record 2 is the log file. When struc-
tural changes are made to the file system, such as adding a new directory or remov-
ing an existing one, the action is logged here before it is performed, in order to in-
crease the chance of correct recovery in the event of a failure during the operation,
such as a system crash.
Changes to file attributes are also logged here.
In fact, the
only changes not logged here are changes to user data.
Record 3 contains infor-
mation about the volume, such as its size, label, and version.
As mentioned above, each MFT record contains a sequence of (attribute head-
er, value) pairs.
file is where the attributes are defined. Information
about this file is in MFT record 4.
Next comes the root directory, which itself is a
file and can grow to arbitrary length.
It is described by MFT record 5.
Free space on the volume is kept track of with a bitmap.
The bitmap is itself a
file, and its attributes and disk addresses are given in MFT record 6.
The next
MFT record points to the bootstrap loader file. Record 8 is used to link all the bad
blocks together to make sure they never occur in a file. Record 9 contains the se-
curity information.
Record 10 is used for case mapping.
For the Latin letters A-Z
case mapping is obvious (at least for people who speak Latin).
Case mapping for
other languages, such as Greek, Armenian, or Georgian (the country, not the state),
is less obvious to Latin speakers, so this file tells how to do it. Finally, record 11 is
a directory containing miscellaneous files for things like disk quotas, object identi-
fiers, reparse points, and so on.
The last four MFT records are reserved for future
Each MFT record consists of a record header followed by the (attribute header,
value) pairs.
The record header contains a magic number used for validity check-
ing, a sequence number updated each time the record is reused for a new file, a
count of references to the file, the actual number of bytes in the record used, the
identifier (index, sequence number) of the base record (used only for extension
records), and some other miscellaneous fields.
NTFS defines 13 attributes that can appear in MFT records.
These are listed in
Fig. 11-40.
Each attribute header identifies the attribute and gives the length and
location of the value field along with a variety of flags and other information.
Usually, attribute values follow their attribute headers directly, but if a value is too
long to fit in the MFT record, it may be put in separate disk blocks.
Such an
attribute is said to be a
nonresident attribute
The data attribute is an obvious
candidate. Some attributes, such as the name, may be repeated, but all attributes
must appear in a fixed order in the MFT record.
The headers for resident attributes
are 24 bytes long; those for nonresident attributes are longer because they contain
information about where to find the attribute on disk.
The standard information field contains the file owner, security information,
the timestamps needed by POSIX, the hard-link count, the read-only and archive
bits, and so on.
It is a fixed-length field and is always present.
The file name is a

Ace your assessments! Get Better Grades
Browse thousands of Study Materials & Solutions from your Favorite Schools
Concordia University
Great resource for chem class. Had all the past labs and assignments
Leland P.
Santa Clara University
Introducing Study Plan
Using AI Tools to Help you understand and remember your course concepts better and faster than any other resource.
Find the best videos to learn every concept in that course from Youtube and Tiktok without searching.
Save All Relavent Videos & Materials and access anytime and anywhere
Prepare Smart and Guarantee better grades

Students also viewed documents