Skip to content

Commit bda175e

Browse files
author
Vladimir Kotal
committed
spellcheck
1 parent 3c3184e commit bda175e

File tree

1 file changed

+60
-55
lines changed

1 file changed

+60
-55
lines changed

files.tex

Lines changed: 60 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
systems), \texttt{APFS} (macOS and iOS since 2017), etc. A filesystem can be
2323
either used on local or remote storage, and in case of a remote storage network
2424
filesystem protocols like \texttt{NFS} or \texttt{AFS} are used to access the
25-
data. Note that these network filesystems do not define the filesystem
25+
data. Note that these network file systems do not define the filesystem
2626
structure itself, they only provide for accessing existing filesystems remotely.
2727
Each filesystem also has its limits, a largest file size or the maximum size of
2828
the filesystem itself, for example.
2929
\item Unix does not have A, B, C, D\dots disks as Windows and other systems.
3030
All filesystems are mounted to a single directory hierarchy on any Unix system,
3131
as shown on the slide where you can see the root filesystem and three other
32-
fileystems, mounted on \texttt{/usr}, \texttt{/dev/tty}, and \texttt{/home}
32+
file systems, mounted on \texttt{/usr}, \texttt{/dev/tty}, and \texttt{/home}
3333
directories. You could also further mount other filesystems on directories that
3434
are part of these non-root filesystems.
3535
\item Each filesystem mounted to the common hierarchy may be formatted using a
@@ -41,8 +41,9 @@
4141
filesystems are later mounted via the \texttt{mount} command, usually from
4242
specific startup services based on the system you use. The startup services
4343
sometimes use file \texttt{/etc/fstab} as a source of information about what
44-
filesystems to mount. You can also use \texttt{mount} manually. To unmount a
45-
filesystem, the \texttt{umount} command is used.
44+
filesystems to mount. You can also use \texttt{mount} manually.
45+
To ifdef([[[NOSPELLCHECK]]], [[[unmount]]]) a filesystem, the \texttt{umount}
46+
command is used.
4647
\item Some systems also provide for auto mounting where filesystems are mounted
4748
during the first access attempt, and may be automatically unmounted after a
4849
period of inactivity. Such functionality is usually called an
@@ -64,7 +65,7 @@
6465
\texttt{/tmp} & public directory for temporary files\\
6566
\texttt{/home} & root of home directories\\
6667
\texttt{/var/adm} & administrative files (not on BSD) \\
67-
\texttt{/usr/in{}clude} & header files for C\\
68+
\texttt{/usr/include} & header files for C\\
6869
\texttt{/usr/local} & locally installed software\\
6970
\texttt{/usr/man} & man pages\\
7071
\texttt{/var/spool} & spool (mail, printing,...)
@@ -82,7 +83,7 @@
8283
It contain binaries not needed by typical user.
8384
\item The \texttt{/usr} directory tree contains files that are not changing
8485
while the system is running and are not dependent on given machine.
85-
This property should make it elegible for read-only sharing. On your own
86+
This property should make it eligible for read-only sharing. On your own
8687
machine it will be typically read-write, though.
8788
\item The \texttt{/lib} directory typically contains libraries needed for
8889
programs from the root file system. If all libraries were in \texttt{/usr/lib}
@@ -96,7 +97,7 @@
9697
system is running and are specific for given machine.
9798
\item There can be differences in directory layout found between installations
9899
of the same operating system.
99-
\item The \texttt{hier(7)} manual page on FreeBSD and Linuxu describes directory
100+
\item The \texttt{hier(7)} manual page on FreeBSD and Linux describes directory
100101
hierarchy on these systems. Solaris uses \texttt{filesystem(5)}.
101102
\end{itemize}
102103

@@ -139,7 +140,7 @@
139140
refreshed by a shell script (\texttt{MAKEDEV}) or by hand whenever hardware
140141
configuration changed. Today most of the systems populate the directory on the
141142
fly as kernel detects addition or removal of hardware components
142-
(see \emph{devfs} on page \pageref{DEVFS}).
143+
(see \emph{\texttt{devfs}} on page \pageref{DEVFS}).
143144
\item Immediate write to disk can be forced by using the \texttt{O\_DIRECT}
144145
command via the \texttt{fcntl} system call.
145146
\end{itemize}
@@ -153,7 +154,7 @@
153154
\begin{itemize2}
154155
\item \emsl{partition} -- part of disk, one disk can have multiple
155156
partitions
156-
\item \emsl{logickém volume} -- can be used to connect multiple partitions
157+
\item \emsl{logical volume} -- can be used to connect multiple partitions
157158
(that can reside on distinct disks) into one file system.
158159
\end{itemize2}
159160
\item more choices: striping, mirroring, RAID
@@ -211,7 +212,7 @@
211212
\end{itemize}
212213
\item \emph{boot block} -- for OS boot loader
213214
\item \emph{superblock} -- basic information about the file system: number of
214-
blocks for i-nodes, number of file system block, list of feee blocks (continues
215+
blocks for i-nodes, number of file system block, list of free blocks (continues
215216
in the free block area), list of free i-nodes (after it is exhausted the i-node
216217
table is searched), locks for the lists of free data blocks and i-nodes,
217218
modification flag (used for checking whether the file system was correctly
@@ -280,14 +281,14 @@
280281
\item can be created only within one file system
281282
\item not possible to create for directories
282283
\end{itemize}
283-
\item [symbolic link (symlink, softlink)]~
284+
\item [symbolic link (symlink, ifdef([[[NOSPELLCHECK]]], [[[softlink]]]))]~
284285

285286
\begin{itemize}
286287
\item only reference to the real path of file of different type
287288
(it is marked as '\texttt{l}' in the \texttt{ls -l} output), i.e. the type
288289
of symbolic differs from ordinary file. Its data contain a simple string
289290
-- name of the path, either relative or absolute.
290-
\item different behavior for original and symlink (e.g. upon unlink)
291+
\item different behavior for original and symlink (e.g. upon deletion)
291292
\item watch out for relative and absolute paths when moving symbolic link
292293
\item can point to directory or non-existing file
293294
\end{itemize}
@@ -319,7 +320,7 @@
319320
\item bitmaps for free i-nodes and data blocks
320321
\item data blocks
321322
\end{itemize}
322-
\item bloks of size 4 to ¾ 8 kB, smaller parts stored into block fragments
323+
\item blocks of size 4 to 8 kilobytes, smaller parts stored into block fragments
323324
\item file names up to 255 characters
324325
\end{itemize}
325326
\end{slide}
@@ -330,11 +331,11 @@
330331
\item more file systems: UFS2, Ext3, ReiserFS, XFS, ZFS etc.
331332
\item UFS was still 32-bit, that reflected on maximum file length and maximum
332333
file system size. The 32-bit notation means that i-node numbers are represented
333-
as 32 bit integers. This gives the theoretical filesystem limits.
334-
\item journalling (XFS, Ext3, ReiserFS) -- an effort to reduce the risk of data
334+
as 32 bit integers. This gives the theoretical file system limits.
335+
\item journaling (XFS, Ext3, ReiserFS) -- an effort to reduce the risk of data
335336
loss in case of crash and also to speed up the recovery after crash.
336337
\item ZFS -- modern 128-bit file system developed in Sun Microsystems, since
337-
Solarisu 10; also present in FreeBSD since version 7.
338+
Solaris 10; also present in FreeBSD since version 7.
338339
\end{itemize}
339340

340341
%%%%%
@@ -378,20 +379,22 @@
378379
\end{slide}
379380

380381
\begin{itemize}
381-
\item The \emph{FFS} filesystem introduced in 4.2BSD was historically the second
382-
unix filesystem. Some manufacturers of unix system started to prefer its
383-
considering its better performance and new features, others remained with
384-
\emph{s5fs} from compatibility reasons. This deepened the problem with already
385-
insufficient interoperability between different unix systems. For some
386-
applications neither of these filesystems was enough. Gradually the need to work
387-
with non-unix systems started appearing, e.g. with \emph{FAT}. With growing
382+
\item The \emph{FFS} file system introduced in 4.2BSD was historically the
383+
second unix file system. Some manufacturers of unix system started to prefer its
384+
considering its better performance and new features, others remained with
385+
ifdef([[[NOSPELLCHECK]]], [[[\emph{s5fs}]]]) from compatibility reasons. This
386+
deepened the problem with already insufficient interoperability between
387+
different unix systems. For some
388+
applications neither of these file systems was enough. Gradually the need to
389+
work with non-unix systems started appearing, e.g. with \emph{FAT}. With growing
388390
popularity of computer networks the demand for file sharing between systems
389-
started to increase. This lead to the inception of distributed filesystems
391+
started to increase. This lead to the inception of distributed file systems
390392
-- e.g. \emph{NFS} (Network File System).
391393
\item Given the above described situation it was just a matter of time when
392-
fundamental changes in the filesystem infrastructure will happen to support
393-
multiple filesystem types simultaneously. Several different implementations from
394-
multiple manufacturers were made; in the end the de facto standard became
394+
fundamental changes in the file system infrastructure will happen to support
395+
multiple file system types simultaneously. Several different implementations
396+
from multiple manufacturers were made; in the end the ifdef([[[NOSPELLCHECK]]],
397+
[[[de facto]]]) standard became
395398
the \emph{VFS/vnode} architecture from Sun Microsystems. Today practically all
396399
unix u{}nix-like systems support VFS, even though with often non-compatible
397400
changes. VFS appeared for the first time in 1985 in Solaris 2.0;
@@ -405,26 +408,28 @@
405408
file operations}. This set is referenced by each vnodes corresponding to given
406409
file system. \emsl{This set of functions define vnode interface.} When e.g.
407410
\texttt{open} is called, the kernel will call the corresponding implementation
408-
depending on file system type (e.g. from the \emph{ext2fs} module).
411+
depending on file system type (e.g. from the ifdef([[[NOSPELLCHECK]]],
412+
[[[\emph{ext2fs}]]]) module).
409413
Implementation dependent part of vnode structure is accessible only from
410-
functions of given filesystem; for kernel it is opaque. Next slide will shown
411-
another set of functions that works with filesystems themselves.
414+
functions of given file system; for kernel it is opaque. Next slide will shown
415+
another set of functions that works with file systems themselves.
412416
\emsl{This set defines VFS interface.}
413417
These \emsl{two sets together} constitute the vnode/VFS interface, generally
414418
referred to as VFS.
415419
\item For special file types the situation is a bit more complicated, in SVR4
416-
the \texttt{file} structure points to \emph{snode}
420+
the \texttt{file} structure points to \texttt{snode}
417421
(\emph{shadow-special-vnode}), that defines operations with a device (using the
418-
\emph{spec} filesystem) and using the \texttt{s\_realvp} pointer it refers to
422+
\emph{spec} file system) and using the \texttt{s\_realvp} pointer it refers to
419423
real vnode for the operations with the special file; this file is necessary for
420424
example for checking file access rights. Each device can have multiple special
421-
files, hence more snodes and corresponding real vnodes. All such snodes for one
422-
device have the \texttt{s\_commonvp} pointer to one common snode, this is
423-
however not captured in the picture. When opening a special file, an item
424-
corresponding to the special file is searched in hash table of snodes of opened
425-
devices according to major and minor device number. If the snode is not found,
426-
new one is created. This snode will be then used for operations with the device.
427-
More in [Vahalia].
425+
files, hence more \texttt{snodes} and corresponding real vnodes. All such
426+
\texttt{snodes} for one device have the \texttt{s\_commonvp} pointer to one
427+
common \texttt{snode}, this is however not captured in the picture. When opening
428+
a special file, an item corresponding to the special file is searched in hash
429+
table of \texttt{snodes} of opened devices according to major and minor device
430+
number. If the \texttt{snode} is not found, new one is created. This
431+
\texttt{snode} will be then used for operations with the device. More in
432+
[Vahalia].
428433
\end{itemize}
429434

430435
%%%%%
@@ -468,7 +473,7 @@
468473
\end{slide}
469474

470475
\begin{itemize}
471-
\item The \texttt{proc} and \texttt{user} strucures are created by the kernel
476+
\item The \texttt{proc} and \texttt{user} structures are created by the kernel
472477
for each process. They contain service information about the process.
473478
\item The \texttt{ufchunk} structure contains \texttt{NFPCHUNK} (usually 24)
474479
\emph{file descriptors}, after it is full new \texttt{ufchunk} is allocated.
@@ -513,8 +518,8 @@
513518
\item invalid superblock contents
514519
\end{itemize}
515520
\item the \texttt{fsck} operation is time consuming.
516-
\item journaling (e.g. XFS in IRIXu, Ext3 in Linux) a transactional (ZFS)
517-
filesystems do not need \texttt{fsck}.
521+
\item journaling (e.g. XFS in IRIX, Ext3 in Linux) a transactional (ZFS)
522+
file systems do not need \texttt{fsck}.
518523
\end{itemize}
519524
\end{slide}
520525

@@ -524,9 +529,9 @@
524529
The buffers are saved periodically by special system process (or daemon).
525530
\item The \texttt{fsck} command only checks metadata. If a data corruption
526531
happened it cannot tell, let alone do something about it.
527-
\item Exaple of \texttt{fsck} run on \emsl{unmounted} filesystem:
532+
\item Example of \texttt{fsck} run on \emsl{unmounted} filesystem:
528533
\begin{verbatim}
529-
toor@shewolf:~# fsck /dev/ad0a
534+
toor@shewolf:~# fsck /dev/ad0a
530535
** /dev/ad0a
531536
** Last Mounted on /mnt/flashcard
532537
** Phase 1 - Check Blocks and Sizes
@@ -559,7 +564,7 @@
559564
\item solutions to metadata inconsistency problem:
560565
\begin{itemize}
561566
\setlength{\itemsep}{0ex}
562-
\item \emph{journalling} -- one group of operations dependent on each other
567+
\item \emph{journaling} -- one group of operations dependent on each other
563568
is written to a journal first; if a problem is encountered the journal can
564569
be ``replayed''
565570
\item metadata blocks are written to non-volatile memory first
@@ -572,31 +577,31 @@
572577
\end{slide}
573578

574579
\begin{itemize}
575-
\item filesystem \emph{metadata} = inodes, directories, free block
580+
\item filesystem \emph{metadata} = i-nodes, directories, free block
576581
maps
577582
\item \emph{ext2} uses asynchronous metadata writes even by default and when
578583
in synchronous mode it is much slower to UFS.
579584
\item Dependent operations are for example deleting an item from directory and
580585
deleting disk inode. If the inode is deleted first and then the directory entry
581-
then if there is outage between these two operations then inonsistency follows
586+
then if there is outage between these two operations then inconsistency follows
582587
-- the link points to disk file that does not exist. It is not a problem to
583588
avoid this when using synchronous metadata writes (we know when a what is being
584589
written, the ordering of writes is therefore under our control) however when
585590
using the write-back method it is necessary to solve dependencies of the blocks
586591
because with classic synchronization of cache buffers the kernel is not
587592
interested in which blocks is written first.
588-
\item Often the block dependencies for a cycle. Soft updates can recognize sych
593+
\item Often the block dependencies for a cycle. Soft updates can recognize such
589594
cycle and break it by performing \emph{roll-back} and after the write is done it
590595
performs \emph{roll-forward}.
591596
\item The soft updates performance is comparable to that of UFS with
592597
asynchronous metadata writes.
593-
\item Theoreticall soft updates guratantee that it is not necessary to use
598+
\item Theoretically soft updates guarantee that it is not necessary to use
594599
\texttt{fsck} after the reboot, i.e. that the filesystem is in bootable state.
595-
It is however necessary to use so called \emph{background fsck} for correcting
596-
non-grave errors -- this is considered to be one of the big drawbacks of soft
597-
updates, especially given how sizes of disks grow over time. Example of an error
598-
that does not block booting would be a block that is marked as used however is
599-
not used by any file.
600+
It is however necessary to use so called ifdef([[[NOSPELLCHECK]]],
601+
[[[\emph{background fsck}]]]) for correcting non-grave errors -- this is
602+
considered to be one of the big drawbacks of soft updates, especially given how
603+
sizes of disks grow over time. Example of an error that does not block booting
604+
would be a block that is marked as used however is not used by any file.
600605
\item soft updates are not always recommended for the root filesystem.
601606
The problem is that metadata loss on root file system (see the 30 second
602607
period of writes) can be more dangerous than in \texttt{/usr}, \texttt{/home}
@@ -625,7 +630,7 @@
625630
rename operation so that the roll-back is truly needed -- we could consider that
626631
the inode did not really change and it is not necessary to decide whether to
627632
write it or not; the write of directory reference without increasing reference
628-
count in the inode could get us into situation which is descibed above.
633+
count in the inode could get us into situation which is described above.
629634
\end{itemize}
630635

631636
\endinput

0 commit comments

Comments
 (0)