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
Q

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

A

within the linux scheduling system what

priority does a user mode process start with

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

NO

these are not allocated there own resources

instead they will share the resources of its parent process

A

are threads allocated there own resources

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

what is the linux

htop

command used for

A

this is an interactive way of viewing processes within the terminal offering a similar view and details that a task manager would offer

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

describe the

deadline scheduling method

that a real time scheduler in linux might use

A

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)

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

this is essentially a process belonging to a process

it runs a specific task within a program, a process may spawn many of these

A

what is a

thread

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

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

A

what initial priority values can the linux operating system set itself

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

this is a list of instructions that are stored on a hard drive, a hard drive will have many of these

A

what is a

program

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

describe the linux

completely fair scheduling

A

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

how do most linux distributions structure their schedulers

A

In linux most versions employ multiple schedulers with one dealing with real time processes and the other dealing with normal processes

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

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.

A

describe the feature

niceness

that exists within the linux scheduling system

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

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
A

what is a

process/task

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

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)

A

describe the

deadline scheduling method

that a real time scheduler in linux might use

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

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

A

describe the process of

round robin scheduling

38
Q

within the linux scheduling system what

priority does a user mode process start with

A

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
Q

in the context of scheduling what is

pre-emptied

A

in the context of scheduling this is the term used to describe a process being replaced by another process when its quantum expires

40
Q

what is

multitasking

A

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
Q

what values of niceness can a

normal 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

0 - 20

42
Q

what is the outcome of typing the linux

ps -x

command

A

this will display a snapshot of all processes owned by the user

43
Q

In linux most versions employ multiple schedulers with one dealing with real time processes and the other dealing with normal processes

A

how do most linux distributions structure their schedulers

44
Q

are threads allocated there own resources

A

NO

these are not allocated there own resources

instead they will share the resources of its parent process

45
Q

this scheduler within linux would be charged with scheduling background processes that are low priority, but may need longer time slices

A

within linux what type of processes would the

scheduler handling batch jobs

be dealing with

46
Q

how does an operating sytem handle processes and threads

A

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

47
Q

what initial priority values can the linux operating system set itself

A

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
Q

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
A

in what two ways could the user experience and/or performance be affected if

scheduling is not implemented correctly

49
Q

what is a

thread

A

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
Q

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

A

describe the system used by linux schedulers

51
Q

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
A

give two

examples of how dynamic scheduling

can work

52
Q

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
A

name 2 benefits of threads

53
Q

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

A

describe the execution process of

parallel processing

54
Q

name 2 benefits of threads

A

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
Q

what events would the real time schedulers within linux use

First-in First-Out (FIFO)

for

A

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
Q

within linux what type of processes would the

scheduler handling batch jobs

be dealing with

A

this scheduler within linux would be charged with scheduling background processes that are low priority, but may need longer time slices

57
Q

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

A

in the context of scheduling what is a

quantum

58
Q

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

A

describe

first-in first-out (FIFO) scheduling

59
Q

give two

examples of how dynamic scheduling

can work

A

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
Q

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

A

what is a

batch process/batch job

61
Q

what events would the real time schedulers within linux use

round robin

for

A

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
Q

describe the process of

round robin scheduling

A

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
Q

what is a drawback of

priority scheduling

A

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
Q

displays a snapshot of processes owned by the current and any other users

A

what is the outcome of typing the linux

ps -a -x

command

65
Q

what is a drawback of

first-in first-out (FIFO) scheudling

A

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
Q

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)

A

what events would the real time schedulers within linux use

First-in First-Out (FIFO)

for

67
Q

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

A

what is

multitasking

68
Q

what is a

batch process/batch job

A

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
Q

this will display a snapshot of all processes owned by the user

A

what is the outcome of typing the linux

ps -x

command

70
Q

what is the outcome of typing the linux

ps

command

A

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
Q

what is the

idle scheduler

within linux

A

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
Q

in what two ways could the user experience and/or performance be affected if

scheduling is not implemented correctly

A

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
Q

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

A

describe the execution process of

concurrent procsessing

74
Q

in the context of scheduling this is the term used to describe a process being replaced by another process when its quantum expires

A

in the context of scheduling what is

pre-emptied

75
Q

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

A

describe

priority scheduling

76
Q

these include but are not linited to:

  • its own access to memory
  • access to files
  • access to I/O devices
A

name 3

resources that a process may be given

77
Q

these include:

  1. First-in First-out (FIFO)
  2. round robin
  3. priority
  4. priority class
  5. dynamic
A

name 5

types of scheduling

78
Q

This is an approach to scheduling that is able to change the priority of a process dynamically depending upon the current circumstances

A

describe

dynamic sheduling

79
Q

this is an interactive way of viewing processes within the terminal offering a similar view and details that a task manager would offer

A

what is the linux

htop

command used for

80
Q

describe

priority class scheduling

A

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
Q

these scheduers within linux may use the following scheduling methods:

  1. First-in first-out (FIFO)
  2. round robin
  3. deadline
A

what are 3 scheduling methods that the

real time schedulers within linux

may use

82
Q

describe the execution process of

concurrent procsessing

A

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
Q

name 5

types of scheduling

A

these include:

  1. First-in First-out (FIFO)
  2. round robin
  3. priority
  4. priority class
  5. dynamic
84
Q

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

from -20 to 20

A

what values of niceness can a

root user

set for a process

85
Q

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

A

what is the outcome of typing the linux

Ps -uax

command

86
Q

what is the outcome of typing the linux

ps -a -x

command

A

displays a snapshot of processes owned by the current and any other users

87
Q

describe

dynamic sheduling

A

This is an approach to scheduling that is able to change the priority of a process dynamically depending upon the current circumstances

88
Q

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

A

describe

priority class scheduling

89
Q

what is a drawback of

round robin scheduling

A

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
Q

what is a

program

A

this is a list of instructions that are stored on a hard drive, a hard drive will have many of these

91
Q

what is the

number range of scheduling priorities within linux

A

within linux this range is:

from -100 (highest) to 40 (lowest)

92
Q

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’

A

what is a drawback of

first-in first-out (FIFO) scheudling