Information Technology Reference
In-Depth Information
processes vying for CPU cycles. It should be noted
that when the size of the last bin is not small, this
solution will function efficiently.
One possible solution is breaking up small
groups and scattering processes belong to the
small groups in other groups. This solution can be
good if the size of the small group is not big and
when there is just one small group. If the size of
the small group is big, scattering it might cause
thrashing in the other groups.
A better solution can be a dynamic group time
slices, instead of a constant time slice. E.g. if the
size vector is [1,1,0.5] and the default group time
slice is one second, the medium-term scheduler
should assign each of the first two groups one
second, whereas the last group will get only 0.5
second. (The vector represents the group's memory
size as the total memory allocations divided by
the total memory available for user application).
This solution gave us the best results; therefore
it has been implemented.
pages of interactive processes will be marked
as low priority swappable, so the kernel will not
swap out interactive processes when a group
context switch is done. However, the scheduler
has to calculate the memory needs of interactive
processes in every group.
When a new process is admitted, it will be
handled as an interactive process. The operating
system cannot know whether the new process is
interactive and if the execution of this process is
delayed, it will be irritating for interactive pro-
cesses. After one round of the bins, the scheduler
can assess the nature of the process and treat it
accordingly.
real time processes
The handling of real time processes is somewhat
similar to interactive processes. Real time pro-
cesses must get the CPU as fast as possible. The
management of these processes will be the same
as interactive processes, but with a slight differ-
ence. Real time processes will belong to all the
groups, as the interactive processes do, but they
will not have a shrunken time slice.
The kernel will not swap out Real time pro-
cesses, because they belong to all the groups. In
addition, Real time processes will have the same
privilege Linux traditionally gives them. It should
be noted that the scheduler has to calculate their
memory needs in every group as the scheduler
did for the interactive processes. This handling is
identical for FIFO Real-Time processes and for
RR Real-Time processes. This treatment has also
been applied to the “init” process and the “Idle
and Swapper” process of Linux, which cannot
be suspended.
interactive processes
The interactive processes should be dealt with
differently. If we treat them the same way as the
non-interactive processes, they will not be able to
be executed as long as their group is not current.
Interactive processes need fast response time and
a few seconds delay can be a major drawback.
To remedy this drawback, the scheduler allows
an interactive process which can be identified by
directly quantifying the I/O between an applica-
tion and the user (keyboard, mouse and screen
activity) (Etsion et al., 2004), to run in each of
the process groups. So, actually the process will
belong to all the groups, but with a smaller time
slice in each group:
priority
p->time_slice = time_slice(p)/num_of_groups;
Another important issue of the bin packing
scheduling discussion is the priority management.
Hypothetically, it might happen that the highest
priority processes belong to one group, whereas
This feature can assure us a short response
time for interactive processes while keeping
fairness towards other processes. The resident
Search WWH ::




Custom Search