1 votes 1 votes Operating System operating-system + – Arnabi asked Jan 14, 2017 Arnabi 429 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes i think 2 is minimum value Explanation assuming Ri as a seperate reg as given initially count=0 after 1) count=0 but Ri=1 after 2) count=4 after 3) count=1 after 4) count=1 but Ri=2 after 5) count=5 after 6) count=2 Ans=2 saurabh rai answered Jan 14, 2017 edited Jan 15, 2017 by saurabh rai saurabh rai comment Share Follow See all 5 Comments See all 5 5 Comments reply Show 2 previous comments Arnabi commented Jan 15, 2017 reply Follow Share What do they mean by the last three lines i.e the assumption part..how it is working.. 0 votes 0 votes Arnabi commented Jan 15, 2017 reply Follow Share i mean the note part not the preemption .. 0 votes 0 votes Sushant Gokhale commented Jan 17, 2017 reply Follow Share @Arnabi. THis the sequence: Tally1() Tally2() Now, Tally1() executes count = count + 1 4 times and before Tally1() writes back into the register, Tally2() loads 0 into its register. Now, after Tally1() writes back 4 into the register and after that Tally2() increments value and writes 1 into the register. Now, let the tally1() reads 1 from register for its final increment instruction. Now, after this, tally2() executes all its increment operations. So, final value in register is 5. Now, tally1() increments value to 2 and writes back 2 into the register. Hence, value 2. 0 votes 0 votes Please log in or register to add a comment.