Verification of mutual exclusion algorithms with EST - PowerPoint PPT Presentation

About This Presentation
Title:

Verification of mutual exclusion algorithms with EST

Description:

noncritical section ; bi := true; while bj do begin. if k = j then begin. bi := false; ... noncritical section ; bi := true; k := j; while (bj and k = j) do ... – PowerPoint PPT presentation

Number of Views:51
Avg rating:3.0/5.0
Slides: 15
Provided by: robertm155
Category:

less

Transcript and Presenter's Notes

Title: Verification of mutual exclusion algorithms with EST


1
Verification of mutual exclusion algorithms with
EST
ERK 2001
  • Robert Meolic, Tatjana Kapus, Ernest Gungl,
    Zmago Brezocnik

2
Verification of mutual exclusion algorithms with
EST
  • Introduction
  • Mutual exclusion algorithms
  • Formal verification
  • Equivalence checking
  • Model checking
  • Demonstration

3
Introduction
  • A critical section is a block of code in a thread
    that accesses one or more shared variables in a
    read-update-write fashion.
  • In such a situation we want mutual exclusion
    only one thread at a time can access
    (read-update-write) a shared variable at a time.
  • The mutual exclusion problem is how to keep two
    or more threads from being in their critical
    sections at the same time.

4
A critical section and mutual exclusion
  • while (true)
  • outsideCS()
  • wantToEnterCS(i)
  • insideCS()
  • finishedInCS(i)

5
Dekkers algorithm (1965)
while true dobegin ltnoncritical sectiongt
bi true while bj do begin if k
j then begin bi false
while k j do skip bi true
end end ltcritical sectiongt k
j bi falseend
  • Mutual exclusion with shared variables and
    referee
  • variables b1 and b2 (false or true)
  • variable k (1 or 2)

Dekkers algorithm is very efficient algorithm
for handling two concurrent processes.
6
Hymans algorithm (1966)
 
while true dobegin ltnoncritical sectiongt
bi true while k ? i do begin
while bj do skip k i end
ltcritical sectiongt bi falseend
7
Petersons algorithm (1981)
while true dobegin ltnoncritical sectiongt
bi true k j while (bj and k j)
do skip ltcritical sectiongt bi
falseend
8
Formal verification
  • Mentor Graphics FormalPro
  • Equivalence checking
  • Have I corrupted my design with changes?
  • Model checking
  • Have I designed what I wanted to design?

9
Why formal verification?
Source Mentor Graphics Web page
10
Source Mentor Graphics
11
Efficient Symbolic Tools
  • Realized on Faculty of Electrical Engineering and
    Computer Science in Maribor
  • The project started in year 1992
  • GNU General Public License
  • It runs on many different computers with
    different operating systems, including HP-UX,
    Linux, and Windows.

http//www.el.feri.uni-mb.si/est/
12
Demonstration
  • Verification of Hymans algorithm (MC) - does
    not preserve mutual exclusion
  • Verification of Petersons algorithm (MC) -
    preserve mutual exclusion
  • Our model contains divergent states (MC) - we
    eliminate divergent states
  • Modification was not correct! (EC) - we improve
    our model

13
Modified model of Petersons algorithm
 
?

14
Further work
  • Mutual exclusion algorithms for 3 or more
    processes, e.g. Lamports algorithm
  • Automatic trasformation from programming language
    to process algebra description
  • Model checking with fairness constraints
Write a Comment
User Comments (0)
About PowerShow.com