Journal/document/root.tex
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Tue, 04 Mar 2014 09:40:40 +0000
changeset 24 6f50e6a8c6e0
parent 20 b56616fd88dd
child 27 6b1141c5e24c
permissions -rwxr-xr-x
some additions
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
20
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 17
diff changeset
     1
%\documentclass{article}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 17
diff changeset
     2
\documentclass{llncs}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 17
diff changeset
     3
%\textwidth 130mm
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 17
diff changeset
     4
%\textheight 200mm
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 17
diff changeset
     5
%\renewenvironment{abstract}{\section*{Abstract}\small}{}
6
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     6
\usepackage{isabelle}
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     7
\usepackage{isabellesym}
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     8
\usepackage{amsmath}
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     9
\usepackage{amssymb}
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    10
\usepackage{mathpartir}
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    11
\usepackage{tikz}
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    12
\usepackage{pgf}
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    13
\usepackage{pdfsetup}
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    14
\usepackage{ot1patch}
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    15
\usepackage{times}
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    16
\usepackage{stmaryrd}
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    17
\usepackage{url}
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    18
\usepackage{color}
7
0514be2ad83e started code explanation
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 6
diff changeset
    19
\usepackage{courier}
0514be2ad83e started code explanation
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 6
diff changeset
    20
\usepackage{listings}
0514be2ad83e started code explanation
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 6
diff changeset
    21
\lstset{language=C,
0514be2ad83e started code explanation
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 6
diff changeset
    22
        numbers=left,
0514be2ad83e started code explanation
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 6
diff changeset
    23
        basicstyle=\small\ttfamily,
0514be2ad83e started code explanation
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 6
diff changeset
    24
        numberstyle=\footnotesize, frame=tb}
6
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    25
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    26
\urlstyle{rm}
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    27
\isabellestyle{it}
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    28
\renewcommand{\isastyleminor}{\it}%
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    29
\renewcommand{\isastyle}{\normalsize\it}%
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    30
7
0514be2ad83e started code explanation
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 6
diff changeset
    31
%%%\titlerunning{Proving the Priority Inheritance Protocol Correct}
6
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    32
\def\dn{\,\stackrel{\mbox{\scriptsize def}}{=}\,}
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    33
\renewcommand{\isasymequiv}{$\dn$}
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    34
\renewcommand{\isasymemptyset}{$\varnothing$}
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    35
\renewcommand{\isacharunderscore}{\mbox{$\_\!\_$}}
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    36
\renewcommand{\isasymiota}{}
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    37
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    38
\newcommand{\numbered}[1]{\refstepcounter{equation}{\rm(\arabic{equation})}\label{#1}}
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    39
\definecolor{mygrey}{rgb}{.80,.80,.80}
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    40
20
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 17
diff changeset
    41
%\newtheorem{definition}{Definition}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 17
diff changeset
    42
%\newtheorem{theorem}[definition]{Theorem}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 17
diff changeset
    43
%\newtheorem{lemma}[definition]{Lemma}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 17
diff changeset
    44
%\newtheorem{proof}{Proof}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 17
diff changeset
    45
%\renewcommand{\theproof}{}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 17
diff changeset
    46
%\newcommand{\qed}{\hfill \mbox{\raggedright \rule{0.1in}{0.1in}}}
6
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    47
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    48
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    49
\begin{document}
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    50
\renewcommand{\thefootnote}{$\star$}
24
6f50e6a8c6e0 some additions
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 20
diff changeset
    51
\footnotetext[1]{This paper is a revised, corrected and expanded version of \cite{ZhangUrbanWu12}.}
6
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    52
\renewcommand{\thefootnote}{\arabic{footnote}}
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    53
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    54
\title{Priority Inheritance Protocol Proved Correct}
20
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 17
diff changeset
    55
\author{Xingyuan Zhang$^1$, Christian Urban$^2$ and Chunhan Wu$^1$}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 17
diff changeset
    56
\institute{PLA University of Science and Technology, China \and 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 17
diff changeset
    57
           King's College London, United Kingdom}
6
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    58
\maketitle
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    59
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    60
\begin{abstract}
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    61
In real-time systems with threads, resource locking and 
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    62
priority sched\-uling, one faces the problem of Priority
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    63
Inversion. This problem can make the behaviour of threads
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    64
unpredictable and the resulting bugs can be hard to find.  The
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    65
Priority Inheritance Protocol is one solution implemented in many
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    66
systems for solving this problem, but the correctness of this solution
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    67
has never been formally verified in a theorem prover. As already
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    68
pointed out in the literature, the original informal investigation of
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    69
the Property Inheritance Protocol presents a correctness ``proof'' for
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    70
an \emph{incorrect} algorithm. In this paper we fix the problem of
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    71
this proof by making all notions precise and implementing a variant of
13
735e36c64a71 added explanation of the code
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 11
diff changeset
    72
a solution proposed earlier. We also generalise the original informal proof to the
8
5ba3d79622da added a paragraph about RAGS
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 7
diff changeset
    73
practically relevant case where critical sections can
5ba3d79622da added a paragraph about RAGS
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 7
diff changeset
    74
overlap. Our formalisation in Isabelle/HOL not just
6
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    75
uncovers facts not mentioned in the literature, but also shows how to
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    76
efficiently implement this protocol. Earlier correct implementations
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    77
were criticised as too inefficient. Our formalisation is based on
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    78
Paulson's inductive approach to verifying protocols; our implementation
8
5ba3d79622da added a paragraph about RAGS
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 7
diff changeset
    79
builds on top of the small PINTOS operating system.\medskip
6
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    80
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    81
%{\bf Keywords:} Priority Inheritance Protocol, formal correctness proof, 
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    82
%real-time systems, Isabelle/HOL
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    83
\end{abstract}
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    84
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    85
\input{session}
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    86
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    87
%\bibliographystyle{plain}
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    88
%\bibliography{root}
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    89
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    90
\end{document}
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    91
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    92
%%% Local Variables:
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    93
%%% mode: latex
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    94
%%% TeX-master: t
7f2493296c39 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    95
%%% End: