Slides/Slides1.thy
author Christian Urban <urbanc@in.tum.de>
Fri, 23 Feb 2018 21:08:37 +0000
changeset 205 12a8dfcb55a7
parent 4 9d667d545e32
permissions -rw-r--r--
updated
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
(*<*)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     2
theory Slides1
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
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    10
ML {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    11
  open Printer;
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    12
  show_question_marks_default := false;
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    13
  *}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    14
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    15
notation (latex output)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    16
  Cons ("_::_" [78,77] 73) and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    17
  vt ("valid'_state") and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    18
  runing ("running") and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    19
  birthtime ("last'_set") and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    20
  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
    21
  Prc ("'(_, _')") and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    22
  holding ("holds") and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    23
  waiting ("waits") and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    24
  Th ("T") and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    25
  Cs ("C") and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    26
  readys ("ready") and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    27
  depend ("RAG") and 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    28
  preced ("prec") and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    29
  cpreced ("cprec") and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    30
  dependents ("dependants") and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    31
  cp ("cprec") and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    32
  holdents ("resources") and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    33
  original_priority ("priority") and
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    34
  DUMMY  ("\<^raw:\mbox{$\_\!\_$}>")
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    35
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    36
(*>*)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    37
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    38
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
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    41
  \renewcommand{\slidecaption}{Nanjing, P.R. China, 1 August 2012}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    42
  \newcommand{\bl}[1]{#1}                        
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
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    45
  \begin{frame}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    46
  \frametitle{%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    47
  \begin{tabular}{@ {}c@ {}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    48
  \\[-3mm]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    49
  \Large Priority Inheritance Protocol \\[-3mm] 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    50
  \Large Proved Correct \\[0mm]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    51
  \end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    52
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    53
  \begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    54
  \small Xingyuan Zhang \\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    55
  \small \mbox{PLA University of Science and Technology} \\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    56
  \small \mbox{Nanjing, China}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    57
  \end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    58
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    59
  \begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    60
  \small joint work with \\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    61
  Christian Urban \\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    62
  Kings College, University of London, U.K.\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    63
  Chunhan Wu \\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    64
  My Ph.D. student now working for Christian\\
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]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    75
  \frametitle{\large Prioirty Inheritance Protocol (PIP)}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    76
  \large
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    77
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    78
  \begin{itemize} 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    79
  \item Widely used in Real-Time OSs \pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    80
  \item One solution of \textcolor{red}{`Priority Inversion'} \pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    81
  \item A flawed manual correctness proof (1990)\pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    82
        \begin{itemize} \large
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    83
          \item {Notations with no precise definition}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    84
          \item {Resorts to intuitions}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    85
        \end{itemize} \pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    86
  \item Formal treatments using model-checking \pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    87
        \begin{itemize} \large
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    88
          \item {Applicable to small size system models}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    89
          \item { Unhelpful for human understanding } 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    90
        \end{itemize} \pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    91
  \item Verification of PCP in PVS (2000)\pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    92
        \begin{itemize} \large
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    93
           \item {A related protocol}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    94
           \item {Priority Ceiling Protocol}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    95
        \end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    96
  \end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    97
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    98
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    99
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   100
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   101
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   102
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   103
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   104
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   105
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   106
  \begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   107
  \frametitle{Our Motivation}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   108
  \large
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   109
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   110
  \begin{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   111
  \item Undergraduate OS course in our university \pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   112
        \begin{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   113
           \item {\large Experiments using instrutional OSs }
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   114
           \item {\large PINTOS (Stanford) is chosen }
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   115
           \item {\large Core project: Implementing PIP in it}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   116
        \end{itemize} \pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   117
  \item Understanding is crucial for the implemention \pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   118
  \item Existing literature of little help \pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   119
  \item Some mention the complication
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   120
  \end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   121
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   122
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   123
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   124
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   125
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   126
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   127
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   128
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   129
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   130
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   131
  \begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   132
  \frametitle{\mbox{Some excerpts}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   133
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   134
  \begin{quote}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   135
  ``Priority inheritance is neither ef$\!$ficient nor reliable. 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   136
  Implementations are either incomplete (and unreliable) 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   137
  or surprisingly complex and intrusive.''
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   138
  \end{quote}\medskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   139
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   140
  \pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   141
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   142
  \begin{quote}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   143
  ``I observed in the kernel code (to my disgust), the Linux 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   144
  PIP implementation is a nightmare: extremely heavy weight, 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   145
  involving maintenance of a full wait-for graph, and requiring 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   146
  updates for a range of events, including priority changes and 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   147
  interruptions of wait operations.''
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   148
  \end{quote}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   149
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   150
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   151
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   152
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   153
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
text_raw {*
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
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   158
  \begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   159
  \frametitle{Our Aims}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   160
  \large
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   161
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   162
  \begin{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   163
  \item Formal specification at appropriate abstract level,
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   164
        convenient for:
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   165
  \begin{itemize} \large
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   166
    \item Constructing interactive proofs
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   167
    \item Clarifying the underlying ideas
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   168
  \end{itemize} \pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   169
  \item Theorems usable to guide implementation, critical point:
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   170
    \begin{itemize} \large
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   171
      \item Understanding the relationship with real OS code \pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   172
      \item Not yet formalized
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   173
    \end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   174
  \end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   175
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   176
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   177
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   178
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   179
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   180
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   181
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   182
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   183
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   184
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   185
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   186
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   187
  \begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   188
  \frametitle{Real-Time OSes}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   189
  \large
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   190
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   191
  \begin{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   192
  \item Purpose: gurantee the most urgent task to be processed in time
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   193
  \item Processes have priorities\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   194
  \item Resources can be locked and unlocked
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   195
  \end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   196
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   197
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   198
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   199
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   200
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   201
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   202
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   203
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   204
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   205
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   206
  \begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   207
  \frametitle{Problem}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   208
  \Large
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   209
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   210
  \begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   211
  \begin{tabular}{l}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   212
  \alert{H}igh-priority process\\[4mm]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   213
  \onslide<2->{\alert{M}edium-priority process}\\[4mm]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   214
  \alert{L}ow-priority process\\[4mm]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   215
  \end{tabular}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   216
  \end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   217
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   218
  \onslide<3->{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   219
  \begin{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   220
  \item \alert{Priority Inversion} @{text "\<equiv>"} \alert{H $<$ L}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   221
  \item<4> avoid indefinite priority inversion
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   222
  \end{itemize}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   223
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   224
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   225
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   226
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   227
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   228
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   229
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   230
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   231
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   232
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   233
  \begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   234
  \frametitle{Priority Inversion}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   235
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   236
  \begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   237
  \includegraphics[scale=0.4]{PriorityInversion.png}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   238
  \end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   239
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   240
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   241
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   242
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   243
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   244
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   245
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   246
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   247
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   248
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   249
  \begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   250
  \frametitle{Mars Pathfinder Mission 1997}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   251
  \Large
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
  \begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   254
  \includegraphics[scale=0.2]{marspath1.png}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   255
  \includegraphics[scale=0.22]{marspath3.png}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   256
  \includegraphics[scale=0.4]{marsrover.png}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   257
  \end{center}
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
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   260
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   261
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   262
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   263
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   264
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   265
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   266
  \begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   267
  \frametitle{Solution}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   268
  \Large
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   269
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   270
  \alert{Priority Inheritance Protocol (PIP):}
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
  \begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   273
  \begin{tabular}{l}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   274
  \alert{H}igh-priority process\\[4mm]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   275
  \textcolor{gray}{Medium-priority process}\\[4mm]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   276
  \alert{L}ow-priority process\\[21mm]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   277
  {\normalsize (temporarily raise its priority)}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   278
  \end{tabular}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   279
  \end{center}
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
  \end{frame}}
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
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
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   288
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   289
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   290
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   291
  \begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   292
  \frametitle{A Correctness ``Proof'' in 1990}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   293
  \Large
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   294
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   295
  \begin{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   296
  \item a paper$^\star$ 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   297
  in 1990 ``proved'' the correctness of an algorithm for PIP\\[5mm]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   298
  \end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   299
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   300
  \normalsize
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   301
  \begin{quote}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   302
  \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
   303
  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
   304
  priority level''.
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   305
  \end{quote}\bigskip
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
  \small
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   308
  $^\star$ in IEEE Transactions on Computers
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   309
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   310
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   311
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   312
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   313
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   314
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   315
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   316
  \begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   317
  \frametitle{}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   318
  \Large
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   319
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   320
  \begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   321
  \begin{tabular}{l}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   322
  \alert{H}igh-priority process 1\\[2mm]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   323
  \alert{H}igh-priority process 2\\[8mm]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   324
  \alert{L}ow-priority process
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   325
  \end{tabular}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   326
  \end{center}
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
  \onslide<2->{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   329
  \begin{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   330
  \item Solution: \\Return to highest \alert{remaining} priority
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   331
  \end{itemize}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   332
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   333
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   334
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   335
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   336
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   337
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   338
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   339
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   340
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   341
  \begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   342
  \frametitle{Event Abstraction}
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
  \begin{itemize}\large
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   345
     \item Use Inductive Approach of L. Paulson \pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   346
     \item System is event-driven \pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   347
     \item A \alert{state} is a list of events 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   348
  \end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   349
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   350
  \pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   351
4
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 3
diff changeset
   352
  \begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 3
diff changeset
   353
  \includegraphics[scale=0.4]{EventAbstract.png}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 3
diff changeset
   354
  \end{center}
0
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
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   357
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
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
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   360
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   361
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   362
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   363
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   364
  \begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   365
  \frametitle{Events}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   366
  \Large
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   367
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   368
  \begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   369
  \begin{tabular}{l}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   370
  Create \textcolor{gray}{thread priority}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   371
  Exit \textcolor{gray}{thread}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   372
  Set \textcolor{gray}{thread priority}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   373
  Lock \textcolor{gray}{thread cs}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   374
  Unlock \textcolor{gray}{thread cs}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   375
  \end{tabular}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   376
  \end{center}\medskip
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]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   386
  \frametitle{Precedences}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   387
  \large
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   388
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   389
  \begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   390
  \begin{tabular}{l}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   391
  @{thm preced_def[where thread="th"]} 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   392
  \end{tabular}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   393
  \end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   394
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   395
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   396
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   397
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   398
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   399
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   400
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   401
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   402
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   403
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   404
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   405
  \begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   406
  \frametitle{RAGs}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   407
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   408
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   409
  \newcommand{\fnt}{\fontsize{7}{8}\selectfont}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   410
  \begin{tikzpicture}[scale=1]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   411
  %%\draw[step=2mm] (-3,2) grid (1,-1);
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   412
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   413
  \node (A) at (0,0) [draw, rounded corners=1mm, rectangle, very thick] {@{text "th\<^isub>0"}};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   414
  \node (B) at (2,0) [draw, circle, very thick, inner sep=0.4mm] {@{text "cs\<^isub>1"}};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   415
  \node (C) at (4,0.7) [draw, rounded corners=1mm, rectangle, very thick] {@{text "th\<^isub>1"}};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   416
  \node (D) at (4,-0.7) [draw, rounded corners=1mm, rectangle, very thick] {@{text "th\<^isub>2"}};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   417
  \node (E) at (6,-0.7) [draw, circle, very thick, inner sep=0.4mm] {@{text "cs\<^isub>2"}};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   418
  \node (E1) at (6, 0.2) [draw, circle, very thick, inner sep=0.4mm] {@{text "cs\<^isub>3"}};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   419
  \node (F) at (8,-0.7) [draw, rounded corners=1mm, rectangle, very thick] {@{text "th\<^isub>3"}};
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   420
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   421
  \draw [<-,line width=0.6mm] (A) to node [pos=0.54,sloped,above=-0.5mm] {\fnt{}holding}  (B);
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   422
  \draw [->,line width=0.6mm] (C) to node [pos=0.4,sloped,above=-0.5mm] {\fnt{}waiting}  (B);
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   423
  \draw [->,line width=0.6mm] (D) to node [pos=0.4,sloped,below=-0.5mm] {\fnt{}waiting}  (B);
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   424
  \draw [<-,line width=0.6mm] (D) to node [pos=0.54,sloped,below=-0.5mm] {\fnt{}holding}  (E);
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   425
  \draw [<-,line width=0.6mm] (D) to node [pos=0.54,sloped,above=-0.5mm] {\fnt{}holding}  (E1);
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   426
  \draw [->,line width=0.6mm] (F) to node [pos=0.45,sloped,below=-0.5mm] {\fnt{}waiting}  (E);
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   427
  \end{tikzpicture}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   428
  \end{center}\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   429
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   430
  \begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   431
  \begin{minipage}{0.8\linewidth}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   432
  \raggedleft
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   433
  @{thm cs_depend_def}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   434
  \end{minipage}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   435
  \end{center}\pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   436
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   437
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   438
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   439
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   440
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   441
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   442
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   443
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   444
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   445
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   446
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   447
  \begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   448
  \frametitle{Good Next Events}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   449
  %%\large
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   450
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   451
  \begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   452
  @{thm[mode=Rule] thread_create[where thread=th]}\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   453
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   454
  @{thm[mode=Rule] thread_exit[where thread=th]}\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   455
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   456
  @{thm[mode=Rule] thread_set[where thread=th]}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   457
  \end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   458
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   459
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   460
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   461
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   462
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   463
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   464
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   465
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   466
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   467
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   468
  \begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   469
  \frametitle{Good Next Events}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   470
  %%\large
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   471
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   472
  \begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   473
  @{thm[mode=Rule] thread_P[where thread=th]}\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   474
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   475
  @{thm[mode=Rule] thread_V[where thread=th]}\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   476
  \end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   477
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   478
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   479
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   480
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   481
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   482
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   483
(*<*)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   484
context extend_highest_gen
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   485
begin
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   486
(*>*)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   487
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   488
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   489
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   490
  \begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   491
  \frametitle{\mbox{\large Theorem: ``No indefinite priority inversion''}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   492
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   493
  \pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   494
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   495
  Theorem $^\star$: If th is the thread with the highest precedence in state 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   496
  @{text "s"}: \pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   497
  \begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   498
  \textcolor{red}{@{thm highest})}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   499
  \end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   500
  \pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   501
  and @{text "th"} is blocked by a thread @{text "th'"} in 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   502
  a future state @{text "s'"} (with @{text "s' = t@s"}): \pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   503
  \begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   504
  \textcolor{red}{@{text "th' \<in> running (t@s)"} and @{text "th' \<noteq> th"}} \pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   505
  \end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   506
  \fbox{ \hspace{1em} \pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   507
  \begin{minipage}{0.95\textwidth}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   508
  \begin{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   509
  \item @{text "th'"} did not hold or wait for a resource in s:
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   510
  \begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   511
  \textcolor{red}{@{text "\<not>detached s th'"}}  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   512
  \end{center} \pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   513
  \item @{text "th'"} is running with the precedence of @{text "th"}:
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   514
  \begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   515
  \textcolor{red}{@{text "cp (t@s) th' = preced th s"}} 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   516
  \end{center} 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   517
  \end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   518
  \end{minipage}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   519
  \pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   520
  \small
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   521
  $^\star$ modulo some further assumptions\bigskip\pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   522
  It does not matter which process gets a released lock.
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   523
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   524
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   525
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   526
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   527
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   528
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   529
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   530
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   531
  \begin{frame}[t]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   532
  \frametitle{Implementation}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   533
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   534
  s $=$ current state; @{text "s'"} $=$ next state $=$ @{text "e#s"}\bigskip\bigskip
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
  When @{text "e"} = \alert{Create th prio}, \alert{Exit th} 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   537
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   538
  \begin{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   539
  \item @{text "RAG s' = RAG s"}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   540
  \item No precedence needs to be recomputed
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   541
  \end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   542
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   543
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   544
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   545
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   546
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   547
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   548
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   549
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   550
  \begin{frame}[t]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   551
  \frametitle{Implementation}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   552
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   553
  s $=$ current state; @{text "s'"} $=$ next state $=$ @{text "e#s"}\bigskip\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   554
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   555
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   556
  When @{text "e"} = \alert{Set th prio}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   557
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   558
  \begin{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   559
  \item @{text "RAG s' = RAG s"}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   560
  \item No precedence needs to be recomputed
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   561
  \end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   562
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   563
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   564
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   565
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   566
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   567
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   568
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   569
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   570
  \begin{frame}[t]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   571
  \frametitle{Implementation}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   572
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   573
  s $=$ current state; @{text "s'"} $=$ next state $=$ @{text "e#s"}\bigskip\bigskip
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
  When @{text "e"} = \alert{Unlock th cs} where there is a thread to take over
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   576
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   577
  \begin{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   578
  \item @{text "RAG s' = RAG s - {(C cs, T th), (T th', C cs)} \<union> {(C cs, T th')}"}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   579
  \item we have to recalculate the precedence of the direct descendants
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   580
  \end{itemize}\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   581
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   582
  \pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   583
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   584
  When @{text "e"} =  \alert{Unlock th cs} where no thread takes over
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   585
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   586
  \begin{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   587
  \item @{text "RAG s' = RAG s - {(C cs, T th)}"}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   588
  \item no recalculation of precedences
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   589
  \end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   590
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   591
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   592
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   593
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   594
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   595
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   596
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   597
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   598
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   599
  \begin{frame}[t]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   600
  \frametitle{Implementation}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   601
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   602
  s $=$ current state; @{text "s'"} $=$ next state $=$ @{text "e#s"}\bigskip\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   603
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   604
  When @{text "e"} = \alert{Lock th cs} where cs is not locked
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   605
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   606
  \begin{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   607
  \item @{text "RAG s' = RAG s \<union> {(C cs, T th')}"}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   608
  \item no recalculation of precedences
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   609
  \end{itemize}\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   610
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   611
  \pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   612
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   613
  When @{text "e"} = \alert{Lock th cs} where cs is locked
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   614
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   615
  \begin{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   616
  \item @{text "RAG s' = RAG s - {(T th, C cs)}"}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   617
  \item we have to recalculate the precedence of the descendants
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   618
  \end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   619
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   620
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   621
  \end{frame}}
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
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
text_raw {*
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
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   629
  \begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   630
  \frametitle{Conclusion}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   631
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   632
  \begin{itemize} \large
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   633
  \item Aims fulfilled \medskip \pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   634
  \item Alternative way \pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   635
       \begin{itemize} 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   636
           \item using Isabelle/HOL in OS code development \medskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   637
           \item through the Inductive Approach
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   638
       \end{itemize} \pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   639
  \item Future research \pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   640
       \begin{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   641
           \item scheduler in RT-Linux\medskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   642
           \item multiprocessor case\medskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   643
           \item other ``nails'' ? (networks, \ldots) \medskip \pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   644
           \item Refinement to real code and relation between implementations
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   645
        \end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   646
  \end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   647
  \end{frame}}
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
*}
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
text_raw {*
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   652
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   653
  \mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   654
  \begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   655
  \frametitle{Questions?}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   656
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   657
  \begin{itemize} \large
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   658
  \item Thank you for listening!
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   659
  \end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   660
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   661
  \end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   662
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   663
*}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   664
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   665
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   666
(*<*)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   667
end
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   668
end
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   669
(*>*)