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

This preview shows page 1 - 2 out of 3 pages.

ECEC-353: Systems Programming 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.
Image of page 1

Subscribe to view the full document.

Image of page 2
  • Spring '11
  • SM
  • p1, AirTrain Newark

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern