Explain the trade offs between multi threaded and single threaded programming. Imagine you have N threads and N resources - how do you ensure no deadlocks occur?
Multithread: Advantage: concurrent execution different tasks at same time, share the heap memory.
Disadvantage: slow on the thread context switch
Signal: advantage: at one time, only one task can be executed
No cycle in the threads
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment