Which of the following statement regarding concurrency is correct? (A) In a sing
ID: 3869293 • Letter: W
Question
Which of the following statement regarding concurrency is correct?
(A) In a single processor multiprogramming system, processes are interleaved in time to yield the appearance of simultaneous execution.
(B) The solution to the concurrency problem is to control access to the shared resources.
(C) In a uniprocessor system, the reason to cause the concurrency problem is that an interrupt can stop instruction execution anywhere in a process.
(D) In a multiprocessor system, one or more processors may be executing the same global variables at the same time.
(E) All of the above
Explanation / Answer
Which of the following statement regarding concurrency is correct?
(E) All of the above
(A) In a single processor multiprogramming system, processes are interleaved in time to yield the appearance of simultaneous execution.
Concurrency means the interleaving of processes in time to yield the appearance of simultaneous execution which is different from parallelism which executes programs in parallel, in a single processor multiprogramming system means multiple tasks running at the same time by sharing a common processing resource, on simultaneous execution when a program/task is depend on another programs execution but it not executed given time which leads to concurrency.
B) The solution to the concurrency problem is to control access to the shared resources.
The basic problem in concurrency is while accessing a shared resources the processes are interfaced each other which leads to concurrency. For example there is two processes P1 and P2 access the Resources R1, R2 and R3 when P1 is executed by taking R1 suddenly P1 interrupts and stops execution the P2 starts execution on same R1 and changed the values of R1 after that P2 resumed the execution and access R1 but the values of R1 are changed by P2 so the P1 execution leads to errors this makes the program concurrent. Solution to this is control the shared resources by allowing only one process at a time to enter the code that accesses R1 which is also referred as Critical section.
(C) In a uniprocessor system, the reason to cause the concurrency problem is that an interrupt can stop instruction execution anywhere in a process.
Uniprocessor means a system which have single CPU which is used to execute the computer tasks/programs, in this system the programs or task stopped unconditionally when any processer interrupts in middle of execution. Because when to processes trying to execute different operations on same shared data one process need to be interrupted due to only one process may modify shared data at one time Which leads concurrency.
D) In a multiprocessor system, one or more processors may be executing the same global variables at the same time.
Multiple processor system in terms specify that multiple programs are executed by multiple processors. Where when one or more processors trying to access global variables at same time while execution one processor (P1) changes the values of global variable at the same time another processor (P2) try to access the same variable the values of that global variable are modified by the first processor(P1) when a global variable is changed it effects the entire program, on access P2 requires initial values of global variable but P1 modified global variable then P2 interrupts and executed with errors which intends to concurrency.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.