Unit 6 : CPU Scheduling Flashcards

1
Q

What is a process? ( 2 )

A
  1. A program in execution which progresses in a sequential manner
  2. It is a unit of work with a unique process identification
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does process require?

A
  1. Requires resources like memory, CPU time and files to complete the task
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

When are resources allocated?

A
  1. When a process is created or while in execution
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Who creates and deletes user and system processes?

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

What is the state for process and program ( active / passive ) ?

A
  1. Process
    • Active
    • Program in Execution
  2. Program
    • Passive
    • Unused when the files isn’t loaded into memory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How does operating system keeps track of processes ?

A
  1. Uses Process Table
    • Task Manager
    • Activity Monitor
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

List out the steps for process state diagram and the term used ( Graph )

A
  1. New - ( admitted ) -> Ready
  2. Ready - ( Scheduler Dispatcher ) -> Running
    Running - ( Interrupt / Time Out ) -> Ready
  3. Running - ( I/O or Event wait ) -> Blocked
  4. Blocked - ( I/O or Event Completion ) -> Ready
  5. Running - ( Exit ) -> Terminated
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What will be changing when a program executes?

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

What is the new stated in Process State Diagram?

A
  1. A process has just been created
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the reasons for process creation?

A
  1. New batch job
  2. Interactive Logon
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What will happen when the task is created?

A
  1. It will changes from New to Ready processing state
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the ready state in ProcessState Diagram?

A
  1. The process is waiting to be assigned to a processor
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the Ready -> Running State in Process State Diagram

A
  1. Instructions are being executed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the state that the process is using the CPU?

A
  1. Ready -> Running
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the factors for the number or running processes

A
  1. Depend on the number of processors the computer has
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What can the running process possibly become ? ( 3 )

A
  1. Blocked
  2. Ready
  3. Terminated
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Why doies the Running process become Blocked ? ( 2 )

A
  1. The process itself cannot execute because it is waiting for an I/O operation to complete
  2. Waiting for some external event to happen
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

When will Running process moves to the Ready state? ( 3 )

A
  1. A process has reached its maximum allowable time for uninterrupted execution
  2. A process needs a resource that is not immediately available
  3. A process needs an I/O operation before continuation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is the term when Blocked state moves to the Ready state?

A
  1. When the event which the process was waiting for occurs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

When the Running state process moves into the Terminated state?

A
  1. The process has completed
  2. The process has been aborted
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What are the reasons for process termination?

A
  1. Normal Completion
  2. Invalid Instruction
  3. Memory Unavailable
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What will returned to the operating system upon termination?

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

What is each process presented as in the Operating System?

A
  1. Process Control Block
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What does Process Control Block do? ( 3 )

A
  1. Keeps track of each process
  2. Contains information associated with a specific process
  3. Serves as a repository of any information that may vary from process to process
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

List out all the components from Process Control Block diagram ( 9 )

A
  1. Pointer to Parent Process
  2. Pointer Area to Child Process
  3. Process State
  4. Program Counter
  5. Register Save Area
  6. Memory Limits
  7. Priority Information
  8. Accounting Information
  9. Pointer to Files and Other I/O Resources
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

What process state indicates?

A
  1. The process state ( ready , running , blocked , terminated )
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

What does program counter indicates

A
  1. The location for the nest instruction
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

What does CPU scheduling information indicates?

A
  1. Process priority, pointers to scheduling queues
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

What does Accounting Information indicates ?

A
  1. Statistics on CPU time, job and process numbers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

What does I/O status indicates?

A
  1. List of I/O devices which are allocated to processes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

What are the processes put on when a processes enter the system?

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

What are the processes put on when there is a new process?

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

What will the process do when in process scheduling? ( 2 )

A

1.Waits until selected for execution ( dispatched )
2. Give CPU resources

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

What will happen when the CPU is allocated and the process is running? ( 3 )

A
  1. The process could issue an I/O request and be placed on a device queue
  2. The process could create a new sub-process
  3. The process could be forcibility removed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

Simply list out the Process Scheduling Diagram possibilities ( 5 )

A
  1. Ready Queue -> CPU -> Finish
  2. Ready Queue -> CPU -> I/O Request -> I/O Queue -> I/O -> Ready Queue -> CPU -> Finish
  3. Ready Queue -> CPU -> Time Slice expired -> Ready Queue -> CPU -> Finish
  4. Ready Queue -> CPU -> Fork a Child -> Child Execute -> Child Terminates -> Ready Queue -> CPU -> Finish
  5. Ready Queue -> CPU -> Wait for an Interrupt -> Interrupt Occurs -> Ready Queue -> CPU -> Finish
  • Wait for an Interrupt means that wait for the interruption to finished
  • Child process is like forgetting password when logging in websites
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

What can concurrent process do?

A
  1. Concurrent process can be independent or cooperating processes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

What is Indepedent Processes?

A
  1. Processes that do not need to interact with other processes
37
Q

What is Cooperating Processes

A
  1. Processes that work with each other, can affect or be affected by another process
38
Q

Why OS allow for cooperating processes?

A
  1. Information sharing and to allow to resources using the PCB
  2. Increase computation speed
39
Q

What is Thread?

A
  1. A mini lightweight process that can execute independently of other parts of the process
40
Q

List out the 2 types of thread

A
  1. User Processes
  2. System Processes
41
Q

What an action is called when a creation of new process ( child ) from the older one ( parent ) ? ( 2 )

A
  1. Spawning
  2. Forking
42
Q

What does a CPU scheduler is tasked in?

A
  1. With choosing which process to run first form the ready queue
43
Q

What algorithm is used to choose the next process?

A
  1. Scheduling Algorithm
44
Q

What is a fundamental function of an operating system?

A
  1. Scheduling
45
Q

What the scheduling do to ensure what component is not idle?

A
  1. CPU
46
Q

List out the aims of scheduling

A
  1. Fairness
  2. Efficiency
  3. Response Time
  4. Turnaround Time
  5. Throughput
47
Q

What does fairness avoids?

A
  1. Starvation
48
Q

What does fairness ( Aims of Scheduling ) do to CPU?

A
  1. Make sure all processes get a fair share of the CPU time
49
Q

What does efficiency ( Aims of Scheduling ) do to CPU?

A
  1. Maximise CPU utilisation and keep the CPU busy close to 100% of the time
50
Q

What are the types for response time? ( 2 )

A
  1. Consistent response time
  2. Minimise response time
51
Q

What does turnaround time ( Aims of Scheduling ) do to CPU? ( 2 )

A
  1. Minimise time between submission and job completion
  2. Minimise output time
52
Q

What does throughput time ( Aims of Scheduling ) do to CPU? ( 2 )

A
  1. Maximise number of job completed within a given time period
53
Q

What does preemptive scheduling does to CPU? ( 2 )

A
  1. Allows for running processes to be temporarily suspended
  2. Processes releases CPU upon receiving a command
54
Q

List out the Preemptive Scheduling Algorithms ( 3 )

A
  1. Round Robin
  2. Multilevel Queue
  3. Multilevel Feedback Queue
55
Q

What does Non-preemptive scheduling does to CPU?

A
  1. Processes release the CPU only after completion
  2. Processes releases CPU voluntarily
56
Q

What is the difference between Preemptive scheduling and Non-Preemptive Scheduling?

A
  1. Preemptive Scheduling
    • Running processes will be temporarily suspended
    • Releases CPU when receiving a command
  2. Non-Preemptive Scheduling
    • Process release the CPU only after completion
    • Processes releases CPU voluntarily
57
Q

List out Non-preemptive scheduling algorithms ( 3 )

A
  1. First Come First Serve ( FCFS ) of First In First Out ( FIFO )
  2. Shortest Job First ( SJF )
  3. Priority
58
Q

List out the calculation keywords for calculating for preemptive or non-preemptive scheduling ( 6 )

A
  1. CPU Utilisation
  2. Throughput
  3. Burst Time
  4. Resonse Time
  5. Turnaround Time ( Waiting Time + Burst Time )
    • Average Turnaround Time
  6. Average Waiting Time
    • Average Waiting Time ( Response Time / Number of Processes )
59
Q

What is the oldest, simplest, fairest and most widely used preemptive scheduling?

A
  1. Round Robin
60
Q

What should we do first when implementing round robin?

A
  1. The ready queue is kept as a first in first out queue
60
Q

What system is round robin is designed for?

A
  1. Time-sharing system
61
Q

What is defined for each process ? ( Round Robin )

A
  1. Time quantum/Time slice
62
Q

What does the ready queue is treated as in Round Robin?

A
  1. Circular Queue
63
Q

What is the characteristics of round robin?

A
  1. Average waiting time is usually long
  2. Performance depends on the size of the time quantum ( time slice - 10 to 100 ms )
  3. Process switch requires time, while the time quantum clock is already running
64
Q

What will happen when Time Quantum ( Time Slice ) is set too long or too short?

A
  1. Time quantum ( Time slice ) which is set too short would result in too many process switches and this reduces CPU efficiency
  2. Time quantum which is too long would cause poor response to short interactive request
65
Q

What does the ready queue is seprate into in Multilevel Queue?

A
  1. Several separate queues
66
Q

What does multilevel queue classifies processes into ?

A
  1. Different groups
67
Q

Each process is permanently assigned to one queue based on what?

A
  1. Priority
  2. Size
  3. Process Tyoe
68
Q

Each queue ( multilevel queue ) would have its own what?

A
  1. Scheduling algorithm
69
Q

What does the time slices can be allocated in multilevel queue?

A
  1. Queues
70
Q

Give an example for highest priority til lowest priority in multilevel queue

A
  1. System Processes
  2. Interactive Processes
  3. Interactive Editing Processes
  4. Batch Processes
  5. Student Processes
71
Q

What factor does processes are separated by in multilevel feedback queue?

A
  1. CPU burst time
  • Processes are allowed to move between queues in multilevel feedback queue
72
Q

What will happen if a process utilises too much CPU time ?

A
  1. CPU time will be moved to a lower priority queue
73
Q

What will happen if a process is starved of CPU time ?

A
  1. CPU time will be moved to a higher level priority queue
74
Q

What is the simplest CPU scheduling algorithm?

A
  1. First In First Out ( FIFO )
  • The process that request the first program is allocated to the CPU first
75
Q

What easily managed the implementation of the FIFO policy?

A
  1. FIFO queue
76
Q

What is the disadvantages for FIFO?

A
  1. Average waiting time for FIFO is quite long
  2. Once the CPU has been allocated the process, the process keeps the CPU until termination or by requesting for I/O
77
Q

What process is done in scheduling in shortest job first ?

A
  1. By examining the length of the next CPU burst time
  • If the CPU is free, the next process with the smallest next CPU burst is assigned
  • If two processes have the same CPU burst, FIFO is used to break the tie
78
Q

What is the advantage of shortest job first?

A
  1. It is optimal by providing the minimum average waiting time
79
Q

What is the disadvantage of shortest job first?

A
  1. Determine the length of the next process
80
Q

How does CPU is allocated in Priority?

A
  1. The job with highest priority
81
Q

What will be implemented when there is equal priority processes

A
  1. Scheduled using FIFO
82
Q

Can priority be preemptive or non-preemptive?

A
  1. Yes
83
Q

What is the disadvantages of priority?

A
  1. Starvation
84
Q

What is a technique to gradually increase a processes priority?

A
  1. Aging
85
Q

What does process control blocks represents in the OS?

A
  1. Represents a process
86
Q

What is a basic unit of CPU utilisation?

A
  1. Thread
87
Q

What are the aims for scheduling algorithms?

A
  1. Aim to achieve fairness, efficiency
  2. Maximising throughput
  3. Masimising turnaround time
88
Q

What does CPU scheduling is used for?

A
  1. Is used to select a process from the ready queue and allocate this process CPU time
89
Q

What scheduling algorithm has a shorter average waiting time?

A
  1. Shortest Job First
90
Q

What are the result and solving methods for priority scheduling?

A
  1. Starvation
  2. Aging is a method used to overcome this