\relax \ifx\hyper@anchor\@undefined \global \let \oldcontentsline\contentsline \gdef \contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}} \global \let \oldnewlabel\newlabel \gdef \newlabel#1#2{\newlabelxx{#1}#2} \gdef \newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}} \AtEndDocument{\let \contentsline\oldcontentsline \let \newlabel\oldnewlabel} \else \global \let \hyper@last\relax \fi \@writefile{toc}{\pcontentsline{1}{Introduction}{2}{2}{1}} \@writefile{toc}{\pcontentsline{0}{What is a process?}{2}{3}{}} \newlabel{sld:what-is-a-process-2}{{3}{5}{What is a process? --- 2\relax }{section*.2}{}} \@writefile{toc}{\pcontentsline{0}{What is a process? --- 2}{3}{4}{}} \@writefile{toc}{\pcontentsline{0}{What is a thread?}{4}{5}{}} \@writefile{toc}{\pcontentsline{0}{Program counter}{5}{6}{}} \@writefile{toc}{\pcontentsline{0}{Environment of a process}{6}{7}{}} \@writefile{toc}{\pcontentsline{0}{Permissions of a Process}{7}{8}{}} \@writefile{toc}{\pcontentsline{1}{Multitasking}{8}{8}{1}} \@writefile{toc}{\pcontentsline{0}{Multitasking}{8}{9}{}} \@writefile{toc}{\pcontentsline{0}{Multitasking --- 2}{9}{10}{}} \@writefile{toc}{\pcontentsline{0}{Multitasking --- 3}{10}{11}{}} \@writefile{toc}{\pcontentsline{1}{Start of Process}{11}{11}{1}} \@writefile{toc}{\pcontentsline{0}{Birth of a Process}{11}{12}{}} \@writefile{toc}{\pcontentsline{0}{Process tree}{12}{13}{}} \@writefile{toc}{\pcontentsline{1}{Scheduler}{13}{13}{1}} \@writefile{toc}{\pcontentsline{0}{Scheduler}{13}{14}{}} \@writefile{toc}{\pcontentsline{0}{When to Switch Processes?}{14}{15}{}} \@writefile{toc}{\pcontentsline{0}{Scheduling statistics: \texttt {vmstat}}{15}{16}{}} \@writefile{toc}{\pcontentsline{0}{Interrupts}{16}{17}{}} \@writefile{toc}{\pcontentsline{1}{Process States}{17}{17}{1}} \newlabel{sld:process-states}{{17}{11}{Process States\relax }{section*.16}{}} \@writefile{toc}{\pcontentsline{0}{Process States}{17}{18}{}} \@writefile{toc}{\pcontentsline{0}{What is Most Common State?}{18}{19}{}} \newlabel{sld:most-processes-are-blocked}{{19}{11}{Most Processes are Blocked\relax }{section*.18}{}} \@writefile{toc}{\pcontentsline{0}{Most Processes are Blocked}{19}{20}{}} \@writefile{toc}{\pcontentsline{0}{Linux Process States}{20}{21}{}} \@writefile{toc}{\pcontentsline{0}{Linux Process States --- 2}{21}{22}{}} \@writefile{toc}{\pcontentsline{0}{Linux Process States --- 3}{22}{23}{}} \@writefile{toc}{\pcontentsline{0}{Process States: \texttt {vmstat}}{23}{24}{}} \@writefile{toc}{\pcontentsline{0}{Tools for monitoring processes}{24}{25}{}} \@writefile{toc}{\pcontentsline{0}{Monitoring processes in Win 2000}{25}{26}{}} \@writefile{toc}{\pcontentsline{1}{top}{26}{27}{1}} \newlabel{sld:top}{{27}{14}{Process Monitoring --- \texttt {top}\relax }{section*.26}{}} \@writefile{toc}{\pcontentsline{0}{Process Monitoring --- \texttt {top}}{27}{28}{}} \newlabel{sld:top-load-average}{{28}{15}{\texttt {top}: load average\relax }{section*.27}{}} \@writefile{toc}{\pcontentsline{0}{load average}{28}{29}{}} \newlabel{sld:top-process-states}{{29}{15}{\texttt {top}: process states\relax }{section*.28}{}} \@writefile{toc}{\pcontentsline{0}{\texttt {top}: process states}{29}{30}{}} \newlabel{sld:top-and-memory}{{30}{16}{\texttt {top}: Processes and Memory\relax }{section*.29}{}} \@writefile{toc}{\pcontentsline{0}{top and memory}{30}{31}{}} \@writefile{toc}{\pcontentsline{0}{Virtual Memory: suspended processes}{31}{32}{}} \@writefile{toc}{\pcontentsline{0}{Suspended Processes}{32}{33}{}} \@writefile{toc}{\pcontentsline{1}{Process Control Blocks}{33}{34}{1}} \newlabel{sld:process-control-blocks}{{34}{18}{OS Process Control Structures\relax }{section*.33}{}} \@writefile{toc}{\pcontentsline{0}{OS Process Control Structures}{34}{35}{}} \newlabel{sld:what-is-in-a-pcb}{{35}{18}{What is in a PCB\relax }{section*.34}{}} \@writefile{toc}{\pcontentsline{0}{What is in a PCB}{35}{36}{}} \newlabel{sld:context-switch}{{36}{19}{Context Switch\relax }{section*.35}{}} \@writefile{toc}{\pcontentsline{0}{Context Switch}{36}{37}{}} \newlabel{sld:execution-context}{{37}{20}{Execution Context\relax }{section*.36}{}} \@writefile{toc}{\pcontentsline{0}{Execution Context}{37}{38}{}} \newlabel{sld:program-counter-in-pcb}{{38}{20}{Program Counter in PCB\relax }{section*.37}{}} \@writefile{toc}{\pcontentsline{0}{Program Counter in PCB}{38}{39}{}} \newlabel{sld:process-control-blocks-example-2}{{39}{21}{Process Control Blocks---Example\relax }{section*.38}{}} \@writefile{toc}{\pcontentsline{0}{PCB Example}{39}{40}{}} \newlabel{sld:process-control-blocks-example-diagram}{{40}{21}{PCB Example: Diagram\relax }{section*.39}{}} \@writefile{toc}{\pcontentsline{0}{PCB Example Diagram}{40}{41}{}} \@writefile{toc}{\pcontentsline{0}{PCB Example --- Continued}{41}{42}{}} \newlabel{sld:address-of-io-instructions}{{42}{22}{What is the address of I/O instructions?\relax }{section*.41}{}} \@writefile{toc}{\pcontentsline{0}{Address of I/O instructions}{42}{43}{}} \@writefile{toc}{\pcontentsline{1}{System Calls}{43}{44}{1}} \newlabel{process-system-calls}{{44}{23}{Major process Control System Calls\relax }{section*.43}{}} \@writefile{toc}{\pcontentsline{0}{System Calls}{44}{45}{}} \@writefile{toc}{\pcontentsline{0}{File I/O system calls: a sidetrack}{45}{46}{}} \@writefile{toc}{\pcontentsline{0}{init}{46}{47}{}} \@writefile{toc}{\pcontentsline{0}{SUID, SGID and IDs}{47}{48}{}} \@writefile{toc}{\pcontentsline{0}{Other system calls: getting process info}{48}{49}{}} \@writefile{toc}{\pcontentsline{0}{\texttt {fork()}: what it does}{49}{50}{}} \@input{fork-pseudocode.aux} \@writefile{toc}{\pcontentsline{0}{Using \texttt {fork()}: pseudocode}{50}{51}{}} \@input{fork-simple.aux} \@writefile{toc}{\pcontentsline{0}{Simple \texttt {fork()} Example (no Checking)}{51}{52}{}} \@input{fork-example-1.aux} \@writefile{toc}{\pcontentsline{0}{An example using \texttt {fork()}}{52}{53}{}} \@input{fork-example-2.aux} \@writefile{toc}{\pcontentsline{0}{Example using \texttt {fork()}---(contd.)}{53}{54}{}} \@writefile{toc}{\pcontentsline{0}{Output of \texttt {fork-example.c}:}{54}{55}{}} \@writefile{toc}{\pcontentsline{0}{Running \texttt {fork-example} again}{55}{56}{}} \@writefile{toc}{\pcontentsline{0}{Why two ``\texttt {before fork}'' messages? }{56}{57}{}} \@writefile{toc}{\pcontentsline{0}{So what does this show?}{57}{58}{}} \@writefile{toc}{\pcontentsline{0}{Running another program --- \texttt {exec()}}{58}{59}{}} \@writefile{toc}{\pcontentsline{0}{\texttt {execve()} system call}{59}{60}{}} \@input{fork-simple.aux} \@writefile{toc}{\pcontentsline{0}{\texttt {fork()} --- \texttt {exec()} Example}{60}{61}{}} \@writefile{toc}{\pcontentsline{0}{Using \texttt {execl()}}{61}{62}{}} \@input{print.aux} \@writefile{toc}{\pcontentsline{0}{\texttt {print.c}: a program we call}{62}{63}{}} \@input{call-print.aux} \@writefile{toc}{\pcontentsline{0}{Calling \texttt {./print} using \texttt {execl()}}{63}{64}{}} \@writefile{toc}{\pcontentsline{0}{\texttt {vfork()} sytem call}{64}{65}{}} \newlabel{sld:wait}{{65}{33}{\texttt {wait()}, \texttt {waitpid()} system calls\relax }{section*.64}{}} \@writefile{toc}{\pcontentsline{0}{\texttt {wait()}, \texttt {waitpid()} system calls}{65}{66}{}} \@writefile{toc}{\pcontentsline{0}{\texttt {wait()}, \texttt {waitpid()} system calls}{66}{67}{}} \@writefile{toc}{\pcontentsline{1}{A shell program}{67}{67}{1}} \@input{simplesh-a.aux} \@writefile{toc}{\pcontentsline{0}{Part of Simple Shell Program}{67}{68}{}} \@writefile{toc}{\pcontentsline{0}{Windows and Processes}{68}{69}{}} \@writefile{toc}{\pcontentsline{0}{Windows and Processes --- 2}{69}{70}{}} \@input{CreateProcess-syntax.aux} \@writefile{toc}{\pcontentsline{0}{\texttt {CreateProcess()} prototype}{70}{71}{}} \@writefile{toc}{\pcontentsline{0}{\texttt {CreateProcess()}}{71}{72}{}} \@input{win-call-print.aux} \@writefile{toc}{\pcontentsline{0}{Example: \texttt {CreateProcess()}}{72}{73}{}} \@writefile{toc}{\pcontentsline{0}{Processes in Linux, Unix, Windows}{73}{74}{}} \@writefile{toc}{\pcontentsline{1}{IPC}{74}{75}{1}} \@writefile{toc}{\pcontentsline{0}{Problem with Processes}{75}{76}{}} \@writefile{toc}{\pcontentsline{0}{Interprocess Communication (IPC)}{76}{77}{}} \@writefile{toc}{\pcontentsline{0}{IPC --- Shared Memory}{77}{78}{}} \@writefile{toc}{\pcontentsline{0}{IPC --- Signals}{78}{79}{}} \@writefile{toc}{\pcontentsline{0}{Signals and the Shell}{79}{80}{}} \@writefile{toc}{\pcontentsline{1}{Threads}{80}{81}{1}} \@writefile{toc}{\pcontentsline{0}{Threads and Processes}{81}{82}{}} \@writefile{toc}{\pcontentsline{0}{Threads have own\dots }{82}{83}{}} \@writefile{toc}{\pcontentsline{0}{Threads share a lot}{83}{84}{}} \@writefile{toc}{\pcontentsline{0}{Threads in Linux, Unix}{84}{85}{}} \newlabel{sld:hello.c}{{85}{43}{\texttt {hello.c}: a simple threaded program\relax }{section*.84}{}} \@input{hello.aux} \@writefile{toc}{\pcontentsline{0}{\texttt {hello.c}: a simple threaded program}{85}{86}{}} \@writefile{toc}{\pcontentsline{0}{Compile POSIX Threads}{86}{87}{}} \newlabel{sld:pthread_create}{{87}{44}{\texttt {pthread\_create()}\relax }{section*.86}{}} \@writefile{toc}{\pcontentsline{0}{\texttt {pthread\_create()}}{87}{88}{}} \newlabel{sld:pthread_create2}{{88}{45}{\texttt {pthread\_create()}\relax }{section*.87}{}} \@writefile{toc}{\pcontentsline{0}{\texttt {pthread\_create()}}{88}{89}{}} \@writefile{toc}{\pcontentsline{0}{Problem with threads:}{89}{90}{}} \@writefile{toc}{\pcontentsline{1}{Race Condition}{90}{91}{1}} \@writefile{toc}{\pcontentsline{0}{Race Conditions}{91}{92}{}} \@writefile{toc}{\pcontentsline{0}{Critical Sections}{92}{93}{}} \@writefile{toc}{\pcontentsline{0}{Race Condition --- one possibility}{93}{94}{}} \@writefile{toc}{\pcontentsline{0}{Example --- another possibility}{94}{95}{}} \newlabel{sld:intro-to-synchronisation}{{95}{48}{Solution: Synchronisation\relax }{section*.94}{}} \@writefile{toc}{\pcontentsline{0}{Solution: Synchronisation}{95}{96}{}} \newlabel{sld:file-locking}{{96}{48}{File Locking\relax }{section*.95}{}} \@writefile{toc}{\pcontentsline{0}{File Locking}{96}{97}{}} \@writefile{toc}{\pcontentsline{1}{Synchronisation}{97}{98}{1}} \newlabel{sld:synchronisation}{{98}{49}{Synchronisation\relax }{section*.97}{}} \@writefile{toc}{\pcontentsline{0}{Synchronisation}{98}{99}{}} \newlabel{sld:semaphore}{{99}{50}{Semaphores\relax }{section*.98}{}} \@writefile{toc}{\pcontentsline{0}{Semaphores}{99}{100}{}} \@input{semaphore-example.aux} \@writefile{toc}{\pcontentsline{0}{Semaphores --- 2}{100}{101}{}} \newlabel{sld:mutex}{{101}{52}{{\red {}Mutex}\blue ---\POSIX and Win32 Threads\relax }{section*.100}{}} \@writefile{toc}{\pcontentsline{0}{POSIX and Win32}{101}{102}{}} \newlabel{sld:mutex-example-1}{{102}{52}{mutex --- \POSIX Threads Example (1)\relax }{section*.101}{}} \@input{mutex0.aux} \@writefile{toc}{\pcontentsline{0}{Threads Example 1}{102}{103}{}} \newlabel{sld:mutex-example-2}{{103}{53}{mutex --- \POSIX Threads Example (2)\relax }{section*.102}{}} \@input{mutex1.aux} \@writefile{toc}{\pcontentsline{0}{Threads Example 2}{103}{104}{}} \newlabel{sld:mutex-example-3}{{104}{53}{mutex --- \POSIX Threads Example (3)\relax }{section*.103}{}} \@input{mutex2.aux} \@writefile{toc}{\pcontentsline{0}{Threads Example 3}{104}{105}{}} \@writefile{toc}{\pcontentsline{0}{Condition Variables}{105}{106}{}} \@writefile{toc}{\pcontentsline{0}{Monitors}{106}{107}{}} \@writefile{toc}{\pcontentsline{0}{Spinlocks}{107}{108}{}} \@writefile{toc}{\pcontentsline{1}{Summary and References}{108}{109}{1}} \@writefile{toc}{\pcontentsline{0}{Summary --- Process States, Scheduling}{109}{110}{}} \@writefile{toc}{\pcontentsline{0}{Summary --- Processes and Threads}{110}{111}{}} \@writefile{toc}{\pcontentsline{0}{Summary --- Synchronisation}{111}{112}{}} \newlabel{sld:references}{{112}{57}{References\relax }{section*.111}{}} \@writefile{toc}{\pcontentsline{0}{References}{112}{113}{}}