Topic 9 – Processes and scheduling Flashcards
what is a
process/task
this is a program that has been
- fetched from the hard drive and stored in memory
- has been allocated resources
- and is being executed
describe
priority scheduling
This is a method of scheduling that takes the priority of a process into account
A priority could be a number range from 0 to 100 when a process is seen to have a higher priority than another then it is allowed to queue jump this ensures that high priority processes do not have to wait
describe the feature
niceness
that exists within the linux scheduling system
this allows a process to change its own priority
the process will start with this value set to 0 and this can be raised to 19.
the priority for the process then is the sum of the initial priority and the value of this that is set.
this command is used to view a snapshot of currently running processes, used on its own it will show processes owned by you and are releveant to the current terminal session
what is the outcome of typing the linux
ps
command
describe
first-in first-out (FIFO) scheduling
this is a simpe and almost fair method of handling scheduling
simply there is a queue of processes each with there own quantum that they require.
the first processes that arrived are the first to use the CPU. when a process has finished its execution it simply leaves the queue
although this does share time fairly between the proceses a drawback is that it does not take into account any processes that could be of high priority
example
a process such as a interrupt service routine must be seen immeditatly and be of high priority otherwise there is a potential for data loss
what is a drawback of
round robin scheduling
what is
scheduling
This is one of the tasks that the operating system must carry.
It includes handling the demand on the processor such as which processes should get access next and for how long
describe the system used by linux schedulers
this operating syste uses schedulers that are based around priority and uses a number system where the lower the number is the higher priority it has
within a linux scheduer this scheduling method would be used for
events that take longer to handle and which may be pre-empted, requiring more complex code.
what events would the real time schedulers within linux use
round robin
for
within linux this type of user may adjust the priority of a process by altering the niceness with values from
0 - 20
what values of niceness can a
normal user
set for a process
within linux this is a scheduler that takes control when the processor has nothing to do
the processes it handles will have a priority of 40 which is the lowest priority
one such process that could exist here is to halt the processor so that it conserverves power
what is the
idle scheduler
within linux
in the context of scheduling what is a
quantum
in the context of scheduling this is the name given to a time slice that a process is given by the operating system it will be very short such as 10ms
describe the execution process of
parallel processing
the execution process for this is:
where there is more than one CPU and so now a process can be allocated to each CPU giving true multiprocessing
however there may be hundreds more processes than CPUs and so each CPU will be employing the concurrent processing method
This is one of the tasks that the operating system must carry.
It includes handling the demand on the processor such as which processes should get access next and for how long
what is
scheduling
what values of niceness can a
root user
set for a process
within linux this type of user may adjust the priority of a process by altering the niceness with values
from -20 to 20
name 3
resources that a process may be given
these include but are not linited to:
- its own access to memory
- access to files
- access to I/O devices
A drawback of this method is that very low priority processes may never get a chance to use the processor or not frequently enough since higher priority processes can always jump before it
what is a drawback of
priority scheduling
what are 3 scheduling methods that the
real time schedulers within linux
may use
these scheduers within linux may use the following scheduling methods:
- First-in first-out (FIFO)
- round robin
- deadline
what 3
normal schedulers
does linux use
for this group of scheduling linux employs:
- a scheduler known as completely fair scheduler
- a scheduler for handling batch procceses
- a scheduler for when the processor is idle
this is a normal process scheduler within linux
it works by honouring the initial priority and the niceness of a process but at the same time can dynamically change its priority.
When a switch happens the highest priority process is given processor time, however this scheduler ensures that processes with the same priority/niceness get an equal slice of CPU time
describe the linux
completely fair scheduling
these are handled by the operating system in essentially the same manner
how does an operating sytem handle processes and threads
what is the outcome of typing the linux
Ps -uax
command
displays a snapshot of processes owned by the current and any other users in a format and details similar to the task manager
within linux this range is:
from -100 (highest) to 40 (lowest)
what is the
number range of scheduling priorities within linux
for this group of scheduling linux employs:
- a scheduler known as completely fair scheduler
- a scheduler for handling batch procceses
- a scheduler for when the processor is idle
what 3
normal schedulers
does linux use
within the linux scheduling system this will start with a priority of 20. however, this can be raised and lowered by using a feature known as niceness
within the linux scheduling system what
priority does a user mode process start with
NO
these are not allocated there own resources
instead they will share the resources of its parent process
are threads allocated there own resources
what is the linux
htop
command used for
this is an interactive way of viewing processes within the terminal offering a similar view and details that a task manager would offer
describe the
deadline scheduling method
that a real time scheduler in linux might use
A scheduler that allows the process to book an amount of CPU time needed before a deadline. It is suited to handling audio and video in a buffer where processing must be completed in time for the next block of data to arrive. As long as the scheduler can honour the deadline, processing will appear continuous to the user.
(Open University, 2020)
this is essentially a process belonging to a process
it runs a specific task within a program, a process may spawn many of these
what is a
thread
this can set itself an initial priority level of less than 20 and any threads it creates can be given a priority as low as -100 guaranteeing that it will have the highest priority, real time processes can take advantage of this
what initial priority values can the linux operating system set itself
this is a list of instructions that are stored on a hard drive, a hard drive will have many of these
what is a
program
describe the linux
completely fair scheduling
this is a normal process scheduler within linux
it works by honouring the initial priority and the niceness of a process but at the same time can dynamically change its priority.
When a switch happens the highest priority process is given processor time, however this scheduler ensures that processes with the same priority/niceness get an equal slice of CPU time
how do most linux distributions structure their schedulers
In linux most versions employ multiple schedulers with one dealing with real time processes and the other dealing with normal processes
this allows a process to change its own priority
the process will start with this value set to 0 and this can be raised to 19.
the priority for the process then is the sum of the initial priority and the value of this that is set.
describe the feature
niceness
that exists within the linux scheduling system
this is a program that has been
- fetched from the hard drive and stored in memory
- has been allocated resources
- and is being executed
what is a
process/task
A scheduler that allows the process to book an amount of CPU time needed before a deadline. It is suited to handling audio and video in a buffer where processing must be completed in time for the next block of data to arrive. As long as the scheduler can honour the deadline, processing will appear continuous to the user.
(Open University, 2020)
describe the
deadline scheduling method
that a real time scheduler in linux might use