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 989 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 989
958
CASE STUDY 2: WINDOWS 8
CHAP. 11
The next three attributes deal with how directories are implemented.
Small ones
are just lists of files but large ones are implemented using B+ trees.
The logged
utility stream attribute is used by the encrypting file system.
Finally, we come to the attribute that is the most important of all: the data
stream (or in some cases, streams).
An NTFS file has one or more data streams as-
sociated with it.
This is where the payload is.
The
default data stream
is
unnamed (i.e.,
dirpath \ file name::$DATA
), but the
alternate data streams
each
have a name, for example,
dirpath \ file name:streamname:$DATA
.
For each stream, the stream name, if present, goes in this attribute header.
Fol-
lowing the header is either a list of disk addresses telling which blocks the stream
contains, or for streams of only a few hundred bytes (and there are many of these),
the stream itself.
Putting the actual stream data in the MFT record is called an
immediate file
(Mullender and Tanenbaum, 1984).
Of course, most of the time the data does not fit in the MFT record, so this
attribute is usually nonresident.
Let us now take a look at how NTFS keeps track
of the location of nonresident attributes, in particular data.
Storage Allocation
The model for keeping track of disk blocks is that they are assigned in runs of
consecutive blocks, where possible, for efficiency reasons. For example, if the first
logical block of a stream is placed in block 20 on the disk, then the system will try
hard to place the second logical block in block 21, the third logical block in 22,
and so on.
One way to achieve these runs is to allocate disk storage several blocks
at a time, when possible.
The blocks in a stream are described by a sequence of records, each one
describing a sequence of logically contiguous blocks.
For a stream with no holes
in it, there will be only one such record.
Streams that are written in order from be-
ginning to end all belong in this category.
For a stream with one hole in it (e.g.,
only blocks 0–49 and blocks 60–79 are defined), there will be two records. Such a
stream could be produced by writing the first 50 blocks, then seeking forward to
logical block 60 and writing another 20 blocks.
When a hole is read back, all the
missing bytes are zeros.
Files with holes are called
sparse files
.
Each record begins with a header giving the offset of the first block within the
stream. Next comes the offset of the first block not covered by the record.
In the
example above, the first record would have a header of (0, 50) and would provide
the disk addresses for these 50 blocks.
The second one would have a header of
(60, 80) and would provide the disk addresses for these 20 blocks.
Each record header is followed by one or more pairs, each giving a disk ad-
dress and run length.
The disk address is the offset of the disk block from the start
of its partition; the run length is the number of blocks in the run.
As many pairs as
needed can be in the run record.
Use of this scheme for a three-run, nine-block
stream is illustrated in Fig. 11-41.


Ace your assessments! Get Better Grades
Browse thousands of Study Materials & Solutions from your Favorite Schools
Concordia University
Concordia_University
School:
Operating_Systems
Course:
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