1/40
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What is a process in computing?
An active instance of a program in execution.
What does a process include?
Its state, data, and interactions.
Is a process just the code of the program?
No, it is not just the code of the program.
Multiprogramming
Running multiple processes by rapidly switching the CPU between them.
Multiprocessing
Using multiple CPUs or CPU cores to run code simultaneously.
Multithreading
Running different parts of the same process concurrently on multiple CPUs.
Multitasking
A general term encompassing multiprogramming, multiprocessing, and multithreading.
Operating System (OS) Tasks
Managing processes, allocating resources, preventing deadlocks, supporting interprocess communication, and allowing users to create new processes.
What triggers process creation?
System initialization, execution of a process creation system call, a user request, or the initiation of a batch job.
What function is used to create a child process?
The fork() function.
What is process suspension?
It occurs when a process waits for I/O, data, or a signal from another process.
What can cause a process to suspend voluntarily?
A process can voluntarily pause itself.
What can cause a process to be forced to suspend?
A process can be forced to pause by the operating system.
Process Termination
Caused by normal exit, error exit, fatal errors, operator intervention, parent process request, or timeout.
Running for a process
The process is actively using the CPU.
Ready for a process
The process is runnable but currently stopped to allow another process to run.
Blocked for a process is
The process is unable to run until an external event occurs.
New for a process
The process has just been created but is not yet in the 'ready' pool.
Exit for a process
The process has been completed.
Process Control Block (PCB)
A data structure containing process ID, state, control, resource ownership, memory management, and accounting information.
Interrupts
Events that cause a change in the normal flow of a process's execution, often triggered by external devices needing CPU access.
What is a context switch?
The process of saving the current process's context when an interrupt occurs.
What happens during a context switch?
The CPU registers of the current process are saved.
What is executed after a context switch?
An interrupt handler.
What may occur after executing an interrupt handler?
Switching to a new process.
Threads
A stream of execution within a process, considered a lightweight process, that can share process memory and resources.
Thread Pooling
A set number of threads are created based on CPU cores, and tasks are assigned to run on available threads.
Inter-Process Communication (IPC)
Techniques for processes to communicate, exchange data, resolve resource conflicts, and manage dependencies.
What is process scheduling?
The OS decides which process will run next.
What are the two methods of process scheduling?
Pre-emptive scheduling via timer interrupts and cooperative scheduling when a process yields.
When is scheduling required in process management?
Scheduling is required on process exit or when a process blocks on I/O.
First-Come First-Served (FCFS)
Processes are added to a queue in the order they arrive. The process at the head of the queue runs until it blocks. The blocked process then joins the tail of the queue when ready.
Shortest Job First (SJF)
Processes are ordered by their run-time duration. The process with the shortest run time is executed first.
Round Robin (RR)
Each process is allocated a time slice (quantum). After its quantum, the process moves to the end of the queue.
An advantage and disadvantage of FCFS
FCFS is simple, but can lead to longer waiting and processing times for some processes.
What does SJF stand for in scheduling algorithms?
Shortest Job First
What is a key benefit of using SJF scheduling?
It minimizes wait time.
What is a potential drawback of SJF scheduling?
Long-running processes may 'starve'.
What does SJF require to function effectively?
It requires predicting the future duration of jobs.
benefit of RR
RR ensures fairness by equally distributing processing time.
Priority Scheduling benefit and drawback
Useful when priority is required but may cause low priority processes to starve.