5.3 Consider the following program
const int n = 50;
int tally;
void total()
{
int count;
for (count = 1; count <=nn, count ++)
{
tally ++;
}
}
void main()
{
tally = 0
parbegin (total(), total();
write (tally);
}
1. Determine the proper lower bound and upper bound on the final value of the shared variable tally output by this concurrent program. Assume processes can execute at any relative spend and that a value can only be incremented after it has been loaded into a register by a separate machine instruction.
2. Suppose that an arbitrary number of these processes are permitted to execute in a parallel under the assumption of part a. What effect will these modifications have on the range of final value of tally.
8.5 A process references five pages A,B,C,D and E in the following order.
A;B;C;D;A;B;E;A;B;C;D;E
Assume that the replacement algorithm is the first in and first out, and find the number of pages transfers during this sequence of references for starting with an empty main memory with three page frames. Repeat for four page frames.
8.6 A process contains eight virtual pages on disk and is assigned a fixed location of four page frames in main memory. The following page trace occurs:
1,0,2,2,1,7,6,7,0,1,2,0,3,04,5,1,5,2,4,5,6,7,6,7,2,4,2,7,3,3,2,3
a) Show the successive pages residing in the four frames using LRU replace policy.
Compute the hit ration in main memory. Assume that the frames are initially empty.
b) Repeat part A for the FIFO replace policy.
c) Compute the two hit ratios and comment on the effectiveness of using FIFO to approximate LRU with respect to this particular value.
## Deliverables
This is homework help for my operating systems class. it about 8 questions. Thanks
## Platform
It can just be written in word