Information Technology Reference
In-Depth Information
Figure 6. a. Number of swaps using best fit or first fit; b. Execution time using best fit or first fit
allocations, this approach can lengthen the ex-
ecution time.
Another approach implements the priority by
dynamically changing the time slice according
to the average priority of the processes in the
group. This approach sorts the processes by
their shared memory sizes and builds bins us-
ing a First-Fit version that has been introduced
above. Actually, this approach performs the
same procedure of building the bins, but each
group gets a dynamically different time slice,
according to the average priority of the group.
The medium-term scheduler calculates the global
average priority of all the processes currently
run and the average priority of the processes in
each group. Next, it calculates the difference
between the average of each group and the global
average. Let us denote this vector of differences
as D and the global average priorities of all the
processes as P. Then, the medium-term scheduler
gives each group (D[i]+P)/P*TS where TS is
the default group time slice and i is the index
the group.
Figure 7 shows the differences between the
approaches. We used the SPEC benchmark. We
took in each test one process and we awarded it
the highest priority: -20. We always took another
process and demoted its priority to the lowest
one: 19. The tests are written on the X-axis.
The promoted test is written below. We did not
change any other process' priority. The default
group slice time was one second.
Search WWH ::




Custom Search