a) Consider four concurrent processes A, B, C, and D, synchronized by two semaphores ‘s1’…

Our papers are 100% unique and written following academic standards and provided requirements. Get perfect grades by consistently using our writing services. Place your order and get a quality paper today. Rely on us and be on schedule! With our help, you'll never have to worry about deadlines again. Take advantage of our current 20% discount by using the coupon code GET20


Order a Similar Paper Order a Different Paper

a) Consider four concurrent processes A, B, C, and D, synchronized by two

semaphores 's1' and 's2'. Initially, s1 = 1 and s2 = 0.

process A = process B = process C = process D =

wait ( s1 ) wait ( s1 ) wait ( s2 ) wait ( s1 )

print 'a' print 'b' print 'c' print 'd'

signal( s1 ) signal( s2 ) signal( s1 ) signal( s1 )

i) Suppose 'a' is printed first. List the characters that can be printed

as the last character of the string. Justify your answer.

ii) Suppose 'b' is printed first. List the characters that can be printed

as the last character of the string. Justify your answer.

b) Consider a different example. Initially, atom = 1 and goB = 0.

process A = process B =

'do' j := 1 to m —> 'do' j := 1 to n —>

wait (atom) wait (atom)

… …

signal (goB) wait (goB)

… …

signal (atom) signal (atom)

'od' 'od'

i) Let m > n. In this case, does there exist an execution scenario in

which both processes block permanently? Does there exist an execution

scenario in which neither process blocks permanently? Justify your answers.

ii) Let m

which both processes block permanently? Does there exist an execution

scenario in which neither process blocks permanently? Justify your answers.

We offer the best essay writing services to students who value great quality at a fair price. Let us exceed your expectations if you need help with this or a different assignment. Get your paper completed by a writing expert today. Nice to meet you! Want 15% OFF your first order? Use Promo Code: FIRST15. Place your order in a few easy steps. It will take you less than 5 minutes. Click one of the buttons below.


Order a Similar Paper Order a Different Paper