497 views

1 Answer

Best answer
1 1 vote
there are two tally()  lets say tally1 and tally2

firrst run tally1

               for i=1

              count value ie 0 is given to register and register value is incremented to 1

              preempt this tally1 before  storing this register value to count

run tally2

           run  for i=1 to i=4

           count will increment from 0 to 4

           preempt this tally2 before for loop runs for i=5

run tally1

this time the  register value that was 1 will get stored in count   and  count=1

preempt  this tally1

run tally2

for i=5

copy count value i.e 1 to register  and increment register    register value=2

preeempt tally2 before storing the register value to count variable

run tally1

run the remaing tally1

tally1 finish

run tally2

copy the register value to count i.e. 2
• selected by
Position:
Show:

Related questions

0 0 votes
1 1 answer
277
277 views
1 1 vote
0 0 answers
213
213 views
Ekalavyaa asked Jul 17, 2025
213 views
A) 4952B) 1488C) 5952D) 1382
2 2 votes
1 1 answer
1.2k
1.2k views
abhiagr2 asked Oct 19, 2024
1,248 views
fork(); fork(); printf("Gate2024"); fork();what will be the answer?