Computer Science

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.
[5 marks]
(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
[5 marks]
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.
[10 marks]

Don't use plagiarized sources. Get Your Custom Essay on
Computer Science
Just from $13/Page
Order Essay
Place Order
Grab A 14% Discount on This Paper
Pages (550 words)
Approximate price: -
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Try it now!

Grab A 14% Discount on This Paper

Total price:
$0.00

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.