Ask Question
22 March, 19:48

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?

+3
Answers (1)
  1. 22 March, 20:22
    0
    Before we go deep into this question lets have some brief knowledge on parallel execution, parallel processing and multi tasking.

    Parallel Execution : in this two or more tasks or program can be executed parallel or simultaneously.

    For example if there are two processors and four programs to be executed then it executes two at a time.

    Multi tasking: in this two or more tasks can be performed simultaneously switching between them without exiting any application.

    For example we use notepad, word pad, excel sheet, chrome all at a time switching between each other.

    Multi Threading: It is splitting up the program into different threads. If the contents in the program are independent on each other then the program can be split into multi threads and can be processed.

    Multi threading in multi core or processing unit : In this threads are executed parallel or simultaneously in different processes.

    For example if there are two processors then one multi threaded program can execute two threads in two different processors.

    Multi threaded program in single core unit : In this, program is multi threaded where as threads cannot execute parallel or simultaneously. they sholud be executed by the same processor. So they should wait in queue

    Ex: consider three tasks of 6 secs each and multi threaded each into three threads of two seconds.

    Task1 3secs > task2 3secs > task3 3 secs it repeats until each task is completed

    Total time taken is 3+3+3+3+3+3+3+3+3 is 18seconds ...

    If they are executed one by one without multi threading total execution time has no change ...

    Where as multi threading program has its advantages if different threads are executed at different place ...

    If one thread executes at network, another at printer and other processor then these three can execute at same time at different processors. Multi threading has its advantages but in single core systems it doesn't affect the performance.

    Inter process communication consists of

    Information Sharing, message passing, Modularity.

    In shared memory inter process communication processes shares the memory between each other.

    In message passing communication process communicates like request and replies for information and resources.

    Interlocking is due to error in resource sharing and information sharing. It results in system collapse.

    Al these process communication is required if there are two or more. processes but in single core it is not much useful and advisable.

    In single core there will be a single processor, processing multi threaded program as it can access all the memory contents there will be no problem of process communication. Where as in multi core systems different processes may compete for same memory or resource.

    In single core systems inter process communication makes things complex and these complexity is not much useful in any of the improvement in performance.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Assuming a computer has a single processor and a single core with no support for parallel execution, explain why running a multi-threaded ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers