Unit 6 : CPU Scheduling Flashcards
What is a process? ( 2 )
- A program in execution which progresses in a sequential manner
- It is a unit of work with a unique process identification
What does process require?
- Requires resources like memory, CPU time and files to complete the task
When are resources allocated?
- When a process is created or while in execution
Who creates and deletes user and system processes?
- Operating System
What is the state for process and program ( active / passive ) ?
- Process
- Active
- Program in Execution
- Program
- Passive
- Unused when the files isn’t loaded into memory
How does operating system keeps track of processes ?
- Uses Process Table
- Task Manager
- Activity Monitor
List out the steps for process state diagram and the term used ( Graph )
- New - ( admitted ) -> Ready
- Ready - ( Scheduler Dispatcher ) -> Running
Running - ( Interrupt / Time Out ) -> Ready - Running - ( I/O or Event wait ) -> Blocked
- Blocked - ( I/O or Event Completion ) -> Ready
- Running - ( Exit ) -> Terminated
What will be changing when a program executes?
- States
What is the new stated in Process State Diagram?
- A process has just been created
What are the reasons for process creation?
- New batch job
- Interactive Logon
What will happen when the task is created?
- It will changes from New to Ready processing state
What is the ready state in ProcessState Diagram?
- The process is waiting to be assigned to a processor
What is the Ready -> Running State in Process State Diagram
- Instructions are being executed
What is the state that the process is using the CPU?
- Ready -> Running
What are the factors for the number or running processes
- Depend on the number of processors the computer has
What can the running process possibly become ? ( 3 )
- Blocked
- Ready
- Terminated
Why doies the Running process become Blocked ? ( 2 )
- The process itself cannot execute because it is waiting for an I/O operation to complete
- Waiting for some external event to happen
When will Running process moves to the Ready state? ( 3 )
- A process has reached its maximum allowable time for uninterrupted execution
- A process needs a resource that is not immediately available
- A process needs an I/O operation before continuation
What is the term when Blocked state moves to the Ready state?
- When the event which the process was waiting for occurs
When the Running state process moves into the Terminated state?
- The process has completed
- The process has been aborted
What are the reasons for process termination?
- Normal Completion
- Invalid Instruction
- Memory Unavailable
What will returned to the operating system upon termination?
- Control
What is each process presented as in the Operating System?
- Process Control Block
What does Process Control Block do? ( 3 )
- Keeps track of each process
- Contains information associated with a specific process
- Serves as a repository of any information that may vary from process to process
List out all the components from Process Control Block diagram ( 9 )
- Pointer to Parent Process
- Pointer Area to Child Process
- Process State
- Program Counter
- Register Save Area
- Memory Limits
- Priority Information
- Accounting Information
- Pointer to Files and Other I/O Resources
What process state indicates?
- The process state ( ready , running , blocked , terminated )
What does program counter indicates
- The location for the nest instruction
What does CPU scheduling information indicates?
- Process priority, pointers to scheduling queues
What does Accounting Information indicates ?
- Statistics on CPU time, job and process numbers
What does I/O status indicates?
- List of I/O devices which are allocated to processes
What are the processes put on when a processes enter the system?
- Job Queue
What are the processes put on when there is a new process?
- Ready Queue
What will the process do when in process scheduling? ( 2 )
1.Waits until selected for execution ( dispatched )
2. Give CPU resources
What will happen when the CPU is allocated and the process is running? ( 3 )
- The process could issue an I/O request and be placed on a device queue
- The process could create a new sub-process
- The process could be forcibility removed
Simply list out the Process Scheduling Diagram possibilities ( 5 )
- Ready Queue -> CPU -> Finish
- Ready Queue -> CPU -> I/O Request -> I/O Queue -> I/O -> Ready Queue -> CPU -> Finish
- Ready Queue -> CPU -> Time Slice expired -> Ready Queue -> CPU -> Finish
- Ready Queue -> CPU -> Fork a Child -> Child Execute -> Child Terminates -> Ready Queue -> CPU -> Finish
- 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
What can concurrent process do?
- Concurrent process can be independent or cooperating processes