HW3 - ECEC-353: Systems Programming Solutions for Homework...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Solutions for Homework Set 3 August 14, 2011 Problem 6.8: Assume the balance in the account is $250.00 and the husband calls withdraw $50 and the wife calls deposit$100. Obviously the correct value should be $300.00 Since these two transactions will be serialized, the local value of balance for the husband becomes $200.00, but before he can commit the transaction, the deposit$100 operation takes place and updates the shared value of balance to $300.00 We then switch back to the husband and the value of the shared balance is set to $200.00 - obviously an incorrect value. Problem 6.17: A semaphore S is initialized to the number of allowable open socket connections. When a connection is accepted, P ( S ) is performed; when a connection is released, V ( S ) is performed. If the system reaches the number of allowable socket connections, subsequent calls to P ( S ) will block until an existing connection is terminated and the V operation is invoked. Problem 6.20:
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

HW3 - ECEC-353: Systems Programming Solutions for Homework...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online