Skip to content

Commit 66c8942

Browse files
author
Vladimir Kotal
committed
translate system view of open files II. slide
1 parent 4addeec commit 66c8942

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

files.tex

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -482,24 +482,23 @@
482482
\end{slide}
483483

484484
\begin{itemize}
485-
\item struktury \texttt{proc} a \texttt{user} vytváří jádro pro
486-
každý proces a drží v nich služební informace o procesu.
487-
\item struktura \texttt{ufchunk} obsahuje \texttt{NFPCHUNK} (obvykle
488-
24) \emph{deskriptorů souborů}, po zaplnění se alokuje další
489-
\texttt{ufchunk}.
490-
\item struktura \texttt{file} (\emph{otevření souboru}) obsahuje mód
491-
souboru (otevřen pro čtení, zápis, atd.), počet deskriptorů, které
492-
se na ni odkazují, ukazatel na \texttt{vnode} a pozici v souboru.
493-
Jedno otevření souboru může být sdíleno více deskriptory, jestliže
494-
byl původní deskriptor zkopírován, např. voláním \texttt{fork()}
495-
nebo \texttt{dup()}.
496-
\item struktura \texttt{cred} obsahuje uživatelskou a skupinovou
497-
identitu procesu, který otevřel soubor.
498-
\item jeden vnode odpovídající jednomu souboru může být sdíl{}en několika
499-
strukturami file, pokud byl daný soubor vícekrát otevřen.
500-
\item ne všechny vnodes jsou asociovány s tabulkou otevřených
501-
souborů. Např. při spuštění programu je potřeba přistupovat do
502-
spustitelného souboru a proto se alokuje vnode.
485+
\item The \texttt{proc} and \texttt{user} strucures are created by the kernel
486+
for each process. They contain service information about the process.
487+
\item The \texttt{ufchunk} structure contains \texttt{NFPCHUNK} (usually 24)
488+
\emph{file descriptors}, after it is full new \texttt{ufchunk} is allocated.
489+
\item The \texttt{file} structure (\emph{file opening}) contains the mode
490+
of file (whether it is opened for reading, writing, etc.), number of descriptors
491+
that refers to it, the \texttt{vnode} pointer and file position.
492+
One opening of file can be shared by multiple file descriptors,
493+
if the original descriptor was copied e.g. with the \texttt{fork()}
494+
or \texttt{dup()} syscalls.
495+
\item The \texttt{cred} structure contains user and group identity of the
496+
process that opened the file.
497+
\item One vnode corresponding to one file can be shared by multiple file
498+
structures if given file was opened multiple times.
499+
\item Not all vnodes are associated with the table of opened files.
500+
E.g. when executing a program it is necessary to access the executable file and
501+
hence a vnode is allocated for that.
503502
\end{itemize}
504503

505504

0 commit comments

Comments
 (0)