1. In a bank, a process transfers money from account A to account B as follows:
Money Transfer Process Lock account A: Lock account 8; Transfer money from account A to account 8; Unlock account A; Unlock account 8;
(a) Apply the TestAndSet() instntction to realize the above money transfer.
(b) Apply semaphore(s) to realize the above money transfer.
[5 marks] (c) Explain what you would do to ensure that the money transfer processes would not have deadlock
2. Suppose processes A, B, C and D must be synchronized as follows: Process A executes ProcessDotal() and Process B executes Processbato2() concurrently. When the above two functions have completed execution, Process C executes Processbata3() and Process D executes Processbata40 concurrently. Apply semaphores to solve the above synchronization problem.
Try it now!
How it works?
Follow these simple steps to get your paper done
Place your order
Fill in the order form and provide all details of your assignment.
Proceed with the payment
Choose the payment system that suits you most.
Receive the final file
Once your paper is ready, we will email it to you.