IPCAssignment

Document Sample
IPCAssignment
Shared by: Arvind Kiwelekar
Categories
Tags
Stats
views:
46
posted:
2/25/2009
language:
English
pages:
2
M. Tech. in Computer Engineering Advanced Operating System Assignment 4

February 16, 2007



1



Theory Questions

1. Give an analogy between messages and semaphores. Why are semaphores more efficient than message passing? 2. What is the difference between a port and a message queue? When are blocking receives useful? What is the advantage of a blocking send? 3. Show a deadlock using semaphores. Give the program for each process. 4. What is the difference between ignoring a signal and blocking it? 5. Consider a statement, ” Any synchronization problem that can be solved with semaphores can be solved with messages, and vice versa”? Is this statement true or false? Explain the reasoning you used to come up with your answer. 6. Broadcasting a message can be implemented by sending a copy of of the message to each destination. This can be very expensive in use of memory, particularly as the size of messages, and the number of of destinations grow. Suggest an optimization. 7. Discuss the respective advantages of having one system wide buffer for all messages, one buffer per destination process, or one buffer per message stream, when using asynchronous message passing. 8. What is the essential difference between a monitor and an object. 9. Instead of blocking, a monitor could return a message saying ’busy-tryagain later’. Discuss the implementation of this.



10. Devise a protocol which would prevent a reader blocking on an empty pipe.



1



11. Suggest how you would implement a peek() function for pipes. This looks at the contents of the pipe, but does not remove it. 12. Devise a protocol by which a writer to a pipe could communicate the length of a message to a reader.



2




Share This Document


Other docs by Arvind Kiwelek...
Lect 3
Views: 52  |  Downloads: 4
l4
Views: 25  |  Downloads: 3
Implementing Unix Processes
Views: 174  |  Downloads: 36
forkAndExit
Views: 43  |  Downloads: 8
IPCAssignment
Views: 46  |  Downloads: 14
semaphore
Views: 934  |  Downloads: 33
tm1
Views: 74  |  Downloads: 4
Term Paper Assignment
Views: 43  |  Downloads: 3
sleepAndWakeup
Views: 21  |  Downloads: 9
Process Creation and Termination
Views: 96  |  Downloads: 4
by registering with docstoc.com you agree to our
privacy policy

You are almost ready to download!

You are almost ready to download!