Ask Question
12 June, 01:35

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?

+1
Answers (1)
  1. 12 June, 05:13
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers