Week 3: Processes (Model trafficing schedulling) Flashcards
Why do modern computers appear to perform multiple tasks simultaneously?
The processor switches between programs multiple times per second, giving the illusion of multitasking.
What is the role of the operating system in multi-programming?
To keep track of running programs and manage the switching between them.
How must processes be executed?
They must execute sequentially even though they may be interrupted so other processes can run.
What is a process tree?
It’s a hierarchy where parent processes create child processes, which in turn can create their own child processes.
What are the three resource-sharing options during process creation?
- Parent and children share all resources
- Children share a subset of the parent’s resources
- Parent and child share no resource
What are the two resource-sharing execution options during process creation?
- Parent and children execute concurrently
- Parent waits until children terminate
What are the two resource-sharing program options during process creation?
- The child is a duplicate of the parent
- The child has a program loaded into it
What occurs during normal process termination?
The process executes its final instruction, exits, ensures output data is written, and deallocates its resources.
Under what circumstances might a parent process terminate a child process?
If the child exceeds a resource limit, becomes stuck, or if the parent process itself is terminated.
What are the five states of a process?
- New
- Ready
- Running
- Blocked (Waiting)
- Terminated.
What does it mean when a process is “Blocked”?
The process is waiting for an event to occur.
What typical information does the operating system hold about a process?
- Process management information: process state, program counter, processor registers, time process started,
process ID, parent ID - Memory management information: code location and size, data location and size, stack
- I/O management information: files open and modes, I/O devices in use, current directory
Why is process information necessary?
To allow the operating system to resume a process in the correct state after an interruption.
What is the purpose of process tables in an operating system?
To store information about each process, enabling management and state tracking.
What happens to a process’s table entry when it is interrupted?
The operating system updates the process’s state and any related information.