Sie sind auf Seite 1von 2

Serializability(Allow concurrency)

When multiple transactions are being executed by the operating system in a multiprogramming
environment, there are possibilities that instructions of one transaction are interleaved with some other
transaction.
Schedule: A chronological execution sequence of a transaction is called a schedule. A schedule can
have many transactions in it, each comprising of a number of instructions/tasks.

Example Schedules
Serial Non-Serial
T1 T2 T1 T2
read(a)
read(a) a:=a-50
a:=a-50 write(a)
write(a)
read(b) T read(a)
b:=b+50 I t:=a*.10
write(b) M a:=a-t
E write(a)
read(a) read(b)
|
t:=a*.10 b:=b+50
a:=a-t | write(b)
write(a) ↓
read(b) read(b)
b:=b+t b:=b+t
write(b) write(b)

 Above schedule is serializable; below is problematic

Serial Non-Serial
T1 T2 T1 T2
read(a)
read(a) a:=a-50
a:=a-50
write(a) read(a)
read(b) T t:=a*.10
b:=b+50 I a:=a-t
write(b) M write(a)
E read(b)
read(a) write(a)
t:=a*.10 | read(b)
a:=a-t | b:=b+50
write(a) ↓ write(b)
read(b)
b:=b+t b:=b+t
write(b) write(b)

Das könnte Ihnen auch gefallen