Topic 9 – Processes and scheduling Flashcards

1
Q

what is a

process/task

A

this is a program that has been

  1. fetched from the hard drive and stored in memory
  2. has been allocated resources
  3. and is being executed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

describe

priority scheduling

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

describe the feature

niceness

that exists within the linux scheduling system

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

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

A

what is the outcome of typing the linux

ps

command

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

describe

first-in first-out (FIFO) scheduling

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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

A

what is a drawback of

round robin scheduling

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what is

scheduling

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

describe the system used by linux schedulers

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

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.

A

what events would the real time schedulers within linux use

round robin

for

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

within linux this type of user may adjust the priority of a process by altering the niceness with values from

0 - 20

A

what values of niceness can a

normal user

set for a process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

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

A

what is the

idle scheduler

within linux

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

in the context of scheduling what is a

quantum

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

describe the execution process of

parallel processing

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

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

A

what is

scheduling

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

what values of niceness can a

root user

set for a process

A

within linux this type of user may adjust the priority of a process by altering the niceness with values

from -20 to 20

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

name 3

resources that a process may be given

A

these include but are not linited to:

  • its own access to memory
  • access to files
  • access to I/O devices
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

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

A

what is a drawback of

priority scheduling

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

what are 3 scheduling methods that the

real time schedulers within linux

may use

A

these scheduers within linux may use the following scheduling methods:

  1. First-in first-out (FIFO)
  2. round robin
  3. deadline
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

what 3

normal schedulers

does linux use

A

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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

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

A

describe the linux

completely fair scheduling

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

these are handled by the operating system in essentially the same manner

A

how does an operating sytem handle processes and threads

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

what is the outcome of typing the linux

Ps -uax

command

A

displays a snapshot of processes owned by the current and any other users in a format and details similar to the task manager

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

within linux this range is:

from -100 (highest) to 40 (lowest)

A

what is the

number range of scheduling priorities within linux

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

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
A

what 3

normal schedulers

does linux use

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
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 ## Footnote **priority does a user mode process start with**
26
NO these are not allocated there own resources instead they will share the resources of its parent process
are threads allocated there own resources
27
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
28
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)
29
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 ## Footnote **thread**
30
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
31
this is a list of instructions that are stored on a hard drive, a hard drive will have many of these
what is a ## Footnote **program**
32
describe the linux ## Footnote **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
33
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
34
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
35
this is a program that has been 1. fetched from the hard drive and stored in memory 2. has been allocated resources 3. and is being executed
what is a ## Footnote **process/task**
36
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
37
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 ## Footnote **round robin scheduling**
38
within the linux scheduling system what ## Footnote **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
39
in the context of scheduling what is ## Footnote **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
40
what is ## Footnote **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
41
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
42
what is the outcome of typing the linux **ps -x** command
this will display a snapshot of all processes owned by the user
43
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
44
are threads allocated there own resources
NO these are not allocated there own resources instead they will share the resources of its parent process
45
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
46
how does an operating sytem handle processes and threads
these are handled by the operating system in essentially the same manner
47
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
48
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 ## Footnote **scheduling is not implemented correctly**
49
what is a ## Footnote **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
50
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
51
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
52
the benefits of these are: 1. **quick creation** - because these share the resources of there parent creating these is a much faster process 2. **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
53
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 ## Footnote **parallel processing**
54
name 2 benefits of threads
the benefits of these are: 1. **quick creation** - because these share the resources of there parent creating these is a much faster process 2. **switching** - again because these share the resources of there parent process switching between these in a program is realtively fast
55
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)
56
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
57
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 ## Footnote **quantum**
58
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**
59
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
60
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 ## Footnote **batch process/batch job**
61
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.
62
describe the process of ## Footnote **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
63
what is a drawback of ## Footnote **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
64
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
65
what is a drawback of ## Footnote **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'
66
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
67
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 ## Footnote **multitasking**
68
what is a ## Footnote **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
69
this will display a snapshot of all processes owned by the user
what is the outcome of typing the linux **ps -x** command
70
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
71
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
72
in what two ways could the user experience and/or performance be affected if ## Footnote **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
73
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 ## Footnote **concurrent procsessing**
74
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 ## Footnote **pre-emptied**
75
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 ## Footnote **priority scheduling**
76
these include but are not linited to: * its own access to memory * access to files * access to I/O devices
name 3 ## Footnote **resources that a process may be given**
77
these include: 1. First-in First-out (FIFO) 2. round robin 3. priority 4. priority class 5. dynamic
name 5 ## Footnote **types of scheduling**
78
This is an approach to scheduling that is able to change the priority of a process dynamically depending upon the current circumstances
describe ## Footnote **dynamic sheduling**
79
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
80
describe ## Footnote **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
81
these scheduers within linux may use the following scheduling methods: 1. First-in first-out (FIFO) 2. round robin 3. deadline
what are 3 scheduling methods that the **real time schedulers within linux** may use
82
describe the execution process of ## Footnote **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
83
name 5 ## Footnote **types of scheduling**
these include: 1. First-in First-out (FIFO) 2. round robin 3. priority 4. priority class 5. dynamic
84
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
85
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
86
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
87
describe ## Footnote **dynamic sheduling**
This is an approach to scheduling that is able to change the priority of a process dynamically depending upon the current circumstances
88
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 ## Footnote **priority class scheduling**
89
what is a drawback of ## Footnote **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
90
what is a ## Footnote **program**
this is a list of instructions that are stored on a hard drive, a hard drive will have many of these
91
what is the ## Footnote **number range of scheduling priorities within linux**
within linux this range is: from -100 (highest) to 40 (lowest)
92
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 ## Footnote **first-in first-out (FIFO) scheudling**