%\documentclass{article}\documentclass{llncs}%\textwidth 130mm%\textheight 200mm%\renewenvironment{abstract}{\section*{Abstract}\small}{}\pagestyle{headings}\usepackage{isabelle}\usepackage{isabellesym}\usepackage{amsmath}\usepackage{amssymb}\usepackage{mathpartir}\usepackage{tikz}\usepackage{pgf}\usepackage{pdfsetup}\usepackage{ot1patch}\usepackage{times}\usepackage{stmaryrd}\usepackage{url}\usepackage{color}\usepackage{courier}\usepackage{endnotes}\usetikzlibrary{patterns}\usepackage{listings}\lstset{language=C, numbers=left, basicstyle=\small\ttfamily, numberstyle=\footnotesize, frame=tb}\urlstyle{rm}\isabellestyle{it}\renewcommand{\isastyleminor}{\it}%\renewcommand{\isastyle}{\normalsize\it}%%%%\titlerunning{Proving the Priority Inheritance Protocol Correct}\def\dn{\,\stackrel{\mbox{\scriptsize def}}{=}\,}\renewcommand{\isasymequiv}{$\dn$}\renewcommand{\isasymemptyset}{$\varnothing$}\renewcommand{\isacharunderscore}{\mbox{$\_\!\_$}}\renewcommand{\isasymiota}{}\newcommand{\numbered}[1]{\refstepcounter{equation}{\rm(\arabic{equation})}\label{#1}}\definecolor{mygrey}{rgb}{.80,.80,.80}%\newtheorem{definition}{Definition}%\newtheorem{theorem}[definition]{Theorem}%\newtheorem{lemma}[definition]{Lemma}%\newtheorem{proof}{Proof}%\renewcommand{\theproof}{}%\newcommand{\qed}{\hfill \mbox{\raggedright \rule{0.1in}{0.1in}}}\begin{document}\renewcommand{\thefootnote}{$\star$}\footnotetext[1]{This paper is a revised, corrected and expanded version of \cite{ZhangUrbanWu12}.Compared with that paper we give an actual implementation of our formalised scheduling algorithm in C and the operating system PINTOS. Our implementation follows closely all resultswe proved about optimisations of the Priority Inheritance Protocol. We are giving in this papermore details about the proof and also surveying the existing literature in more depth.}\renewcommand{\thefootnote}{\arabic{footnote}}\title{Priority Inheritance Protocol Proved Correct}\author{Xingyuan Zhang$^1$, Christian Urban$^2$ and Chunhan Wu$^1$}\institute{PLA University of Science and Technology, China \and King's College London, United Kingdom}\maketitle\begin{abstract}In real-time systems with threads, resource locking and prioritysched\-uling, one faces the problem of Priority Inversion. Thisproblem can make the behaviour of threads unpredictable and theresulting bugs can be hard to find. The Priority Inheritance Protocolis one solution implemented in many systems for solving this problem,but the correctness of this solution has never been formally verifiedin a theorem prover. As already pointed out in the literature, theoriginal informal investigation of the Property Inheritance Protocolpresents a correctness ``proof'' for an \emph{incorrect} algorithm. Inthis paper we fix the problem of this proof by making all notionsprecise and implementing a variant of a solution proposed earlier. Wealso generalise the scheduling problem to the practically relevant case wherecritical sections can overlap. Our formalisation in Isabelle/HOL notjust uncovers facts not mentioned in the literature, but also helpswith implementing efficiently this protocol. Earlier correctimplementations were criticised as too inefficient. Our formalisationis based on Paulson's inductive approach to verifying protocols; ourimplementation builds on top of the small PINTOS operating system usedfor teaching.\medskip{\bf Keywords:} Priority Inheritance Protocol, formal correctness proof, real-time systems, Isabelle/HOL\end{abstract}\input{session}%\bibliographystyle{plain}%\bibliography{root}\end{document}%%% Local Variables:%%% mode: latex%%% TeX-master: t%%% End: