gitweb on Svarog

projekti pod git sistemom za održavanje verzija -- projects under the git version control system
Premestanje nekih delova da moze lakse region da se kompajlira.
[os2skripta.git] / skripta-os2.tex
index eb83bc4..a1a4002 100644 (file)
@@ -1,7 +1,7 @@
 % skripta-os2.tex
 % Skripta za predmet Operativni Sistemi 2, DMI, PMF, NS
 % Doni Pracner, Ivan Pribela
-% 2011/12 -- 2013/14
+% 2011/12 -- 2014/15
 
 \documentclass[a4paper,twoside]{article}
 \usepackage[T1]{fontenc}
@@ -13,8 +13,8 @@
 \newcommand{\inst}{Departman za matematiku i informatiku, PMF, UNS}
 \newcommand{\autorinst}{\autor \\ \inst}
 \newcommand{\naslov}{Skripta za vežbe iz predmeta operativni sistemi 2} 
-\newcommand{\datum}{Februar 2014, Novi Sad}
-\newcommand{\verzija}{ver 14a}
+\newcommand{\datum}{Februar 2015, Novi Sad}
+\newcommand{\verzija}{ver 15a}
 
 \usepackage[serbian]{babel}
 \usepackage{fancyhdr}
@@ -72,76 +72,6 @@ pdfauthor={\autor}%
 %margine
 \usepackage[top=2cm, bottom=2cm, left=2.5cm, right=2cm]{geometry}
 
-\begin{document}
-
-%customize the itemize environments
-
-\let\olditemize=\itemize
-\def\itemize{
-\olditemize
-  \setlength{\itemsep}{1pt}
-  \setlength{\parskip}{0pt}
-  \setlength{\parsep}{0pt}
-  \setlength{\topsep}{-1cm}
-
-}
-
-%% ovi redovi daju header i footer
-
-\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
-\fancyhf{} % delete current setting for header and footer
-%\fancyfoot[C]{\thepage}
-
-\fancyhead[LO]{\bfseries\rightmark}
-\fancyhead[RO]{\thepage}
-
-\fancyhead[RE]{Operativni sistemi 2 -- skripta}
-\fancyhead[LE]{\thepage}
-
-\renewcommand{\headrulewidth}{0.5pt}
-\renewcommand{\headwidth}{\textwidth}
-
-%\renewcommand{\footrulewidth}{0.5pt}
-%\addtolength{\headheight}{0.5pt} % make space for the rule
-\fancypagestyle{plain}{%
-  \fancyhead{} % get rid of headers on plain pages
-  \fancyfoot{}
-  \renewcommand{\headrulewidth}{0pt} % and the line
-  \renewcommand{\footrulewidth}{0pt} % and the line
-}
-\renewcommand{\headheight}{15pt}
-
-%promene u marginama:
-%\setlength{\marginparwidth}{32pt}
-%\setlength{\textwidth}{620pt}
-%\setlength{\textheight}{620pt}
-
-
-%% specijalni blokovi koji služe kao podsetnici u radu ili napomene
-\newcommand{\skica}[1]{
-    \noindent \framebox{\parbox[c]{0.9\textwidth}{  {\small** \textit{#1}  }}
-    \newline }
-}
-
-\newcommand{\skicas}[1]{
-    \framebox{* \textit{#1} *}
-}
-
-%boldovane skice visokog prioriteta
-\newcommand{\skicab}[1]{
-  \noindent \framebox{\parbox[c]{0.9\textwidth}{ {\small***
-        \textbf{#1} }} \newline } }
-
-\newcommand{\kod}[1]{{\small\texttt{#1}}}
-
-% ako je sledeci red odkomentarisan nista od skica nece biti ispisano
-% u finalni dokument
-
- \renewcommand{\skica}[1]{}
-
-
-\maketitle
-
 % theorems, definition etc.
 %''''''''''''''''''''''''''
 
@@ -195,6 +125,78 @@ pdfauthor={\autor}%
 \lstnewenvironment{codeblock-indent}[1][]{\lstset{style=codeblock-indent,#1}}{}
 \lstnewenvironment{terminal}{\lstset{style=terminal}}{}
 
+%% specijalni blokovi koji služe kao podsetnici u radu ili napomene
+\newcommand{\skica}[1]{
+    \noindent \framebox{\parbox[c]{0.9\textwidth}{  {\small** \textit{#1}  }}
+    \newline }
+}
+
+\newcommand{\skicas}[1]{
+    \framebox{* \textit{#1} *}
+}
+
+%boldovane skice visokog prioriteta
+\newcommand{\skicab}[1]{
+  \noindent \framebox{\parbox[c]{0.9\textwidth}{ {\small***
+        \textbf{#1} }} \newline } }
+
+\newcommand{\kod}[1]{{\small\texttt{#1}}}
+
+% ako je sledeci red odkomentarisan nista od skica nece biti ispisano
+% u finalni dokument
+
+ \renewcommand{\skica}[1]{}
+
+%customize the itemize environments
+
+\let\olditemize=\itemize
+\def\itemize{
+\olditemize
+  \setlength{\itemsep}{1pt}
+  \setlength{\parskip}{0pt}
+  \setlength{\parsep}{0pt}
+  \setlength{\topsep}{-1cm}
+
+}
+ \begin{document}
+
+
+%% ovi redovi daju header i footer
+
+\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
+\fancyhf{} % delete current setting for header and footer
+%\fancyfoot[C]{\thepage}
+
+\fancyhead[LO]{\bfseries\rightmark}
+\fancyhead[RO]{\thepage}
+
+\fancyhead[RE]{Operativni sistemi 2 -- skripta}
+\fancyhead[LE]{\thepage}
+
+\renewcommand{\headrulewidth}{0.5pt}
+\renewcommand{\headwidth}{\textwidth}
+
+%\renewcommand{\footrulewidth}{0.5pt}
+%\addtolength{\headheight}{0.5pt} % make space for the rule
+\fancypagestyle{plain}{%
+  \fancyhead{} % get rid of headers on plain pages
+  \fancyfoot{}
+  \renewcommand{\headrulewidth}{0pt} % and the line
+  \renewcommand{\footrulewidth}{0pt} % and the line
+}
+\renewcommand{\headheight}{15pt}
+
+%promene u marginama:
+%\setlength{\marginparwidth}{32pt}
+%\setlength{\textwidth}{620pt}
+%\setlength{\textheight}{620pt}
+
+
+
+
+\maketitle
+
+
 % ----------------==================--------------------------------------
 %                 Pravi pocetak rada
 
@@ -278,7 +280,7 @@ odgovarajućih tipova.  Na primer, mapirajmo poziv \kod{system}, koji
 izvršava prosleđenu komandu u novom \emph{shell}-u. Specifikaciju
 komande možemo videti sa
 \begin{terminal}
-man system
+  man system
 \end{terminal}
 
 odnosno videćemo da je poziv definisan na sledeći način:
@@ -543,9 +545,13 @@ DEFINITION MODULE FOR "C" LibStat32;
          size: INTEGER;
          blksize: INTEGER;
          blocks: INTEGER;
-         atime: LONGINT;
-         mtime: LONGINT;
-         ctime: LONGINT;
+         atime: INTEGER;
+         anano: INTEGER;
+         mtime: INTEGER;
+         mnano:INTEGER;
+         ctime:INTEGER;
+         cnano: INTEGER;
+         unused:LONGINT;
     END;
   \end{codeblock}
 \end{minipage}
@@ -579,6 +585,7 @@ DEFINITION MODULE FOR "C" LibStat32;
          END;
     PTm = POINTER TO Tm;
     PInt = POINTER TO INTEGER;
+    PStat = POINTER TO Stat;
 
   PROCEDURE stat(path: ARRAY OF CHAR; buf: PStat): [INTEGER];
   PROCEDURE localtime(time: PInt): PTm;
@@ -896,15 +903,15 @@ menjanjem fajla \kod{/etc/apt/sources.list} i dodavanjem
 #  GNU Modula-2 repo
 #
 
-deb http://floppsie.comp.glam.ac.uk/debian/ squeeze main 
-deb-src http://floppsie.comp.glam.ac.uk/debian/ squeeze main
+deb http://floppsie.comp.glam.ac.uk/debian/ wheezy main 
+deb-src http://floppsie.comp.glam.ac.uk/debian/ wheezy main
 \end{codeblock-indent}
 
 Alternativno se mogu koristiti sledeće komande:
 
 \begin{terminal}
-sudo add-apt-repository "deb http://floppsie.comp.glam.ac.uk/debian/ squeeze main"
-sudo add-apt-repository "deb-src http://floppsie.comp.glam.ac.uk/debian/ squeeze main"
+sudo add-apt-repository "deb http://floppsie.comp.glam.ac.uk/debian/ wheezy main"
+sudo add-apt-repository "deb-src http://floppsie.comp.glam.ac.uk/debian/ wheezy main"
 \end{terminal}
 
 Većina sistema omogućava i da se ovo uradi preko nekih grafičkih
Svarog.pmf.uns.ac.rs/gitweb maintanance Doni Pracner