Question: Consider the following source code program ThreadTest total = 1 0 sub thread 1 as thread for i = 1 to 2 total = total
Consider the following source code
program ThreadTest
total
sub thread as thread
for i to
total total i
next
end sub
sub thread as thread
for i to
call thread
total total i
next
end sub
call thread
call thread
wait
writeln Total total
end
Compile the above source code and load it in the main memory. Create a single process, choose RR scheduling algorithm with time quantum of ticks. Run the Process.
Answer the following questions:
a What is the value of Total
b How many processes and how many threads are created?
c Identify the name of the processes and threads.
d What is the PID and PPID of the processes and threads created?
e Represent the parent and child relationship using tree representation
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
