|
449 | 449 | \pdfbookmark[1]{file system}{filesys} |
450 | 450 |
|
451 | 451 | \begin{slide} |
452 | | -\sltitle{Systém souborù} |
| 452 | +\sltitle{File system} |
453 | 453 | \setlength{\baselineskip}{0.8\baselineskip} |
454 | 454 | \begin{itemize} |
455 | | -\item adresáøe tvoøí strom, spolu se soubory acyklický graf (na |
456 | | -jeden soubor mù¾e existovat více odkazù). |
457 | | -\item ka¾dý adresáø navíc obsahuje odkaz na sebe '\texttt{.}' |
458 | | -(teèka) a na nadøazený adresáø '\texttt{..}' (dvì teèky). |
459 | | -\item pomocí rozhraní systému souborù se pøistupuje i k dal¹ím |
460 | | -entitám v~systému: |
| 455 | +\item directories form a tree; together with files acyclical graph |
| 456 | +(one file can have multiple references). |
| 457 | +\item each directory also contains reference to itself '\texttt{.}' |
| 458 | +(dot) and to its parent directory '\texttt{..}' (two dots). |
| 459 | +\item using file system interfaces it is possible to access other system |
| 460 | +entities such as: |
461 | 461 | \begin{itemize2} |
462 | 462 | \setlength{\itemsep}{-3pt} |
463 | 463 | \setlength{\topsep}{0pt} |
464 | | - \item periferní zaøízení |
465 | | - \item pojmenované roury |
466 | | - \item sokety |
467 | | - \item procesy (\texttt{/proc}) |
468 | | - \item pamì» (\texttt{/dev/mem}, \texttt{/dev/kmem}) |
469 | | - \item pseudosoubory (\texttt{/dev/tty}, \texttt{/dev/fd/0},\dots) |
| 464 | + \item peripheal devices |
| 465 | + \item named pipes |
| 466 | + \item sockets |
| 467 | + \item processes (\texttt{/proc}) |
| 468 | + \item memory (\texttt{/dev/mem}, \texttt{/dev/kmem}) |
| 469 | + \item pseudo files (\texttt{/dev/tty}, \texttt{/dev/fd/0},\dots) |
470 | 470 | \end{itemize2} |
471 | | -\item z pohledu jádra je ka¾dý obyèejný soubor pole bajtù. |
472 | | -\item v¹echny (i sí»ové) disky jsou zapojeny do jednoho stromu. |
| 471 | +\item from kernel's perspective each regular file is an array of bytes. |
| 472 | +\item all (including network) dirves are connected to single tree. |
473 | 473 | \end{itemize} |
474 | 474 | \end{slide} |
475 | 475 |
|
476 | 476 | \label{DEVFS} |
477 | 477 |
|
478 | 478 | \begin{itemize} |
479 | | -\item zaøízení, soubory v \texttt{/proc}, terminály, pamì» atd. jsou v¹echno |
480 | | -jeden typ souborù - speciální soubory. Dal¹í typy souborù - regulární soubor |
481 | | -(hardlink), adresáø, pojmenovaná roura, socket, symbolický link. |
482 | | -\item novì vytvoøený adresáø má na sebe 2 odkazy -- jeden z nadøazeného |
483 | | -adresáøe, a jeden sám na sebe, '\texttt{.}': |
| 479 | +\item Devices, files in \texttt{/proc}, terminals, memory etc. are of one type |
| 480 | +- special files. More types: regular file (hardlink), directory, named pipe, |
| 481 | +socket, symbolic link. |
| 482 | +\item Newly created directory has 2 references to itself -- one from its parent |
| 483 | +directory and one of itself, '\texttt{.}': |
484 | 484 |
|
485 | 485 | \begin{verbatim} |
486 | 486 | $ mkdir test |
487 | 487 | $ ls -ld test |
488 | 488 | drwx------ 2 janp staff 512 Mar 23 12:46 test |
489 | 489 | \end{verbatim} |
490 | 490 |
|
491 | | -\item root mù¾e v nìkterých systémech strukturu adresáøù zacyklit, ale tím |
492 | | -zmate utility pro procházení filesystému; moc se cyklické struktury |
493 | | -nepou¾ívají. Symbolické linky na adresáøe fungují v¹ude. |
494 | | -\item pojmenované roury (viz strana \pageref{MKFIFO}) lze pou¾ít i mezi |
495 | | -procesy, které nejsou pøíbuzensky spøíznìné. Jinak fungují stejnì jako |
496 | | -nepojmenované roury. |
497 | | -\item zmiòované sokety jsou v doménì UNIX, tj. slou¾í pro komunikaci v rámci |
| 491 | +\item The root user can in some systems create cycle in directory structure |
| 492 | +however that might confuse file system traversal tools; hence the cyclical |
| 493 | +structure is not used much. Symbolic links to directories work everywhere. |
| 494 | +\item Named pipes (see page \pageref{MKFIFO}) can be used between processes |
| 495 | +that do not have ''family'' relationship. Otherwise they work as unnamed pipes. |
| 496 | +\item The sockets noticed above are in the UNIX domain, i.e. they serve for |
| 497 | +communication within one system. The INET domain sockets, used for network |
| 498 | +communication (see page \pageref{NETWORKING}) are not visible in the file system. |
498 | 499 | jednoho systému. Sokety z domény INET, pøes které probíhá sí»ová komunikace, |
499 | 500 | se v systému souborù neobjevují. Sí»ová komunikace zaèíná na stranì |
500 | | -\pageref{NETWORKING}. |
501 | | -\item debuggery pou¾ívají pamì»ové obrazy procesù dostupné v \texttt{/proc}. |
502 | | -Ve vìt¹inì u{}nix-like systémù obsahuje podstrom \texttt{/proc} údaje o jádru |
503 | | -systému a bì¾ících procesech ve formì textových souborù. |
504 | | -\item dne¹ní moderní unixy mívají speciální filesystém \emph{devfs}, jeho¾ |
505 | | -obsah odrá¾í aktuální konfiguraci systému co se týèe pøipojených zaøízení. Tj. |
506 | | -napø. pøi pøipojení USB sticku se v \texttt{/dev} objeví pøíslu¹né diskové |
507 | | -zaøízení. Po fyzickém odpojení zaøízení odkaz z adresáøové struktury opìt |
508 | | -zmizí. |
| 501 | +\item Debuggers use process images available through \texttt{/proc}. |
| 502 | +On most of u{}nix-like systems the \texttt{/proc} tree contains informations |
| 503 | +about kernel and running processes in the form of text files. |
| 504 | +\item Modern Unixes contain special \emph{devfs} filesystem, which reflects |
| 505 | +actual system configuration w.r.t. connected devices. I.e. after connecting |
| 506 | +USB stick a related device will appear under \texttt{/dev}. After physically |
| 507 | +disconnecting it, the item will disappear. |
509 | 508 | \end{itemize} |
510 | 509 |
|
511 | 510 | \endinput |
0 commit comments