Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

using cpu simulator , compile this multithread server program program ServerTest var p integer sub ServiceThread as thread writeln(Started service) for i = 1 to

using cpu simulator , compile this multithread server program

program ServerTest

var p integer

sub ServiceThread as thread

writeln("Started service")

for i = 1 to 30

next

writeln("Finished service")

end sub

sub ServerThread as thread

while true

read(nowait, p)

select p

case '1'

call ServiceThread

case 'q'

break

case else end select

wend

end sub

call ServerThread

wait

end

in the console I got this output

image text in transcribed

Now, modify the above code by removing the as thread construct from the subroutine ServiceThread.

g. Compile the above source, load the generated code in memory and run it.

h. On the console window type 1 four times one after the other and observe the displays on the console.

after modification I got image text in transcribed why they differ? after modification

- Console OUTPUT 1started service 1started service 11started service Finished service Finished service Finished service INPUT Fonts 1 SHOW KEYBD... Stay on top No output display Display CPU id Colours Screen colour Text colour SET... SET... PRINT... CLEAR CLOSE Console OUTPUT e 1 started service st Finished service I started service Finished service 1started service Finished service 1started service Finished service Fonts INPUT 1 SHOW KEYBD... Stay on top No output display Display CPU id Colours Screen colour Text colour SET... SET... PRINT... CLEAR CLOSE

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts Of Database Management

Authors: Joy L. Starks, Philip J. Pratt, Mary Z. Last

9th Edition

1337093424, 978-1337093422

More Books

Students also viewed these Databases questions

Question

Provide examples of Dimensional Tables.

Answered: 1 week ago