Slides/Slides2.thy
author zhangx
Sun, 07 Feb 2016 21:21:53 +0800
changeset 112 b3795b1f030b
parent 18 598409a21f4c
permissions -rw-r--r--
Small improvements.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     1
(*<*)
4
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 3
diff changeset
     2
theory Slides2
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     3
imports "../CpsG" "../ExtGG" "~~/src/HOL/Library/LaTeXsugar"
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     4
begin
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     5
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     6
notation (latex output)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     7
  set ("_") and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     8
  Cons  ("_::/_" [66,65] 65) 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     9
18
598409a21f4c added nasa talk
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 5
diff changeset
    10
(*
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    11
ML {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    12
  open Printer;
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    13
  show_question_marks_default := false;
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    14
  *}
18
598409a21f4c added nasa talk
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 5
diff changeset
    15
*)
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    16
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    17
notation (latex output)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    18
  Cons ("_::_" [78,77] 73) and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    19
  vt ("valid'_state") and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    20
  runing ("running") and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    21
  birthtime ("last'_set") and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    22
  If  ("(\<^raw:\textrm{>if\<^raw:}> (_)/ \<^raw:\textrm{>then\<^raw:}> (_)/ \<^raw:\textrm{>else\<^raw:}> (_))" 10) and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    23
  Prc ("'(_, _')") and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    24
  holding ("holds") and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    25
  waiting ("waits") and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    26
  Th ("T") and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    27
  Cs ("C") and
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    28
  P ("Lock") and
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    29
  V ("Unlock") and
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    30
  readys ("ready") and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    31
  depend ("RAG") and 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    32
  preced ("prec") and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    33
  cpreced ("cprec") and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    34
  dependents ("dependants") and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    35
  cp ("cprec") and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    36
  holdents ("resources") and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    37
  original_priority ("priority") and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    38
  DUMMY  ("\<^raw:\mbox{$\_\!\_$}>")
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    39
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    40
(*>*)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    41
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    42
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    43
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    44
text_raw {*
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    45
  \renewcommand{\slidecaption}{Leicester, 7 December 2012}
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    46
  \newcommand{\bl}[1]{#1}                        
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    47
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    48
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    49
  \begin{frame}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    50
  \frametitle{%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    51
  \begin{tabular}{@ {}c@ {}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    52
  \\[-3mm]
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    53
  \LARGE A Provably Correct\\[-1mm] 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    54
  \LARGE Priority Inheritance Protocol\\[-3mm] 
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    55
  \end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    56
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    57
  \begin{center}
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    58
   Christian Urban\\
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    59
  \small King's College London
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    60
  \end{center}\bigskip
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    61
 
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    62
  \begin{center}
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    63
  \small joint work with Xingyuan Zhang and Chunhan Wu from the PLA
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    64
  University of Science and Technology in Nanjing
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    65
  \end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    66
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    67
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    68
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    69
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    70
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    71
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    72
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    73
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    74
  \begin{frame}[c]
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    75
  \frametitle{Interactive Theorem Proving}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    76
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    77
  \begin{center}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    78
  \includegraphics[scale=0.23]{isabelle.png}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    79
  \end{center}  
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    80
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    81
  \only<2>{
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    82
  \begin{textblock}{12}(2,13.6)
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    83
  \begin{tikzpicture}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    84
  \draw (0,0) node[inner sep=2mm,fill=cream, ultra thick, draw=red, rounded corners=2mm] 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    85
  {\normalsize\color{darkgray}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    86
  \begin{minipage}{10cm}\raggedright
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    87
  \ldots more often than not, thinking is only Plan B
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    88
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    89
  \end{minipage}};
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    90
  \end{tikzpicture}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    91
  \end{textblock}}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    92
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    93
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    94
  \end{frame}}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    95
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    96
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    97
*}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    98
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
    99
text_raw {*
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   100
  \tikzstyle{every node}=[node distance=25mm,text height=1.5ex, text depth=.25ex]
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   101
  \tikzstyle{node1}=[rectangle, minimum size=8mm, rounded corners=3mm, very thick, 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   102
                     draw=black!50, top color=white, bottom color=black!20]
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   103
  \tikzstyle{node2}=[rectangle, minimum size=10mm, rounded corners=3mm, very thick, 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   104
                     draw=red!70, top color=white, bottom color=red!50!black!20]
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   105
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   106
  \mode<presentation>{
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   107
  \begin{frame}[c]
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   108
  \frametitle{}
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   109
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   110
  \begin{tabular}{@ {}c@ {\hspace{2mm}}c}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   111
  \\[6mm]
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   112
  \begin{tabular}{c}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   113
  \includegraphics[scale=0.11]{harper.jpg}\\[-2mm]
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   114
  {\footnotesize Bob Harper}\\[-2.5mm]
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   115
  {\footnotesize (CMU)}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   116
  \end{tabular}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   117
  \begin{tabular}{c@ {}}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   118
  \includegraphics[scale=0.37]{pfenning.jpg}\\[-2mm]
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   119
  {\footnotesize Frank Pfenning}\\[-2.5mm]
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   120
  {\footnotesize (CMU)}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   121
  \end{tabular} &
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   122
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   123
  \begin{tabular}{@ {\hspace{-3mm}}p{7cm}}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   124
  \begin{tikzpicture}[remember picture, scale=0.5]
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   125
  \matrix[ampersand replacement=\&,column sep=7mm, row sep=5mm]
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   126
  { \& \& \node (desc) {\makebox[0mm]{\begin{tabular}{l}published in a journal\\ 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   127
    \small (ACM ToCL, 31 pages, 2005)\\[3mm]\end{tabular}}};\\
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   128
    \&[-10mm] 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   129
    \node (def1)   [node1] {\hspace{1mm}Spec\hspace{1mm}\mbox{}}; \&
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   130
    \node (proof1) [node1] {Proof}; \&
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   131
    \node (alg1)   [node1] {\hspace{1mm}Alg\hspace{1mm}\mbox{}}; \\
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   132
  };
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   133
  \draw[->,black!50,line width=2mm] (proof1) -- (def1);
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   134
  \draw[->,black!50,line width=2mm] (proof1) -- (alg1);
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   135
  \draw[<-,black,line width=0.5mm] (proof1) -- (desc);
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   136
  \end{tikzpicture}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   137
  \end{tabular}\\
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   138
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   139
  \pause
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   140
  \\[0mm]
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   141
  
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   142
  \multicolumn{2}{c}{
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   143
  \begin{tabular}{p{6cm}}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   144
  \raggedright
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   145
  \color{black}{relied on their proof in a\\ {\bf security} critical application}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   146
  \end{tabular}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   147
  
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   148
  \begin{tabular}{c}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   149
  \includegraphics[scale=0.36]{appel.jpg}\\[-2mm] 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   150
  {\footnotesize Andrew Appel}\\[-2.5mm]
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   151
  {\footnotesize (Princeton)}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   152
  \end{tabular}}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   153
  \end{tabular} 
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   154
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   155
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   156
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   157
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   158
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   159
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   160
text_raw {*
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   161
  \tikzstyle{every node}=[node distance=25mm,text height=1.5ex, text depth=.25ex]
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   162
  \tikzstyle{node1}=[rectangle, minimum size=10mm, rounded corners=3mm, very thick, 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   163
                     draw=black!50, top color=white, bottom color=black!20]
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   164
  \tikzstyle{node2}=[rectangle, minimum size=12mm, rounded corners=3mm, very thick, 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   165
                     draw=red!70, top color=white, bottom color=red!50!black!20]
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   166
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   167
  \mode<presentation>{
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   168
  \begin{frame}<2->[squeeze]
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   169
  \frametitle{} 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   170
  
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   171
  \begin{columns}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   172
  
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   173
  \begin{column}{0.8\textwidth}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   174
  \begin{textblock}{0}(1,2)
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   175
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   176
  \begin{tikzpicture}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   177
  \matrix[ampersand replacement=\&,column sep=7mm, row sep=5mm]
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   178
  { \&[-10mm] 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   179
    \node (def1)   [node1] {\large\hspace{1mm}Spec\hspace{1mm}\mbox{}}; \&
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   180
    \node (proof1) [node1] {\large Proof}; \&
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   181
    \node (alg1)   [node1] {\large\hspace{1mm}Alg\hspace{1mm}\mbox{}}; \\
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   182
    
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   183
    \onslide<4->{\node {\begin{tabular}{c}\small 1st\\[-2.5mm] \footnotesize solution\end{tabular}};} \&
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   184
    \onslide<4->{\node (def2)   [node2] {\large Spec$^\text{+ex}$};} \&
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   185
    \onslide<4->{\node (proof2) [node1] {\large Proof};} \&
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   186
    \onslide<4->{\node (alg2)   [node1] {\large\hspace{1mm}Alg\hspace{1mm}\mbox{}};} \\
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   187
     
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   188
    \onslide<5->{\node {\begin{tabular}{c}\small 2nd\\[-2.5mm] \footnotesize solution\end{tabular}};} \&
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   189
    \onslide<5->{\node (def3)   [node1] {\large\hspace{1mm}Spec\hspace{1mm}\mbox{}};} \&
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   190
    \onslide<5->{\node (proof3) [node1] {\large Proof};} \&
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   191
    \onslide<5->{\node (alg3)   [node2] {\large Alg$^\text{-ex}$};} \\
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   192
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   193
    \onslide<6->{\node {\begin{tabular}{c}\small 3rd\\[-2.5mm] \footnotesize solution\end{tabular}};} \&
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   194
    \onslide<6->{\node (def4)   [node1] {\large\hspace{1mm}Spec\hspace{1mm}\mbox{}};} \&
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   195
    \onslide<6->{\node (proof4) [node2] {\large\hspace{1mm}Proof\hspace{1mm}};} \&
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   196
    \onslide<6->{\node (alg4)   [node1] {\large\hspace{1mm}Alg\hspace{1mm}\mbox{}};} \\
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   197
  };
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   198
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   199
  \draw[->,black!50,line width=2mm] (proof1) -- (def1);
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   200
  \draw[->,black!50,line width=2mm] (proof1) -- (alg1);
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   201
  
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   202
  \onslide<4->{\draw[->,black!50,line width=2mm] (proof2) -- (def2);}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   203
  \onslide<4->{\draw[->,black!50,line width=2mm] (proof2) -- (alg2);}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   204
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   205
  \onslide<5->{\draw[->,black!50,line width=2mm] (proof3) -- (def3);}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   206
  \onslide<5->{\draw[->,black!50,line width=2mm] (proof3) -- (alg3);}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   207
  
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   208
  \onslide<6->{\draw[->,black!50,line width=2mm] (proof4) -- (def4);}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   209
  \onslide<6->{\draw[->,black!50,line width=2mm] (proof4) -- (alg4);}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   210
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   211
  \onslide<3->{\draw[white,line width=1mm] (1.1,3.2) -- (0.9,2.85) -- (1.1,2.35) -- (0.9,2.0);} 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   212
  \end{tikzpicture}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   213
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   214
  \end{textblock}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   215
  \end{column}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   216
  \end{columns}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   217
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   218
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   219
  \begin{textblock}{3}(12,3.6)
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   220
  \onslide<4->{
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   221
  \begin{tikzpicture}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   222
  \node at (0,0) [single arrow, shape border rotate=270, fill=red,text=white]{2h};
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   223
  \end{tikzpicture}}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   224
  \end{textblock}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   225
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   226
  \end{frame}}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   227
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   228
*}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   229
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   230
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   231
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   232
text_raw {*
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   233
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   234
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   235
  \begin{frame}[c]
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   236
  \frametitle{Real-Time OSes}
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   237
  \large
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   238
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   239
  \begin{itemize}
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   240
  \item Purpose of a general OS:\\ 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   241
  give access to various resources\\
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   242
  $\Rightarrow$ access needs to be moderated by\\ 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   243
  $\phantom{\Rightarrow}$ locking and unlocking\medskip \\
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   244
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   245
  \item Purpose of a real-time OS:\\
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   246
  gurantee tasks to be completed in time\medskip\pause
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   247
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   248
  \item \alert{this already results into a surprisingly non-trivial scheduling problem}
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   249
  \end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   250
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   251
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   252
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   253
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   254
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   255
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   256
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   257
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   258
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   259
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   260
  \begin{frame}[c]
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   261
  \frametitle{The Problem}
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   262
  \Large
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   263
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   264
  \begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   265
  \begin{tabular}{l}
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   266
  \alert{H}igh-priority process (waits)\\[4mm]
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   267
  \onslide<2->{\alert{M}edium-priority process}\\[4mm]
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   268
  \alert{L}ow-priority process (has a lock)\\[4mm]
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   269
  \end{tabular}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   270
  \end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   271
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   272
  \onslide<3->{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   273
  \begin{itemize}
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   274
  \item \alert{priority inversion}\\ \hspace{2cm}@{text "\<equiv>"} H waits for a process\\ 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   275
  \mbox{}\hfill with lower priority
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   276
  \item<4> avoid \alert{indefinite} priority inversion
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   277
  \end{itemize}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   278
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   279
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   280
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   281
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   282
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   283
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   284
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   285
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   286
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   287
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   288
  \begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   289
  \frametitle{Mars Pathfinder Mission 1997}
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   290
  \large
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   291
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   292
  \begin{center}
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   293
  \includegraphics[scale=0.15]{marspath1.png}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   294
  \includegraphics[scale=0.16]{marspath3.png}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   295
  \includegraphics[scale=0.3]{marsrover.png}
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   296
  \end{center}
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   297
  
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   298
  \begin{itemize}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   299
  \item despite NASA's famous testing procedure, the lander reset frequently on Mars
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   300
  --- problem: priority inversion
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   301
  \end{itemize}
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   302
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   303
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   304
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   305
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   306
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   307
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   308
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   309
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   310
  \begin{frame}[c]
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   311
  \frametitle{The Solution}
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   312
  \Large
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   313
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   314
  \alert{Priority Inheritance Protocol (PIP):}\bigskip
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   315
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   316
  \begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   317
  \begin{tabular}{l}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   318
  \alert{H}igh-priority process\\[4mm]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   319
  \textcolor{gray}{Medium-priority process}\\[4mm]
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   320
  \alert{L}ow-priority process\\[15mm]
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   321
  {\normalsize (temporarily raise the priority of \alert{L})}
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   322
  \end{tabular}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   323
  \end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   324
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   325
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   326
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   327
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   328
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   329
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   330
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   331
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   332
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   333
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   334
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   335
  \begin{frame}[c]
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   336
  \frametitle{A First Correctness ``Proof''}
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   337
  \Large
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   338
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   339
  \begin{itemize}
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   340
  \item the paper$^\star$ first describing  PIP ``proved'' also its 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   341
  correctness:\\[5mm]
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   342
  \end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   343
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   344
  \normalsize
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   345
  \begin{quote}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   346
  \ldots{}after the thread (whose priority has been raised) completes its 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   347
  critical section and releases the lock, it ``returns to its original 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   348
  priority level''.
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   349
  \end{quote}\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   350
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   351
  \small
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   352
  $^\star$ in IEEE Transactions on Computers in 1990 by Sha et al.
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   353
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   354
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   355
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   356
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   357
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   358
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   359
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   360
  \begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   361
  \frametitle{}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   362
  \Large
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   363
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   364
  \begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   365
  \begin{tabular}{l}
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   366
  \alert{H}igh-priority process 1 (waits)\\[2mm]
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   367
  \alert{H}igh-priority process 2 (waits)\\[8mm]
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   368
  \alert{L}ow-priority process (has a lock)
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   369
  \end{tabular}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   370
  \end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   371
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   372
  \onslide<2->{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   373
  \begin{itemize}
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   374
  \item Solution: return to the highest
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   375
  \phantom{Solution:} \alert{remaining} priority\\
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   376
  \end{itemize}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   377
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   378
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   379
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   380
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   381
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   382
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   383
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   384
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   385
  \begin{frame}[c]
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   386
  \frametitle{Specification}
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   387
  \Large
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   388
  
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   389
   \begin{itemize}\Large
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   390
  \item Use Inductive Method with events of the form:
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   391
   \end{itemize}
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   392
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   393
  \begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   394
  \begin{tabular}{l}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   395
  Create \textcolor{gray}{thread priority}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   396
  Exit \textcolor{gray}{thread}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   397
  Set \textcolor{gray}{thread priority}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   398
  Lock \textcolor{gray}{thread cs}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   399
  Unlock \textcolor{gray}{thread cs}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   400
  \end{tabular}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   401
  \end{center}\medskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   402
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   403
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   404
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   405
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   406
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   407
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   408
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   409
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   410
  \begin{frame}[c]
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   411
  \frametitle{Scheduling States}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   412
  \Large
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   413
  
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   414
  \begin{itemize}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   415
  \item A \alert{state} is a list of event\bigskip
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   416
  \begin{center}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   417
  \begin{tikzpicture}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   418
  \draw [->, line width=1.5mm] (-4,0) -- (4, 0);
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   419
  \draw [line width=0.8mm] (-4, 0.3) -- (-4, -0.3);
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   420
  \draw [line width=0.8mm] (1, 0.3) -- (1, -0.3);
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   421
  \node at (1,-0.7) {\large s};
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   422
  \node at (-4,-0.7) {\large 0};
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   423
  \node at (3.2,-0.7) {\large time};
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   424
  \end{tikzpicture}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   425
  \end{center}\pause
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   426
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   427
  \item Scheduling according to \alert{precedences}:
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   428
  \begin{center}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   429
  \begin{tabular}{@ {}l@ {}}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   430
  \large @{thm preced_def[where thread="th"]} 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   431
  \end{tabular}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   432
  \end{center}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   433
  \end{itemize}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   434
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   435
  \end{frame}}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   436
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   437
*}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   438
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   439
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   440
text_raw {*
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   441
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   442
  \mode<presentation>{
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   443
  \begin{frame}[c]
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   444
  \frametitle{Waiting Queues}
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   445
  \large
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   446
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   447
  \begin{itemize}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   448
  \item A \alert{waiting queue} function returns a list of threads
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   449
  associated with every resource
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   450
  \item The head of the list is the thread holding the resource.
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   451
  \medskip
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   452
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   453
  \begin{center}\normalsize
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   454
  \begin{tabular}{@ {}l}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   455
  @{thm cs_holding_def[where thread="th"]}\\
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   456
  @{thm cs_waiting_def[where thread="th"]}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   457
  \end{tabular}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   458
  \end{center}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   459
  \end{itemize}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   460
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   461
  \end{frame}}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   462
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   463
*}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   464
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   465
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   466
text_raw {*
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   467
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   468
  \mode<presentation>{
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   469
  \begin{frame}[c]
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   470
  \frametitle{Resource Allocation Graphs}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   471
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   472
\begin{center}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   473
  \newcommand{\fnt}{\fontsize{7}{8}\selectfont}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   474
  \begin{tikzpicture}[scale=1]
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   475
  
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   476
  \node (A) at (0,0) [draw, rounded corners=1mm, rectangle, very thick] {@{text "th\<^isub>0"}};
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   477
  \node (B) at (2,0) [draw, circle, very thick, inner sep=0.4mm] {@{text "cs\<^isub>1"}};
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   478
  \node (C) at (4,0.7) [draw, rounded corners=1mm, rectangle, very thick] {@{text "th\<^isub>1"}};
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   479
  \node (D) at (4,-0.7) [draw, rounded corners=1mm, rectangle, very thick] {@{text "th\<^isub>2"}};
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   480
  \node (E) at (6,-0.7) [draw, circle, very thick, inner sep=0.4mm] {@{text "cs\<^isub>2"}};
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   481
  \node (E1) at (6, 0.3) [draw, circle, very thick, inner sep=0.4mm] {@{text "cs\<^isub>3"}};
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   482
  \node (F) at (8,-0.7) [draw, rounded corners=1mm, rectangle, very thick] {@{text "th\<^isub>3"}};
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   483
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   484
  \draw [<-,line width=0.6mm] (A) to node [pos=0.54,sloped,above=-0.5mm] {\fnt{}holds}  (B);
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   485
  \draw [->,line width=0.6mm] (C) to node [pos=0.4,sloped,above=-0.5mm] {\fnt{}waits}  (B);
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   486
  \draw [->,line width=0.6mm] (D) to node [pos=0.4,sloped,below=-0.5mm] {\fnt{}waits}  (B);
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   487
  \draw [<-,line width=0.6mm] (D) to node [pos=0.54,sloped,below=-0.5mm] {\fnt{}holds}  (E);
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   488
  \draw [<-,line width=0.6mm] (D) to node [pos=0.54,sloped,above=-0.5mm] {\fnt{}holds}  (E1);
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   489
  \draw [->,line width=0.6mm] (F) to node [pos=0.45,sloped,below=-0.5mm] {\fnt{}waits}  (E);
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   490
  \end{tikzpicture}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   491
  \end{center}\bigskip
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   492
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   493
  \begin{center}
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   494
  \begin{minipage}{0.8\linewidth}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   495
  \raggedleft
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   496
  @{thm cs_depend_def}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   497
  \end{minipage}\medskip\\
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   498
  \begin{minipage}{1\linewidth}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   499
  @{thm cs_dependents_def}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   500
  \end{minipage}\medskip\\\pause
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   501
  \begin{minipage}{1\linewidth}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   502
  \alert{cprec wq s th} $\dn$\\
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   503
  \mbox{}\hspace{1cm}Max(\{prec th s\} $\cup$\\ 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   504
  \mbox{}\hspace{1cm}\phantom{Max(}\{prec th' s $\mid$ th' $\in$ dependants wq th\})
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   505
  \end{minipage}
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   506
  \end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   507
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   508
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   509
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   510
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   511
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   512
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   513
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   514
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   515
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   516
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   517
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   518
  \begin{frame}[c]
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   519
  \frametitle{The Scheduler}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   520
  \large
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   521
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   522
  \begin{itemize}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   523
  \item \underline{Start}: all priorities/precedences are 0, all resources are unlocked
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   524
  \item \underline{Create th p}: set precedence of th
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   525
  \item \underline{Exit th}: reset precedence to 0
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   526
  \item \underline{Set th p}: reset precedence of th
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   527
  \item \underline{Lock th cs}: add th to the end of the waiting queue of cs
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   528
  \item \underline{Unlock th cs}:\\ delete th from the waiting queue of cs\\
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   529
  \hspace{1cm}\alert{and who to give the resource next?}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   530
  \end{itemize}
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   531
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   532
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   533
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   534
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   535
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   536
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   537
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   538
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   539
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   540
  \begin{frame}[c]
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   541
  \frametitle{The Scheduler (2)}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   542
  %%\large
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   543
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   544
  \begin{itemize}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   545
  \item \large threads ready to run\normalsize
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   546
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   547
  \begin{center}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   548
  \begin{tabular}{@ {}l}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   549
  @{thm (lhs) readys_def} $\dn$\\
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   550
  \;@{thm (rhs) readys_def}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   551
  \end{tabular}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   552
  \end{center}\bigskip
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   553
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   554
  \item \large the thread that is running in a state:\\[-10mm]\normalsize
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   555
  \begin{center}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   556
  \begin{tabular}{@ {}l@ {}}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   557
  @{thm (lhs) runing_def} $\dn$\\
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   558
  \;@{thm (rhs) runing_def}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   559
  \end{tabular}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   560
  \end{center}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   561
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   562
  \end{itemize}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   563
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   564
  \end{frame}}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   565
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   566
*}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   567
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   568
text_raw {*
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   569
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   570
  \mode<presentation>{
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   571
  \begin{frame}[c]
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   572
  \frametitle{Inductive Method}
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   573
  %%\large
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   574
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   575
  \begin{center}
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   576
\begin{tikzpicture}[scale=1.6]
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   577
%%\draw[step=2mm] (-4,-1) grid (4,1.4);
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   578
\draw (0,0.2) node {\begin{tabular}{l} valid\\[-1mm] scheduler\\[-1mm] states\\ \end{tabular}};
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   579
\draw (3,0) node {\begin{tabular}{l} set of invalid\\[-1mm] scheduler states \\[-1mm](e.g., deadlocks)\\ \end{tabular}};
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   580
\draw[<-, line width=0.5mm] (1.0,0) -- (1.8,0);
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   581
\draw[<-, line width=0.5mm] (-0.2,-0.55) -- (-0.4,-1.3);
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   582
\draw (-0.0,-1.5) node {\begin{tabular}{l} inductively defined set \end{tabular}};
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   583
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   584
\draw[line width=0.5mm, rounded corners=6.3pt] 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   585
  (-0.9,-0.05) -- (-0.8,0.6) -- (-0.3,0.95) -- (0,1) -- (0.5,0.8) -- (0.65,0.5) -- (0.7,0) -- (0.4,-0.5) -- (0,-0.6) -- (-0.5,-0.45) -- cycle;
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   586
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   587
\draw[line width=0.5mm, rounded corners=15pt] 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   588
 (-1.2,0) -- (-0.9,0.95) -- (0,1.2) -- (1.0,1.0) -- (1.7,0) -- (0.95,-1.0) -- (0,-1.2) -- (-0.9,-0.9) -- cycle;
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   589
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   590
\end{tikzpicture}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   591
\end{center}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   592
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   593
  \begin{itemize}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   594
  \item We have to exclude situation where there is a deadlock,
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   595
  a thread exited before created, \ldots
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   596
  
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   597
  \end{itemize}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   598
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   599
  \end{frame}}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   600
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   601
*}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   602
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   603
text_raw {*
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   604
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   605
  \mode<presentation>{
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   606
  \begin{frame}[c]
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   607
  \frametitle{Valid Next Events}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   608
  \large
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   609
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   610
  \begin{itemize}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   611
  \item In a state s, the following events can occur:
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   612
  \end{itemize}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   613
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   614
  \begin{center}
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   615
  @{thm[mode=Rule] thread_create[where thread=th]}\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   616
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   617
  @{thm[mode=Rule] thread_exit[where thread=th]}\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   618
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   619
  @{thm[mode=Rule] thread_set[where thread=th]}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   620
  \end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   621
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   622
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   623
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   624
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   625
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   626
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   627
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   628
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   629
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   630
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   631
  \begin{frame}[c]
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   632
  \frametitle{Valid Next Events (2)}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   633
  \large
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   634
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   635
  \begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   636
  @{thm[mode=Rule] thread_P[where thread=th]}\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   637
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   638
  @{thm[mode=Rule] thread_V[where thread=th]}\bigskip
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   639
  \end{center}\bigskip\pause
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   640
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   641
  \begin{itemize}
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   642
  \item Done with the specification. \ldots
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   643
  \end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   644
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   645
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   646
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   647
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   648
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   649
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   650
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   651
  \mode<presentation>{
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   652
  \begin{frame}[c]
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   653
  \frametitle{Correctness Criterion}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   654
  \large
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   655
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   656
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   657
  \begin{center}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   658
  \begin{tikzpicture}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   659
  \draw [->, line width=1.5mm] (-4,0) -- (4, 0);
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   660
  \draw [line width=0.8mm] (-4, 0.3) -- (-4, -0.3);
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   661
  \draw [line width=0.8mm] (1, 0.3) -- (1, -0.3);
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   662
  \draw [line width=0.8mm] (0, 0.3) -- (0, -0.3);
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   663
  \node at (1,-0.7) {\large s'};
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   664
  \node at (0,-0.7) {\large s};
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   665
  \node at (1,-1.5) {\small(th')};
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   666
  \node at (0,-1.5) {\small(th)};
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   667
  \node at (-4,-0.7) {\large 0};
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   668
  \node at (3.2,-0.7) {\large time};
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   669
  \end{tikzpicture}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   670
  \end{center}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   671
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   672
  \normalsize
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   673
  \begin{itemize}
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   674
  \item {\bf If} th is alive in s and has the highest precedence
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   675
  \item plus some further assumption (like th not reset, exited, no higher precedences)
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   676
  \item and th is {\bf not} running in s', \\ {\bf then} the running
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   677
  thread th' (in s') is a thread that was alive in {\bf s} and has in s' the same 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   678
  precedence as th in s.
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   679
  \end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   680
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   681
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   682
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   683
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   684
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   685
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   686
(*<*)
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   687
context extend_highest_gen
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   688
begin
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   689
(*>*)
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   690
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   691
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   692
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   693
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   694
  \begin{frame}[t]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   695
  \frametitle{Implementation}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   696
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   697
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   698
  \begin{itemize}
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   699
  \item Create/Exit events:
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   700
  \begin{itemize}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   701
  \item we do not have to recalculate the RAG
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   702
  \item we do not have to recalculate the other precedences
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   703
  \end{itemize}\bigskip
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   704
  \item Set event:
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   705
  \begin{itemize}
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   706
  \item we do not have to recalculate the RAG
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   707
  \item also the other precedences do not have to be recalculated
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   708
  (since this is the currently running thread, it cannot affect
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   709
  other threads)
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   710
  \end{itemize}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   711
  \item Unlock event (2 cases: a thread to take over, no thread to take over)
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   712
  \begin{itemize}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   713
  \item case 1: RAG need to be modified, but appart from th and th' no
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   714
  other precedence needs to be recalculated
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   715
  \item case 2: RAG needs to be prunned, no precedence needs to be recalculated
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   716
  \end{itemize}
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   717
  \end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   718
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   719
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   720
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   721
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   722
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   723
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   724
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   725
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   726
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   727
  \begin{frame}[t]
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   728
  \frametitle{Implementation (2)}
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   729
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   730
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   731
  \begin{itemize}
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   732
  \item Unlock event (2 cases: a thread to take over, no thread to take over)
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   733
  \begin{itemize}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   734
  \item case 1: RAG need to be modified, but appart from th and th' no
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   735
  other precedence needs to be recalculated
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   736
  \item case 2: RAG needs to be prunned, no precedence needs to be recalculated
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   737
  \end{itemize}\bigskip
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   738
  \item Lock event (2 cases: cs is locked, not locked)
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   739
  \begin{itemize}
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   740
  \item case 1: an waiting edge needs to be added to the RAG, precedences of 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   741
  all dependants need to recalculated (where there is a change)  
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   742
  \item case 2: an holding edge needs to be added to the RAG, no
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   743
  precedences need to be recalculuated
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   744
  \end{itemize}
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   745
  \end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   746
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   747
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   748
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   749
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   750
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   751
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   752
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   753
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   754
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   755
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   756
  \begin{frame}[c]
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   757
  \frametitle{Implementation}
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   758
  
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   759
  \begin{itemize} 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   760
  \item in PINTOS (Stanford), written in C for educational purposes\bigskip
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   761
  \begin{center}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   762
  \begin{tabular}{|l@ {\hspace{2mm}}|l@ {\hspace{2mm}}|}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   763
  \hline
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   764
  {\bf Event} & {\bf PINTOS function} \\
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   765
  \hline
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   766
  @{text Create} & @{text "thread_create"}\\
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   767
  @{text Exit}   & @{text "thread_exit"}\\
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   768
  @{text Set}    & @{text "thread_set_priority"}\\
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   769
  @{text Lock}      & @{text "lock_acquire"}\\
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   770
  @{text Unlock}      & @{text "lock_release"}\\ 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   771
  \hline
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   772
  \end{tabular}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   773
  \end{center}\pause\bigskip
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   774
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   775
  \item \alert{We did not verify our C-code!}\pause
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   776
  \item We were much faster: we gave an unlocked resource to
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   777
  the thread with the highest precedence
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   778
  \end{itemize}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   779
  \end{frame}}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   780
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   781
*}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   782
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   783
text_raw {*
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   784
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   785
  \mode<presentation>{
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   786
  \begin{frame}[c]
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   787
  \frametitle{What Next?}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   788
  \large
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   789
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   790
  \begin{itemize} 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   791
  \item Did we make any impact? No!\medskip\pause
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   792
  
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   793
  \item real-time scheduling on multiprocessors seems to be a very
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   794
  underdeveloped area. 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   795
  \item implementations exist: RT-Linux\bigskip
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   796
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   797
  \item The inductive approach can deal with distributed
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   798
  algorithms\\ \normalsize(a clock syncronisation algorithm developed by NASA)
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   799
  \end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   800
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   801
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   802
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   803
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   804
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   805
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   806
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   807
  \begin{frame}[c]
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   808
  \frametitle{Theorem Provers}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   809
  \large
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   810
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   811
  \begin{itemize} 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   812
  \item We found a mistake in a refereed paper by Harper \& Pfenning
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   813
  \item I also found a mistake in my PhD thesis\bigskip
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   814
  
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   815
  \item scratching on the surface of an completely ``alien'' subject 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   816
  to us --- we were able to make progress
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   817
  \item a string algorithm about suffix sorting (appeared at ICALP 2005)\smallskip\\
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   818
  \small no implementation exists, claim: ``we are the best'';
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   819
  we found an error the {\bf old-fashioned way}; now we need to verify our fix :(
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   820
  \end{itemize}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   821
  \end{frame}}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   822
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   823
*}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   824
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   825
text_raw {*
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   826
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   827
  \mode<presentation>{
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   828
  \begin{frame}[c]
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   829
  \frametitle{State of the Art}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   830
  \large
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   831
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   832
  theorem provers are bad with:
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   833
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   834
  \begin{itemize} 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   835
  \item real number arithmetic (Big-O stuff)
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   836
  \item C-programs
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   837
  \end{itemize}\bigskip
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   838
 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   839
  what others(we) are working on:
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   840
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   841
  \begin{itemize} 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   842
  \item write your programs inside your theorem prover, verify it,
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   843
  compile it to efficient machine code (compilation is verified)
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   844
  \end{itemize}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   845
 
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   846
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   847
 \end{frame}}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   848
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   849
*}
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   850
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   851
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   852
text_raw {*
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   853
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   854
  \mode<presentation>{
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   855
  \begin{frame}[c]
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   856
  \frametitle{Questions?}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   857
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   858
  \begin{itemize} \large
5
0f2d4b78f839 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 4
diff changeset
   859
  \item Thank you for the invitation and for listening!
0
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   860
  \end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   861
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   862
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   863
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   864
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   865
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   866
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   867
(*<*)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   868
end
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   869
end
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   870
(*>*)