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
this method of scheduling uses a queue and follows a first in first out approach.
however every process will get the same quantum slice so if a process requires more quantum than it was given it will be pre-emptied and will have to join the back of the queue

describe the process of
round robin scheduling
within the linux scheduling system what
priority does a user mode process start with
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
in the context of scheduling what is
pre-emptied
in the context of scheduling this is the term used to describe a process being replaced by another process when its quantum expires
what is
multitasking
this is one of the essential services that an operating system must provide and handle. Allowing more than one program to be used by the user without the need to close any programs
what values of niceness can a
normal 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
0 - 20
what is the outcome of typing the linux
ps -x
command
this will display a snapshot of all processes owned by the user
In linux most versions employ multiple schedulers with one dealing with real time processes and the other dealing with normal processes
how do most linux distributions structure their schedulers
are threads allocated there own resources
NO
these are not allocated there own resources
instead they will share the resources of its parent process
this scheduler within linux would be charged with scheduling background processes that are low priority, but may need longer time slices
within linux what type of processes would the
scheduler handling batch jobs
be dealing with
how does an operating sytem handle processes and threads
these are handled by the operating system in essentially the same manner
what initial priority values can the linux operating system set itself
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
if this is not implemented correctly then the user experience and/or performance may seem:
- slow - if a process is not chosen to use the processor for an extended time
- glitchy - in the case of real time operation such as playing music, again because the process has not been given access to the processor frequently enough
in what two ways could the user experience and/or performance be affected if
scheduling is not implemented correctly
what is a
thread
this is essentially a process belonging to a process
it runs a specific task within a program, a process may spawn many of these
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
describe the system used by linux schedulers
this could be but not linited to:
- A process that is involved in a lot of I/O may spend much of its time blocked because I/O devices work at a slower speed than a processor. In this case this process can have its priority lowered while it is blocked and raised when the I/O device is ready again.
- A low priority process can have its priority temporarily raised if it is making no progress
give two
examples of how dynamic scheduling
can work
the benefits of these are:
- quick creation - because these share the resources of there parent creating these is a much faster process
- switching - again because these share the resources of there parent process switching between these in a program is realtively fast
name 2 benefits of threads
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
describe the execution process of
parallel processing
name 2 benefits of threads
the benefits of these are:
- quick creation - because these share the resources of there parent creating these is a much faster process
- switching - again because these share the resources of there parent process switching between these in a program is realtively fast
what events would the real time schedulers within linux use
First-in First-Out (FIFO)
for
within a linux scheduer this scheduling method would be used for
events that can be handled rapidly since the process will run until it blocks for I/O or voluntarily yields control; it is never pre-empted.
(Open University, 2020)
within linux what type of processes would the
scheduler handling batch jobs
be dealing with
this scheduler within linux would be charged with scheduling background processes that are low priority, but may need longer time slices
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
in the context of scheduling what is a
quantum
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

describe
first-in first-out (FIFO) scheduling
give two
examples of how dynamic scheduling
can work
this could be but not linited to:
- A process that is involved in a lot of I/O may spend much of its time blocked because I/O devices work at a slower speed than a processor. In this case this process can have its priority lowered while it is blocked and raised when the I/O device is ready again.
- A low priority process can have its priority temporarily raised if it is making no progress
this is a process that requires no human interaction.
history
this got its name from the days of punch cards where a job would be a stack of cards and these jobs would be stacked on top of each other
the computer could then feed the jobs into itself
hence the name
what is a
batch process/batch job
what events would the real time schedulers within linux use
round robin
for
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.
describe the process of
round robin scheduling
this method of scheduling uses a queue and follows a first in first out approach.
however every process will get the same quantum slice so if a process requires more quantum than it was given it will be pre-emptied and will have to join the back of the queue

what is a drawback of
priority scheduling
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
displays a snapshot of processes owned by the current and any other users
what is the outcome of typing the linux
ps -a -x
command
what is a drawback of
first-in first-out (FIFO) scheudling
a drawback of this method of schedulig is that:
one process might require 4 quanta while another requires 1 quantum and so time is not fairly distributed
also this approach could make other processes seem glitchy or slow. especially those that are ‘real time’
within a linux scheduer this scheduling method would be used for
events that can be handled rapidly since the process will run until it blocks for I/O or voluntarily yields control; it is never pre-empted.
(Open University, 2020)
what events would the real time schedulers within linux use
First-in First-Out (FIFO)
for
this is one of the essential services that an operating system must provide and handle. Allowing more than one program to be used by the user without the need to close any programs
what is
multitasking
what is a
batch process/batch job
this is a process that requires no human interaction.
history
this got its name from the days of punch cards where a job would be a stack of cards and these jobs would be stacked on top of each other
the computer could then feed the jobs into itself
hence the name
this will display a snapshot of all processes owned by the user
what is the outcome of typing the linux
ps -x
command
what is the outcome of typing the linux
ps
command
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
idle scheduler
within linux
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
in what two ways could the user experience and/or performance be affected if
scheduling is not implemented correctly
if this is not implemented correctly then the user experience and/or performance may seem:
- slow - if a process is not chosen to use the processor for an extended time
- glitchy - in the case of real time operation such as playing music, again because the process has not been given access to the processor frequently enough
the execution process of this is:
where 1 CPU has many processes in its queue, however only one process can use the CPU at a time
so what the CPU does is provide a time slice for each process giving the illusion of multitasking
describe the execution process of
concurrent procsessing
in the context of scheduling this is the term used to describe a process being replaced by another process when its quantum expires
in the context of scheduling what is
pre-emptied
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
priority scheduling
these include but are not linited to:
- its own access to memory
- access to files
- access to I/O devices
name 3
resources that a process may be given
these include:
- First-in First-out (FIFO)
- round robin
- priority
- priority class
- dynamic
name 5
types of scheduling
This is an approach to scheduling that is able to change the priority of a process dynamically depending upon the current circumstances
describe
dynamic sheduling
this is an interactive way of viewing processes within the terminal offering a similar view and details that a task manager would offer
what is the linux
htop
command used for
describe
priority class scheduling
This is a method of scheduling that will place processes into a priority class
For example there could be a high priority class for interactive processes such as GUI elements and a low priority class for background processes where delay will go unnoticed
The scheduler will first take care of the high priority class allowing all the processes access to the processor in a round robin scheduling fashion until the priority class is empty it will then move to the next priority class and follow the same method

these scheduers within linux may use the following scheduling methods:
- First-in first-out (FIFO)
- round robin
- deadline
what are 3 scheduling methods that the
real time schedulers within linux
may use
describe the execution process of
concurrent procsessing
the execution process of this is:
where 1 CPU has many processes in its queue, however only one process can use the CPU at a time
so what the CPU does is provide a time slice for each process giving the illusion of multitasking
name 5
types of scheduling
these include:
- First-in First-out (FIFO)
- round robin
- priority
- priority class
- dynamic
within linux this type of user may adjust the priority of a process by altering the niceness with values
from -20 to 20
what values of niceness can a
root user
set for a process
displays a snapshot of processes owned by the current and any other users in a format and details similar to the task manager
what is the outcome of typing the linux
Ps -uax
command
what is the outcome of typing the linux
ps -a -x
command
displays a snapshot of processes owned by the current and any other users
describe
dynamic sheduling
This is an approach to scheduling that is able to change the priority of a process dynamically depending upon the current circumstances
This is a method of scheduling that will place processes into a priority class
For example there could be a high priority class for interactive processes such as GUI elements and a low priority class for background processes where delay will go unnoticed
The scheduler will first take care of the high priority class allowing all the processes access to the processor in a round robin scheduling fashion until the priority class is empty it will then move to the next priority class and follow the same method

describe
priority class scheduling
what is a drawback of
round robin scheduling
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
program
this is a list of instructions that are stored on a hard drive, a hard drive will have many of these
what is the
number range of scheduling priorities within linux
within linux this range is:
from -100 (highest) to 40 (lowest)
a drawback of this method of schedulig is that:
one process might require 4 quanta while another requires 1 quantum and so time is not fairly distributed
also this approach could make other processes seem glitchy or slow. especially those that are ‘real time’
what is a drawback of
first-in first-out (FIFO) scheudling