Information Technology Reference
In-Depth Information
writes in each of two ways. First, time how long it takes to use the Posix
system calls creat() , write() , and fclose()) directly. Then see how long
these writes take if the program uses the stdio library calls (e.g., fopen() ,
fwrite() , and fclose() ) instead. Explain your results.
11.4
Conclusions and future directions
The file system interface is a stable one, and small variations of interface de-
scribed here can be found in many operating systems and for many storage
devices.
Yet, the file system abstraction is imperfect, and application writers need to
use it carefully to get acceptable performance and reliability. For example, if an
application write() s a file, the update may not be durable when the write()
call returns; application writers often call fsync() to ensure durability of data.
Could better file system APIs simplify programming? For example, if file
systems allowed users to update multiple objects atomically, that might simplify
many applications that currently must carefully constrain the order that their
updates are stored using crude techniques such as using fsync as a barrier
between one set of updates and the next.
Could better file system APIs improve performance? For example, one pro-
posed interface allows an application to direct the operating system to transfer
a range of bytes from a file to a network connection. Such an interface might,
for example, reduce overheads for a movie server that streams movies across a
network to clients.
Search WWH ::




Custom Search