I interference freedom Interlock Instructions that reads updates - - PDF document

i
SMART_READER_LITE
LIVE PREVIEW

I interference freedom Interlock Instructions that reads updates - - PDF document

f Schreder Cs 1410 9 7 2019 Concurrencym process thread core processor finale progress shared memory communication t synchronization cooperation Synchronization mutual exclusion critical sectors problem await B wait busy spinning classic


slide-1
SLIDE 1

Concurrencym 9 7 2019 Cs 1410

f Schreder

process thread

core processor

finaleprogress

shared memory

cooperation

communication

t synchronization

Synchronization

mutual exclusion

critical sectors problem

await

B spinning

busy wait

classic problems

a

PST

prect

G s

t

a

I

interference freedom

slide-2
SLIDE 2

Interlock Instructions

Hue instructor

that reads

updates shared

memory as poet of

a single atom acten

Eg

test and set

indivisible

toys

l

fl

s

a true

hw

typicallyshare

typically notstored Ceg a reg

memory

slide-3
SLIDE 3

Mutual Exclusion

using TS

VAI

si

boolean

initial

fake

var

l

G

lui

boolean

intl

free

I

At most one of

S h k

ln

is false

A

Ai incase

ne Proof that I

suffices to establish

mutual exclusion

Cassumy I

is noarent

incas

Ain

Gz

h I

Tl

A

k

1

At most one

is false

false

slide-4
SLIDE 4

In

At most one of

s h k

ln

is false

A

incase

ne

entry

Isles

gwhfkmleoegjdftdbftscs.ee anti

Ink

litre

s h

k en

true

I

S

false I

Other interlock instructions

Swapla b

i

Lab

_b

a

CS tix

  • n

ft

  • x

if

t

then x

n

else

  • x
slide-5
SLIDE 5

Synchronization Primitives

preventwasteful busy

wait

sprung

await B

H

wheel 713 do slap end

H

wht

B de yield end

where is stale B stored

if stored

in

OS

then Sys call

ear

charge its value

Te

OS will

know

when to awaken

a

Watneyprocess

Result

OS

implemented synchronization

prinutoes

slide-6
SLIDE 6

Producer consumer Problem

what landsof synchronization

is needed

prod

deferred

prod

f

cons

create dem

awaitfree slot

entry

ee

item

11

  • nsideoforeo_enawattEellslotfetfneoeileme.x

it

useiten

end

slide-7
SLIDE 7

Requirements for synchronization pantries

General purpose

mutualexclusion

Condition synchrontati

Law

at B

Simple to

use

Many primitives

have

been provided

in

various

systems

slide-8
SLIDE 8

Semaphore

Dykstra 1962

semi non negative integer

PGen watsemsothensemi

sem

ISVCsewDLsemi

sentDU8ngnolee.t

to sign.ly indivisible operate

Some history

Introduced byDykstan

THE syst are 1962

stands for

procure

Proberen

totest

  • totry

Passering

passing

but EWD Later said

Prolaay

Shortfor

probeerteverlagen

try to reduce

X stands for

vacate

Verhagen

increase

Vriggave

release

CS 4410 terms

slide-9
SLIDE 9

Semaphores admit simple soluton to mater

  • r

mature semaphore inith

Pt do foreoen

Pz do four

H

Pender

PCmulex

Gz

CS

Hmulex

Haneke

NCSz

Ncs

end

end

why does abooe protocol implement mutual exclusion

what

we

desire

I

at most 1 process exec tics

I

1

Mutt

processes

in CS

N

OE mutes El

proposal

O

slide-10
SLIDE 10
slide-11
SLIDE 11
slide-12
SLIDE 12
slide-13
SLIDE 13
slide-14
SLIDE 14
slide-15
SLIDE 15
slide-16
SLIDE 16
slide-17
SLIDE 17
slide-18
SLIDE 18