Explain why choosing a multi-threaded approach is more scalable as compared to a multi-process approach

english

Description

Explain why choosing a multi-threaded approach is more scalable as compared to a multi-process approach. Describe how threads or processes share data between them. Assuming a computer has a single processor and a single core with no support for parallel execution, explain why running a multi-threaded program would show no performance improvement. Would inter-process communication be relevant in such a context? The thread example in the course textbook on page 108 says, “The order in which the various messages are interleaved is nondeterminate and may vary on consecutive runs of the program.” Dr. Tanenbaum is in effect saying the program has a built-in race condition. Explain why the addition of pthread_join(thread[i], NULL) after the status check inside the for() loop solves the race condition.


Related Questions in english category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.