Home

This document is a cache from http://www.nobius.org/~dbg/practical-file-system-design.pdf


Practical File System Design

Document source : www.nobius.org


156
1 0
T H E V N O D E L AY E R
User level
Kernel
BFS
HFS
NFS
System calls
File descriptors
Vnode layer
Vnode operations
Figure 10-1 Where the BeOS vnode layer resides in the BeOS kernel.
10.1
Background
To understand the BeOS vnode layer, it is useful to first describe the frame-
work in which the BeOS vnode layer operates. The BeOS kernel manages
threads and teams ("processes" in Unix parlance), but file descriptors and all
I/O are the sole purview of the vnode layer. Figure 10-1 illustrates how the
vnode layer meshes with the rest of the kernel and several file systems. The
vnode layer interfaces with user programs through file descriptors and com-
municates to different file systems through vnode operations. In Figure 10-1
there are three file systems (BFS, the Macintosh HFS, and NFS).
The vnode layer in the BeOS completely hides the details of managing file
descriptors, and the rest of the kernel remains blissfully unaware of their
implementation. File descriptors are managed on a per-thread basis. The
BeOS thread structure maintains a pointer,
ioctx
, to an I/O context for each
thread. The
ioctx
structure is opaque to the rest of the kernel; only the
vnode layer knows about it. Within the
ioctx
structure is all the information
needed by the vnode layer.
Figure 10-2 illustrates all of the structures that work together to support
the concept of file descriptors at the user level. Although the overall structure
appears complex, each piece is quite simple. To describe the structure, we
will start at the
thread rec
structure and work our way through the figure all
the way to the structures used by the underlying file system.
Each thread has its own
ioctx
structure. The
ioctx
contains a pointer to
the current working directory (
cwd
) of each thread, a pointer to the array of
open file descriptors (
fdarray
), and a list of monitored vnodes (
mon
; we will
discuss this later). The
fdarray
maintains state about the file descriptors,
Practical File System Design:The Be File System
, Dominic Giampaolo
page 156







Summary :

156 1 0 T H E V N O D E L AY E R User level Kernel BFS HFS NFS System calls File descriptors Vnode layer Vnode operations Figure 10-1 Where the BeOS vnode layer resides in the BeOS kernel. The vnode layer interfaces with user programs through file descriptors and com- municates to different file systems through vnode operations.


Tags : descriptors,beos,structure,kernel,thread,figure,ioctx,system,all,each,101,systems,rest





Terms    |    Link pdf-search-files.com    |    Site Map
   |    Content Removal Notice   
   |    Contact   

All books are the property of their respective owners.
Please respect the publisher and the author for their creations if their books copyrighted