bsdbook-commit Mailing List for bsdbook
Status: Planning
Brought to you by:
h_pandya
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(18) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
---|
From: <h_p...@us...> - 2002-09-01 03:39:57
|
Update of /cvsroot/bsdbook/bsdbook/src In directory usw-pr-cvs1:/tmp/cvs-serv9406 Modified Files: book.tex Log Message: Update copyright to BSDBook Project. Index: book.tex =================================================================== RCS file: /cvsroot/bsdbook/bsdbook/src/book.tex,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- book.tex 28 Aug 2002 03:57:45 -0000 1.5 +++ book.tex 1 Sep 2002 03:39:53 -0000 1.6 @@ -1,6 +1,6 @@ % THE FREEBSD KERNEL REFERENCE % -% Copyright (c) 2002 Hiten Mahesh Pandya +% Copyright (c) 2002 BSDBook Project % All rights reserved. % % Redistribution and use in source and binary forms, with or without |
From: <h_p...@us...> - 2002-09-01 01:43:51
|
Update of /cvsroot/bsdbook/bsdbook/src In directory usw-pr-cvs1:/tmp/cvs-serv23582 Modified Files: acknowledgments.tex Log Message: Add 'Alfred Perlstein' to this sacred file. He had helped me with some Newbus related questions, and other miscelleneous help. Index: acknowledgments.tex =================================================================== RCS file: /cvsroot/bsdbook/bsdbook/src/acknowledgments.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- acknowledgments.tex 25 Aug 2002 00:14:50 -0000 1.2 +++ acknowledgments.tex 1 Sep 2002 01:43:47 -0000 1.3 @@ -5,5 +5,5 @@ \noindent{\emph{I would like to thank the following people for providing me with explanations, and especially being patient Jeroen Ruigrok van der Werven, -Mathew N. Dodd, Warner Losh, Bill Paul, Daug Rabson, Mike Smith, Peter Wemm and -Scott Long.}} +Mathew N. Dodd, Warner Losh, Bill Paul, Daug Rabson, Mike Smith, Peter Wemm, +Scott Long and Alfred Perlstein.}} |
From: <dr...@us...> - 2002-08-29 15:10:21
|
Update of /cvsroot/bsdbook/bsdbook/src In directory usw-pr-cvs1:/tmp/cvs-serv10264 Modified Files: filesys.tex Log Message: vfs continuation Index: filesys.tex =================================================================== RCS file: /cvsroot/bsdbook/bsdbook/src/filesys.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- filesys.tex 28 Aug 2002 11:02:28 -0000 1.1 +++ filesys.tex 29 Aug 2002 15:10:14 -0000 1.2 @@ -98,6 +98,11 @@ with small fixed inode size. It should be mentioned, that this solutuion is used in some modern filesystem, such as linux's ext2 filesystem. +User processes access a files by giving the filename. They don't care about +the inodes. In order to convert the filename into appropriate inode, +a special action called 'name lookup' should be done. This action is +performed by kernel function namei(). + SUBSECTION: The superblock @@ -165,6 +170,41 @@ file size for a directory. As a result, directory sizes are never reduced. +SUBSECTION: Userland - Kernelland interaction + +Now let's figure out, what happened under the hood, when user application +issues 'open' system call in order to open a file. + + o User process issues open() system call, giving the pathname and + desired attributes. + + o System call swithes the execution mode, and now process starts to + execute kernel code. the open() system call hadler calls namei() + function to get the inode for the requested file. The namei() + function allocates the new inode if needed and puts it into global + inode table. Also a record in other system structure is made, called + system file table. System file table contains the records + of every file used by a system at the moment. Each record maintains + the file pointer, file access mode, and pointer to inode. + + o Every process has its own file table. This is just an array of + pointers in U-area. Each element points to a record in system file + table, or is NULL. So file descriptor, returned by an open() system + call, is just an index in that file table. If process opens a new file, + it scans its file table for a NULL pointer (i.e., free slot), puts + the pointer to a system file table record there, and returns an index. + The size of file table determines the maximum number of files that + can be opened by a process. + + o The open() system call returns and integer value which is an index + in the process's file table. + +So the file descriptor is meaningful only in the process context. +Next, if the process issues read() or write() system call, the kernel +will know which file to operate on by looking into process' file table and +following the pointer indexed by a file descriptor. + + SUBSECTION: Weaknesses of s5fs filesystem @@ -188,3 +228,62 @@ Second is the abstraction of inode. The associated methods represent all the actions may have been taken over the file object. +Following this architecture, the filesystem in modern UNIX OS: + + o from user point of view, is a set of files organized in + a hierarchical tree. Files of special types - directories - plays + a role of containers for the files of other types and other + directories. The hierarchical structure has single root, + and may consist of several subtrees. Each subtree is an independent + filesystem, and it becomes a part of a tree by performing + a 'mount' action. A subtree can be mounted on any directory + in main tree. Since those subtrees are independent, inode numbering + is independent in each of them. + + o from user application point of view, a filesystem is a set of + file descriptors opened by a process. In other words, it is + simply an array of integers. Process may use them as parameters to + limited set of filesystem-related system calls such as 'open', + 'write' etc. + + o from kernel point of view, filesystem is a list of vnodes. + +SUBSECTION: vnode and vnode operations + +So the vnode is the key element for VFS. Vnodes are fully in-memory objects, +there are no on-disk structures associated with them. The relationship between +vnode, in-core inode and on-disk inode is as follows: + vnode -> in-core inode -> on-disk inode +Vnode is filesystem-independent object, and it 'references' the +filesystem-dependent inode object, which is the 'copy' of appropriate on-disk +inode object. When process requests a file, the kernel allocates new vnode +object for that. When file is released, it deallocates the vnode object. To +speed up those operations, the vnode cache is maintained by the kernel. + +One vnode is resident in kernel memory permanently: this is the vnode for +the root of the filesystem. + + +SUBSECTION: VFS operations + +When a user process makes a system call that operates on filesystem in +general, the kernel calls the appropriate VFS function. VFS function, +naturally, points to a underlying 'real' filesystem's function. +Here is the list of vfsops methods, and associated system calls: + + Method System Call + + vfs_mount mount + vfs_start - + vfs_unmount unmount + vfs_root - + vfs_quotactl quotactl + vfs_statfs statfs + vfs_sync sync + vfs_vget - + vfs_fhtovp - + vfs_checkexp - + vfs_vptofh - + vfs_init - + vfs_uninit - + vfs_extattrctl - |
From: Hiten P. <hit...@ya...> - 2002-08-28 12:55:51
|
--- dr...@us... wrote: > Log Message: > prototype of filesystem chapter Bravo! :) __________________________________________________ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com |
From: <dr...@us...> - 2002-08-28 11:02:39
|
Update of /cvsroot/bsdbook/bsdbook/src In directory usw-pr-cvs1:/tmp/cvs-serv11100 Added Files: filesys.tex Log Message: prototype of filesystem chapter --- NEW FILE: filesys.tex --- % Contents: Filesystem % $Id: filesys.tex,v 1.1 2002/08/28 11:02:28 drozd Exp $ CHAPTER: Filesystem architecture SECTION: Overview Most of the data UNIX handles is stored in the files. Files are organized in a tree and kept on some data store, mostly on hard disk(s). First UNIX filesystem was s5fs (System V FileSystem), designed for System V UNIX. The FFS filesystem, designed in Berkely, was introduced lately and brought a number of seriuos improvements to reliability and performance. The modern filesystems used in many UNIX flavours exploit the same basic ideas and concepts, pioneered by s5fs and FFS. At older times, only one filesystem was supported by the UNIX kernel. Therefore, UNIX vendors must choose between several filesystems available at that moment. To work out this problem, a new architecture was developed, called Virtual File System, which allows to work with different filesystems at the same time. This attempt was made by several vendors, but Sun's realization appeared most flexible and clean. Later, it was ported with few updates into BSD UNIX (McKusick et al) In this chapter the s5fs architecture will be described. It is pretty outdated nowadays, but describing it is good because of its simplisity. Then, VFS (Virtual File System) interface used in FreeBSD will be discussed, and overview of handling files in user process, and associated data structures. SECTION s5fs architecture It is worth to note that UNIX represents the media where filesystem may reside as a flat array of blocks. Block is the chunk of data with fixed size. The size of a block is defined by underlying driver, and represents a minimal amount of data that the driver can read/write to media. Usually, block size reflects the size of physical sector of underlying media. s5fs resides in one disk partition and consists of three major parts: o superblock Constains general information about the filesystem. o ilist An array of disk inodes. Contains meta-data for all files in filesystem. One of the inodes is the root inode, and the lookup of every other file is done through it. The array has fixed size, i.e. fixed number of inodes is available in system. o data blocks Data storage for a files. Each block is 512 bytes long. SUBSECTION: The inode The key element for the file representation in s5fs is 'inode', which stands for 'index node'. Inode is the data structure, which resides on disk, and contains the file's metadata. Here is the list of most important fields disk inode (struct dinode) has: o di_mode File type (IFREG, IFDIR, IFBLK etc) o di_uid, di_gid UID and GID of the file's owner o di_size File size in bytes o di_atime, di_mtime, di_ctime Time of last access, last modification, and last metadata modification, respectively o di_nlinks Number of hard links o di_addr[13] Data block addresses Prefix `di_' stands for ''Disk Inode''. When process requests a file, kernel reads associated inode into memory. But memory copy (represented by struct inode) is somewhat different from disk inode. That happens because some fields that are in disk inode are unnecesary to keep in memory, for instance, modification times. In other hand, some additional information is required for memory copy, for example, inode locks, to synchronize file access among several processes. Therefore, things end up with two structures - on-disk inode, and in-memory inode, also called in-core inode. Data fields inside in-core inode are prepended by prefix `i_'. Inode must keep the unformation where file data is stored. Since file data blocks may be not contigous, the inode must keep block addresses explicitely. This is the role of di_addr field. The addressing scheme used in s5fs is somewhat sophisticated, but allows to handle relatively large files using small fixed inode size. The simplest way to address data blocks is to keep an array of addresses to them. If to keep inode size fixed, and, say, use 13 elements to store the block adresses, the maximum file size wold be not more than (13 * block size) bytes. This is a very tough restriction. This problem is solved by using indirect addressing. First 10 elements of di_addr field are used as direct block addresses. If the file size is more that (10 * block size) bytes, the 11th and 12-th elements are used. They are interpreted as a block addresses, which contain not file data, but addresses of data blocks. This is one-level indirection. The 13th element uses two-level indirection, i.e. it points to a block containing the addresses to a blocks that contain the addresses of data blocks. Using this addressing mechanism, it is possible to hadle files up to 16MB with small fixed inode size. It should be mentioned, that this solutuion is used in some modern filesystem, such as linux's ext2 filesystem. SUBSECTION: The superblock The superblock contains the information for mounting the filesystem, and general information such as number of inodes, free blocks etc. Each filesystem has just one superblock, which resides at the beginning of a disk partition. Superblock is read into memory at mount time and is resident till unmounting the filesystem. Superblock spans more than one block and has the following data: o s_fsize Filesystem size in blocks, including the superblock itself, array of inodes and data blocks. o s_isize Size of ilist array o s_tfree Number of free blocks o s_tinode Number of free inodes When user process asks to create a new file, an inode must be assigned to it. In terms of efficiency, it is undesirable to scan the the ilist every time new file is created just to find free inode, because ilist array may span several blocks. It is inefficient to keep full array of free inodes in memory as well, since it may be quite big. Therefore, a partial list of free inodes kept in superblock. When the number of free inodes in partial list reaches 0, the kernel scans the ilist array and renew it. While scanning the ilist array, kernel can differ free inode from non-free one by using `di_mode' field, which is always zero for free inodes. When user process writes into file, file data is growing and a new block may be needed accidentally to store arriving data. Once again, the kernel must maintain a list of free blocks to quickly assign it by every request. Since the list of free blocks may be large, it is inefficient to keep it in the memory. The superblock contains just one block of them. The first element in the block used as an address of a block that contains continuation of the list, forming some kind of on-disk linked list. The 'head' of this linked list, therefore, resides in superblock and stays resident in memory. When kernel asked for a free block, it returns the blocks starting from the end of block. When the number of free blocks becomes 1, i.e. just the first element left, the kernel 'follows the list' and reads the block addressed by this element, renewing in-memory list of free blocks. SUBSECTION: Disk layout +---------+ | DIAGRAM | +---------+ SUBSECTION: Directory structure One important feature of s5fs filesystem is that inode does not contain the file name. Filename is stored in a special files - directories, as a common file data. This approach allows any file to have many names. File data for the directory is an array of 16-bytes entries: struct dentry { short d_ino; char d_name[14]; } d_ino field holds an inode of a file, and d_name holds a file name. File name in s5fs is restricted by 14 bytes. First two elements in a directory are fixed: first entry is addressing the directory itself and has a special name ".", and second entry is addressinf the parent directory and has a special name "..". When file is deleted from a directory, the only thing kernel does it sets d_ino field to 0, but does not actually remove the file name and shrink the file size for a directory. As a result, directory sizes are never reduced. SUBSECTION: Weaknesses of s5fs filesystem SECTION: Virtual File System In order to make several filesystems live on one UNIX machine, it is necessary to keep a unified filesystem interface. This unified interface may be considered as an abstract class in terms of OO programming. Every 'real' filesystem is an instance of the class. The VFS (Virtual File System) provides a unified interface - a set of 'virtual functions'. Those funcions must be implemented by an 'instances' - 'real' filesystems. VFS represents two 'classes': o virtual filesystem (struct vfs, associated struct vfsops) o virtual node (struct vnode, assosiated struct vnodeops) First is an abstraction of a filesystem. It has an associated list of methods used to handle general filesystem operations such as mount/unmount etc. Second is the abstraction of inode. The associated methods represent all the actions may have been taken over the file object. |
From: <h_p...@us...> - 2002-08-28 03:57:48
|
Update of /cvsroot/bsdbook/bsdbook/src In directory usw-pr-cvs1:/tmp/cvs-serv8109 Modified Files: book.tex Removed Files: mylayout.sty Log Message: A BIG Oops; I had to remove the mylayout.sty file due to copyright problems. And also, we can just do \usepackage{layout} for automatic inclusion of this file (because it is a part of the LaTeX Tools Distribution). Index: book.tex =================================================================== RCS file: /cvsroot/bsdbook/bsdbook/src/book.tex,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- book.tex 28 Aug 2002 03:47:14 -0000 1.4 +++ book.tex 28 Aug 2002 03:57:45 -0000 1.5 @@ -48,7 +48,7 @@ \fi \usepackage{bsdbook} -\usepackage{mylayout} +\usepackage{layout} \usepackage{makeidx,shortvrb,latexsym} \ifx\pdfoutput\undefined --- mylayout.sty DELETED --- |
From: <h_p...@us...> - 2002-08-28 03:52:30
|
Update of /cvsroot/bsdbook/bsdbook/src In directory usw-pr-cvs1:/tmp/cvs-serv6595 Added Files: mylayout.sty Log Message: Add the 'mylayout' style file to the codebase. --- NEW FILE: mylayout.sty --- %% %% This is file `mylayout.sty', generated %% on <1995/7/3> with the docstrip utility (2.2i). %% %% The original source files were: %% %% layout.dtx (with options: `package') %% %% IMPORTANT NOTICE: %% This file is part of the `tools' bundle %% in the LaTeX2e distribution. %% %% You are not allowed to distribute this file. %% For distribution of the original source see %% the copyright notice in the source file, and %% in the file readme.txt distributed with the %% tools bundle. %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{mylayout} [1995/06/25 v1.1i Show layout parameters] \DeclareOption{dutch}{% \def\Headertext{Kopregel} \def\Bodytext{Broodtekst} \def\Footertext{Voetregel} \def\MarginNotestext{Marge\\Notities} \def\oneinchtext{een inch} \def\notshown{niet getoond} } \DeclareOption{english}{% \def\Headertext{Header} \def\Bodytext{Body} \def\Footertext{Footer} \def\MarginNotestext{Margin\\Notes} \def\oneinchtext{one inch} \def\notshown{not shown} } \DeclareOption{french}{% \def\Headertext{Ent\^{e}te} \def\Bodytext{Corps} \def\Footertext{Pied de page} \def\MarginNotestext{Marge\\Notes} \def\oneinchtext{un pouce} \def\notshown{non affich\'{e}} } \DeclareOption{francais}{\ExecuteOptions{french}} \DeclareOption{verbose}{\let\type\typeout} \DeclareOption{silent}{\let\type\@gobble} \def\lay@value{} \DeclareOption{integers}{% \renewcommand*{\lay@value}[2]{% \expandafter\number\csname #1@#2\endcsname pt}} \DeclareOption{reals}{% \renewcommand*{\lay@value}[2]{\the\csname #2\endcsname}} \ExecuteOptions{english,silent,integers} \ProcessOptions \@ifundefined{bs}{\newcommand\bs{\char '134 }}% {\renewcommand\bs{\char '134 }} \def\ConvertToCount#1#2{% #1=#2 \divide #1 by 65536} \def\SetToHalf#1#2{#1=#2\relax\divide#1by\tw@} \def\SetToQuart#1#2{#1=#2\relax\divide#1by4} \def\Identify#1{% \put(\PositionX,\PositionY){\circle{20}} \put(\PositionX,\PositionY){\makebox(0,0){\tiny #1}} } \def\InsideHArrow#1{{% \ArrowLength = #1 \divide\ArrowLength by \tw@ \advance\ArrowLength by -10 \advance\PositionX by -10 \ifnum\ArrowLength<\z@ \put(\PositionX,\PositionY){\vector(1,0){-\ArrowLength}} \advance\PositionX by 20 \put(\PositionX,\PositionY){\vector(-1,0){-\ArrowLength}} \else \put(\PositionX,\PositionY){\vector(-1,0){\ArrowLength}} \advance\PositionX by 20 \put(\PositionX,\PositionY){\vector(+1,0){\ArrowLength}} \fi }} \def\InsideVArrow#1{{% \ArrowLength = #1 \divide\ArrowLength by \tw@ \advance\ArrowLength by -10 \advance\PositionY by -10 \put(\PositionX,\PositionY){\vector(0,-1){\ArrowLength}} \advance\PositionY by 20 \put(\PositionX,\PositionY){\vector(0,+1){\ArrowLength}} }} \def\OutsideHArrow#1#2#3{{% \PositionX = #1 \advance\PositionX by #3 \put(\PositionX,\PositionY){\vector(-1,0){#3}} \PositionX = #1 \advance\PositionX-#2 \advance\PositionX by -#3 \put(\PositionX,\PositionY){\vector(+1,0){#3}} }} \def\OutsideVArrow#1#2#3#4{{% \PositionY = #1 \advance\PositionY by -#3 \put(\PositionX,\PositionY){\vector(0,+1){#3}} \PositionY = #1 \advance\PositionY#2 \advance\PositionY#4 \put(\PositionX,\PositionY){\vector(0,-1){#4}} }} \def\Show#1#2{\bs #2 = \lay@value{#1}{#2}} \def\Type#1#2{% \type{#2 = \lay@value{#1}{#2}}} \newcount\oneinch \oneinch=72 \newcount\cnt@paperwidth \newcount\cnt@paperheight \ConvertToCount\cnt@paperwidth\paperwidth \ConvertToCount\cnt@paperheight\paperheight \newcount\cnt@hoffset \newcount\cnt@voffset \ConvertToCount\cnt@hoffset\hoffset \ConvertToCount\cnt@voffset\voffset \newcount\cnt@textheight \newcount\cnt@textwidth \ConvertToCount\cnt@textheight\textheight \ConvertToCount\cnt@textwidth\textwidth \newcount\cnt@topmargin \newcount\cnt@oddsidemargin \newcount\cnt@evensidemargin \ConvertToCount\cnt@topmargin\topmargin \ConvertToCount\cnt@oddsidemargin\oddsidemargin \ConvertToCount\cnt@evensidemargin\evensidemargin \newcount\cnt@headheight \newcount\cnt@headsep \ConvertToCount\cnt@headheight\headheight \ConvertToCount\cnt@headsep\headsep \newcount\cnt@marginparsep \newcount\cnt@marginparwidth \newcount\cnt@marginparpush \ConvertToCount\cnt@marginparsep\marginparsep \ConvertToCount\cnt@marginparwidth\marginparwidth \ConvertToCount\cnt@marginparpush\marginparpush \newcount\cnt@footskip \ConvertToCount\cnt@footskip\footskip \newcount\fheight \fheight=12 \newcount\ref@top \ref@top=\cnt@paperheight \advance\ref@top by -\oneinch \newcount\ref@hoffset \newcount\ref@voffset \ref@hoffset=\cnt@hoffset \advance\cnt@hoffset by \oneinch \ref@voffset=\cnt@voffset \cnt@voffset=\ref@top \advance\cnt@voffset by -\ref@voffset \newcount\ref@head \ref@head=\ref@top \advance\ref@head by -\ref@voffset \advance\ref@head by -\cnt@topmargin \advance\ref@head by -\cnt@headheight \newcount\ref@body \ref@body=\ref@head \advance\ref@body by -\cnt@headsep \advance\ref@body by -\cnt@textheight \newcount\ref@foot \ref@foot=\ref@body \advance\ref@foot by -\cnt@footskip \newcount\ref@margin \newcount\ref@marginwidth \newcount\ref@marginpar \newcount\Interval \newcount\ExtraYPos \newcount\PositionX \newcount\PositionY \newcount\ArrowLength \newcommand\layout{% \@layout \if@twoside \@layout \fi} \newcommand\@layout{% \thispagestyle{empty} \if@twoside \ifodd\count\z@ \typeout{Two-sided document style, odd page.} \ref@marginwidth=\cnt@oddsidemargin \ref@marginpar=\oneinch \advance\ref@marginpar by \ref@hoffset \advance\ref@marginpar by \cnt@oddsidemargin \ref@margin\ref@marginpar \if@reversemargin \advance\ref@marginpar by -\cnt@marginparsep \advance\ref@marginpar by -\cnt@marginparwidth \else \advance\ref@marginpar by \cnt@textwidth \advance\ref@marginpar by \cnt@marginparsep \fi \else \typeout{Two-sided document style, even page.} \ref@marginwidth=\cnt@evensidemargin \ref@marginpar=\oneinch \advance\ref@marginpar by \ref@hoffset \advance\ref@marginpar by \cnt@evensidemargin \ref@margin\ref@marginpar \if@reversemargin \advance\ref@marginpar by \cnt@textwidth \advance\ref@marginpar by \cnt@marginparsep \else \advance\ref@marginpar by -\cnt@marginparsep \advance\ref@marginpar by -\cnt@marginparwidth \fi \fi \else \typeout{One-sided document style.} \ref@marginwidth=\cnt@oddsidemargin \ref@marginpar=\oneinch \advance\ref@marginpar by \ref@hoffset \advance\ref@marginpar by \cnt@oddsidemargin \ref@margin\ref@marginpar \if@reversemargin \advance\ref@marginpar by -\cnt@marginparsep \advance\ref@marginpar by -\cnt@marginparwidth \else \advance\ref@marginpar by \cnt@textwidth \advance\ref@marginpar by \cnt@marginparsep \fi \fi \setlength{\unitlength}{.5pt} \begin{picture}(\cnt@paperwidth,\cnt@paperheight) \centering \thicklines \put(0,0){\framebox(\cnt@paperwidth,\cnt@paperheight){\mbox{}}} \put(0,\cnt@voffset){\dashbox{10}(\cnt@paperwidth,0){\mbox{}}} \put(\cnt@hoffset,0){\dashbox{10}(0,\cnt@paperheight){\mbox{}}} \put(\ref@margin,\ref@head){% \framebox(\cnt@textwidth,\cnt@headheight)% {\footnotesize\Headertext}} \put(\ref@margin,\ref@body){% \framebox(\cnt@textwidth,\cnt@textheight){\Bodytext}} \put(\ref@margin,\ref@foot){% \framebox(\cnt@textwidth,\fheight){\footnotesize\Footertext}} \put(\ref@marginpar,\ref@body){% \framebox(\cnt@marginparwidth,\cnt@textheight)% {\footnotesize\shortstack{\MarginNotestext}}} \thinlines \SetToHalf\PositionX\cnt@textwidth \advance\PositionX by \ref@margin \PositionY = \ref@body \advance\PositionY by 50 \Identify{8} \InsideHArrow\cnt@textwidth \SetToHalf\PositionY\cnt@textheight \advance\PositionY by \ref@body \PositionX = \cnt@textwidth \divide\PositionX by 5 \multiply \PositionX by 4 \advance\PositionX by \ref@margin \Identify{7} \InsideVArrow\cnt@textheight \PositionY = \ref@foot \SetToHalf\PositionX\cnt@hoffset \Identify{1} \InsideHArrow\cnt@hoffset \SetToQuart\PositionY\cnt@textheight \advance\PositionY by \ref@body \OutsideHArrow\ref@margin\ref@marginwidth{20} \PositionX = \cnt@hoffset \advance\PositionX by -30 \Identify{3} \SetToQuart\PositionY\cnt@textheight \advance\PositionY by \ref@body \advance\PositionY by 30 \SetToHalf\PositionX\cnt@marginparwidth \advance\PositionX by \ref@marginpar \Identify{10} \InsideHArrow\cnt@marginparwidth \advance\PositionY by 30 \if@twoside \ifodd\count\z@ \OutsideHArrow\ref@marginpar\cnt@marginparsep{20} \PositionX = \ref@marginpar \else \OutsideHArrow\ref@margin\cnt@marginparsep{20} \PositionX = \ref@margin \fi \else \OutsideHArrow\ref@marginpar\cnt@marginparsep{20} \PositionX = \ref@marginpar \fi \advance\PositionX by 30 \Identify{9} \PositionX = \cnt@textwidth \divide\PositionX by 8 \advance\PositionX by \ref@margin \OutsideVArrow\ref@foot\cnt@footskip{20}{20} \PositionY = \ref@foot \advance\PositionY by -30 \Identify{11} \PositionX = \cnt@paperwidth \advance\PositionX by -50 \PositionY = \cnt@paperheight \ExtraYPos = \PositionY \advance\ExtraYPos by -\cnt@voffset \advance\PositionY by \cnt@voffset \divide\PositionY by \tw@ \Identify{2} \InsideVArrow\ExtraYPos \Interval = \cnt@textwidth \divide\Interval by 8 \PositionX = \ref@margin \advance\PositionX by \Interval \Identify{4} \ExtraYPos = \ref@head \advance\ExtraYPos\cnt@headheight \ArrowLength = \PositionY \advance\ArrowLength-\ExtraYPos \advance\ArrowLength-\cnt@topmargin \advance\ArrowLength-10% \OutsideVArrow\ExtraYPos\cnt@topmargin{20}{\ArrowLength} \advance\PositionX by \Interval \Identify{5} \advance\ArrowLength\cnt@topmargin \OutsideVArrow\ref@head\cnt@headheight{20}{\ArrowLength} \advance\PositionX by \Interval \Identify{6} \advance\ArrowLength\cnt@headheight \ExtraYPos=\ref@body \advance\ExtraYPos\cnt@textheight \OutsideVArrow\ExtraYPos\cnt@headsep{20}{\ArrowLength} \end{picture} \medskip \vtop to 0pt{% \@minipagerestore\footnotesize\ttfamily \begin{tabular}{@{}rl@{\hspace{20pt}}rl} 1 & \oneinchtext\ + \bs\texttt{hoffset} & 2 & \oneinchtext\ + \bs\texttt{voffset} \\ 3 & \if@twoside \ifodd\count\z@ \Show{cnt}{oddsidemargin} \else \Show{cnt}{evensidemargin} \fi \else \Show{cnt}{oddsidemargin} \fi & 4 & \Show{cnt}{topmargin} \\ 5 & \Show{cnt}{headheight} & 6 & \Show{cnt}{headsep} \\ 7 & \Show{cnt}{textheight} & 8 & \Show{cnt}{textwidth} \\ 9 & \Show{cnt}{marginparsep}&10& \Show{cnt}{marginparwidth} \\ 11& \Show{cnt}{footskip} & & \Show{cnt}{marginparpush} \rlap{(\notshown)}\\ & \Show{ref}{hoffset} & & \Show{ref}{voffset} \\ & \Show{cnt}{paperwidth} & & \Show{cnt}{paperheight} \\ \end{tabular}\vss} \Type{ref}{hoffset} \Type{ref}{voffset} \Type{cnt}{textheight} \Type{cnt}{textwidth} \newpage } \endinput %% %% End of file `layout.sty'. |
From: <h_p...@us...> - 2002-08-28 03:51:31
|
Update of /cvsroot/bsdbook/bsdbook In directory usw-pr-cvs1:/tmp/cvs-serv6454 Modified Files: TODO Log Message: Add new entries to the TODO list, and make it reflect reality. Index: TODO =================================================================== RCS file: /cvsroot/bsdbook/bsdbook/TODO,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- TODO 23 Aug 2002 15:03:17 -0000 1.2 +++ TODO 28 Aug 2002 03:51:27 -0000 1.3 @@ -5,8 +5,19 @@ completed. Other tasks will be added soon. o Build Framework for LaTeX (WIP) - o Ability to convert from LaTeX to HTML + + - Add ability to build DVI files + - Add ability to build Postscript files + - Add ability to effectively cleanup + - Add ability to use LaTeX2HTML + o Content for the website. - o Set the build framework. + + - Upload this list to the site + - Add introductory content to the site + + o Copy the Copyright from the book.tex file + into a seperate COPYRIGHT file in this + directory. $Id$ |
From: <h_p...@us...> - 2002-08-28 03:47:17
|
Update of /cvsroot/bsdbook/bsdbook/src In directory usw-pr-cvs1:/tmp/cvs-serv4945 Modified Files: book.tex Log Message: Oops; My previous commit shaved off the paragraph indentation command by mistake. Lets re-add it. Index: book.tex =================================================================== RCS file: /cvsroot/bsdbook/bsdbook/src/book.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- book.tex 28 Aug 2002 03:43:52 -0000 1.3 +++ book.tex 28 Aug 2002 03:47:14 -0000 1.4 @@ -75,6 +75,7 @@ \makeindex \typeout{Copyright \copyright 2002. BSDBook Project. All Rights Reserved.} +\setlength{\parindent}{0pt} \begin{document} \frontmatter |
From: <h_p...@us...> - 2002-08-28 03:43:56
|
Update of /cvsroot/bsdbook/bsdbook/src In directory usw-pr-cvs1:/tmp/cvs-serv2735 Modified Files: book.tex title.tex Log Message: Change 2 of 2. This delta will complete the first step towards a workable build system for the BSDBook. - Add (modified) BSD Copyright. (This will go into a COPYRIGHT file) - Add some useful info to the preamble - Add $Id$ tag - Add \ifx commands to conditionally process PDF related - Add hyperref in the non-PDF case - Move \pdfcompresslevel to a sane place - Remove unwanted spaces - Conditional processing for the 'Title Page' (PDF) bookmark. Index: book.tex =================================================================== RCS file: /cvsroot/bsdbook/bsdbook/src/book.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- book.tex 28 Aug 2002 02:53:21 -0000 1.2 +++ book.tex 28 Aug 2002 03:43:52 -0000 1.3 @@ -1,8 +1,58 @@ +% THE FREEBSD KERNEL REFERENCE +% +% Copyright (c) 2002 Hiten Mahesh Pandya +% All rights reserved. +% +% Redistribution and use in source and binary forms, with or without +% modification, are permitted provided that the following conditions +% are met: +% +% 1. Redistributions of source code (LaTeX) must retain the above copyright +% notice, this list of conditions and the following disclaimer. +% 2. Redistributions in output/binary form (PDF, PS, DVI) must reproduce the +% above copyright notice, this list of conditions and the following +% disclaimer in the documentation and/or other materials provided with the +% distribution. +% +% THIS DOCUMENTATION IS PROVIDED BY THE BSDBOOK PROJECT ``AS IS'' AND +% ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +% IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +% ARE DISCLAIMED. IN NO EVENT SHALL THE BSDBOOK PROJECT BE LIABLE +% FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +% DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +% OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +% HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +% LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +% OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF +% SUCH DAMAGE. +% +% +% ---------------------------------------------------------------------------- +% In-order to process bsdbook, you will need TeX 3.x, LaTeX and makeindex. +% Please refer to the MANIFEST file for information on the source files. You +% will also need the 'verbatim.sty' and 'layout.sty' from the LaTeX Tools +% distribution. +% +% More information about the bsdbook project can be found at: +% http://bsdbook.sourceforge.net/ +% ---------------------------------------------------------------------------- +% +% $Id$ + +\ifx\pdfoutput\undefined +\documentclass[11pt,a4paper,twoside]{book} +\usepackage{hyperref} +\else \documentclass[pdftex,11pt,a4paper,twoside]{book} +\usepackage{thumbpdf} % FIXME: Any need of options? +\fi + \usepackage{bsdbook} \usepackage{mylayout} -\usepackage{thumbpdf,makeidx,shortvrb,latexsym} +\usepackage{makeidx,shortvrb,latexsym} +\ifx\pdfoutput\undefined +\else \RequirePackage[pdftex, colorlinks, hyperindex, @@ -11,23 +61,22 @@ plainpages=false, bookmarks,bookmarksnumbered, hypertexnames,breaklinks]{hyperref} -\pdfcompresslevel=9 - \pdfinfo { /Title (FreeBSD Device Drivers -- Design and Implementation) /Creator (LaTeX) /Producer (pdfTeX 3.14) - /Author (BSDBook Project) + /Author (The BSDBook Project) /CreationDate (18 August 2002) /Subject (Device Drivers, Kernel, Virtual Memory) } \def\pdfBorderAttrs{/Border [0 0 0] } % No border arround Links +\pdfcompresslevel=9 +\fi + \makeindex \typeout{Copyright \copyright 2002. BSDBook Project. All Rights Reserved.} -\setlength{\parindent}{0pt} \begin{document} - \frontmatter \begin{titlepage} \include{title} @@ -39,5 +88,4 @@ \include{overview} \backmatter - \end{document} Index: title.tex =================================================================== RCS file: /cvsroot/bsdbook/bsdbook/src/title.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- title.tex 28 Aug 2002 02:53:21 -0000 1.2 +++ title.tex 28 Aug 2002 03:43:53 -0000 1.3 @@ -1,6 +1,10 @@ % Contents: The title page % $Id$ +\ifx\pdfoutput\undefined +\else \pdfbookmark{Title Page}{title} +\fi + \newlength{\centeroffset} \setlength{\centeroffset}{-0.5\oddsidemargin} \addtolength{\centeroffset}{0.5\evensidemargin} @@ -11,7 +15,7 @@ \flushright {\Huge\bfseries FreeBSD Kernel Reference} \noindent\rule[-1ex]{\textwidth}{5pt}\\[2.5ex] -\hfill\textbf{\emph{\Large The text that should not leave your desk}} +\hfill\emph{\Large The text that should not leave your desk} \end{minipage}} \vspace{\stretch{1}} |
From: <h_p...@us...> - 2002-08-28 02:53:25
|
Update of /cvsroot/bsdbook/bsdbook/src In directory usw-pr-cvs1:/tmp/cvs-serv12979 Modified Files: book.tex title.tex Log Message: This commit will allow the LaTeX output (only PDF at the moment) to display text in the normal justified format. The titlepage (title.tex) was not allowing the document to do the Right Thing(tm). Changes: - Change font size to 11pt (clearer and crisp) - Replace the mitpress style with the mylayout style (from LaTeX distro) - Change paragraph indentation to 0pt, i.e. no (para) indentation - Wrap \include{title} with (begin/end){titlepage} so that it doesnt mess up justification (i.e. paragraph spacing) of the document - Add a missing brace, '}' to title.tex so it will process without erroring out. (title.tex) This is commit 1 of 2; Next commit will allow conditional based processing of the LaTeX sources, which will allow us to produce HTML, and other plethora of output formats. Index: book.tex =================================================================== RCS file: /cvsroot/bsdbook/bsdbook/src/book.tex,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- book.tex 24 Aug 2002 19:44:19 -0000 1.1.1.1 +++ book.tex 28 Aug 2002 02:53:21 -0000 1.2 @@ -1,6 +1,6 @@ -\documentclass[pdftex,10pt,a4paper,twoside]{book} +\documentclass[pdftex,11pt,a4paper,twoside]{book} \usepackage{bsdbook} -\usepackage{mitpress} +\usepackage{mylayout} \usepackage{thumbpdf,makeidx,shortvrb,latexsym} \RequirePackage[pdftex, @@ -24,11 +24,14 @@ \def\pdfBorderAttrs{/Border [0 0 0] } % No border arround Links \makeindex \typeout{Copyright \copyright 2002. BSDBook Project. All Rights Reserved.} - +\setlength{\parindent}{0pt} + \begin{document} \frontmatter +\begin{titlepage} \include{title} +\end{titlepage} \include{acknowledgments} \tableofcontents Index: title.tex =================================================================== RCS file: /cvsroot/bsdbook/bsdbook/src/title.tex,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- title.tex 24 Aug 2002 19:44:19 -0000 1.1.1.1 +++ title.tex 28 Aug 2002 02:53:21 -0000 1.2 @@ -1,6 +1,5 @@ % Contents: The title page % $Id$ - \pdfbookmark{Title Page}{title} \newlength{\centeroffset} \setlength{\centeroffset}{-0.5\oddsidemargin} @@ -36,4 +35,4 @@ BSD License.\\ \end{small} -\endinput +\endinput} |
From: <h_p...@us...> - 2002-08-28 02:44:15
|
Update of /cvsroot/bsdbook/bsdbook/src In directory usw-pr-cvs1:/tmp/cvs-serv12606 Removed Files: book.idx Log Message: Remove book.idx; Its a generated file which is not meant to be here. --- book.idx DELETED --- |
From: <h_p...@us...> - 2002-08-28 02:42:41
|
Update of /cvsroot/bsdbook/bsdbook/src In directory usw-pr-cvs1:/tmp/cvs-serv12096 Removed Files: book.out Log Message: Remove a generated file. This file was not meant to be here in the first place. --- book.out DELETED --- |
From: <h_p...@us...> - 2002-08-28 02:28:28
|
Update of /cvsroot/bsdbook/bsdbook/src In directory usw-pr-cvs1:/tmp/cvs-serv6107 Removed Files: mitpress.sty Log Message: Remove mitpress.sty (style file); We are now using the LShort2e Modified styles. Also, the MIT Press style has got some paragraph display problems which can be avoided. --- mitpress.sty DELETED --- |
From: <h_p...@us...> - 2002-08-25 00:14:55
|
Update of /cvsroot/bsdbook/bsdbook/src In directory usw-pr-cvs1:/tmp/cvs-serv17293 Modified Files: acknowledgments.tex Log Message: s/Overview/Acknowledgments Index: acknowledgments.tex =================================================================== RCS file: /cvsroot/bsdbook/bsdbook/src/acknowledgments.tex,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- acknowledgments.tex 24 Aug 2002 19:44:19 -0000 1.1.1.1 +++ acknowledgments.tex 25 Aug 2002 00:14:50 -0000 1.2 @@ -1,4 +1,4 @@ -% Contents: Overview +% Contents: Acknowledgments % $Id$ \chapter{Acknowledgments} |
From: <h_p...@us...> - 2002-08-25 00:02:41
|
Update of /cvsroot/bsdbook/CVSROOT In directory usw-pr-cvs1:/tmp/cvs-serv14488 Modified Files: modules Log Message: Add 'src' module. Index: modules =================================================================== RCS file: /cvsroot/bsdbook/CVSROOT/modules,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- modules 22 Aug 2002 15:11:41 -0000 1.1 +++ modules 25 Aug 2002 00:02:37 -0000 1.2 @@ -24,3 +24,5 @@ # character to interpose another module into the current module. This # can be useful for creating a module that consists of many directories # spread out over the entire source repository. + +src bsdbook/src |
From: <h_p...@us...> - 2002-08-24 19:47:02
|
Update of /cvsroot/bsdbook/bsdbook In directory usw-pr-cvs1:/tmp/cvs-serv17658 Modified Files: README Added Files: MANIFEST Log Message: README: bsdbook can only be processed using PDFLaTeX MANIFEST: List of files contained in the distribution --- NEW FILE: MANIFEST --- MANIFEST README TODO src src/Makefile src/acknowledgments.tex src/book.pdf src/book.tex src/fancyhea.sty src/header.sty src/bsdbook.sty src/mitpress.sty src/overview.tex src/title.tex Index: README =================================================================== RCS file: /cvsroot/bsdbook/bsdbook/README,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- README 23 Aug 2002 15:00:31 -0000 1.1.1.1 +++ README 24 Aug 2002 19:46:58 -0000 1.2 @@ -13,4 +13,11 @@ More information about the FreeBSD Kernel Reference can be found in the bsd...@li... mailing list. +--------------------------------------------------- +NOTE: THE BOOK CAN ONLY BE PROCESSED USING PDFLATEX +--------------------------------------------------- + +The mystyle.sty, fancyhea.sty are the copyright of +Tobias Oetiker, from the "lshort2e" book distribution. + $Id$ |
From: <h_p...@us...> - 2002-08-24 19:44:24
|
Update of /cvsroot/bsdbook/bsdbook/src In directory usw-pr-cvs1:/tmp/cvs-serv17084 Log Message: Important the basic layout. Status: Vendor Tag: HEAD Release Tags: start N bsdbook/src/acknowledgments.tex N bsdbook/src/book.tex N bsdbook/src/bsdbook.sty N bsdbook/src/overview.tex N bsdbook/src/title.tex N bsdbook/src/fancyhea.sty N bsdbook/src/header.sty N bsdbook/src/mitpress.sty N bsdbook/src/Makefile N bsdbook/src/book.idx N bsdbook/src/book.out No conflicts created by this import ***** Bogus filespec: - Imported sources |
From: <h_p...@us...> - 2002-08-23 15:03:20
|
Update of /cvsroot/bsdbook/bsdbook In directory usw-pr-cvs1:/tmp/cvs-serv21126 Modified Files: TODO Log Message: Remove superfluous entry. Index: TODO =================================================================== RCS file: /cvsroot/bsdbook/bsdbook/TODO,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- TODO 23 Aug 2002 15:00:31 -0000 1.1.1.1 +++ TODO 23 Aug 2002 15:03:17 -0000 1.2 @@ -6,7 +6,6 @@ o Build Framework for LaTeX (WIP) o Ability to convert from LaTeX to HTML - o LaTeX writing style. o Content for the website. o Set the build framework. |
From: <h_p...@us...> - 2002-08-23 15:00:36
|
Update of /cvsroot/bsdbook/bsdbook In directory usw-pr-cvs1:/tmp/cvs-serv19609 Log Message: Add the bsdbook's neccessary file. Status: Vendor Tag: HEAD Release Tags: start N bsdbook/README N bsdbook/TODO No conflicts created by this import ***** Bogus filespec: - Imported sources |