-
Which kind of block allocation policy would be most appropriate for a
file system to use when magnetic tapes are used to implement the block
storage abstraction? Explain.
Magnetic tapes are strictly sequential access devices; they like to move in
one direction only, and they don't like to change state. Any allocation
policy, including any index policy, runs counter to those two properties is a
poor match to tape drives. That leaves contiguous allocation as the most
appropriate access policy for tape drives.
-
Explain how a file system can be optimized for use as page storage by a
virtual-memory manager.
- Protection - because the paging file system is used by a trusted portion of
the operating system, the usual protections required by general file systems
aren't needed.
- Directories - because the paging file system is being used to store temporary
data, it does not need much in the way of hierarchy, and a flat directory
structure will do. Also, because the paging file system is being used by
other programs, the file names can be terse and machine-oriented (say, 32-bit
integers).
- IO abstractions - because the paging file system is going to be read
and written in page-sized units, which are directly related to disk block
sizes, the file system doesn't need extensive buffering to implement
translations to and from block IO (although some buffering will still be
useful to provide good throughput).
-
True or false: contiguous block allocation implies sequential access.
Explain.
False. Contiguous block allocation means only that a file's data blocks
appear one after the other on the disk. While this makes sequential access
very efficient, it doesn't preclude other forms of access, such as indexed or
random.
-
Which is a more appropriate form of protection when dealing with trojan horse
programs: authentication or authorization? Explain.
Trojan horses work by insinuating themselves into programs that are accepted
as part of a working system. Once in the system, the trojan can act
malevolently from inside the accepted program.
Although some forms of strong authentication can protect against trojans,
authorization provides a more general form of protection by defining exactly
what a program can and cannot do, and to which objects the program has
legitimate access. Strong authorization restricts a program, and its trojan,
to those activities and objects to which it has legitimate need.