Multi-Processing | Multi-Tasking | Multi-Programming Flashcards
What is Multiprocessing?
Multiprocessing refers to the use of multiple CPUs or cores within a single computer system to execute multiple processes simultaneously. It enables true parallel execution.
What is the difference between Symmetric Multiprocessing (SMP) and Asymmetric Multiprocessing (AMP)?
In SMP, all CPUs are equal and share the same memory. In AMP, CPUs have specific roles (e.g., one master CPU controls others).
What is the main challenge in Multiprocessing?
The main challenge is managing synchronization and communication between processes running on different CPUs/cores.
What is Multiprogramming?
Multiprogramming is a technique where multiple programs are loaded into memory at the same time, and the CPU switches between them to maximize utilization.
What is the main goal of Multiprogramming?
The main goal is to keep the CPU busy at all times by executing one program while others are waiting for I/O operations.
What is the difference between Multiprogramming and Multiprocessing?
Multiprogramming maximizes CPU utilization on a single CPU by switching between programs, while Multiprocessing uses multiple CPUs/cores for parallel execution.
What is the main disadvantage of Multiprogramming?
No pre-emption. higher priority tasks would have to wait for the task currently running.
What is Multitasking?
A task is picked from the ready queue and put to running state for a particular time quantum. As soon as the time gets over, the task is put back into ready queue and another task is processed.
What is the main advantage of Multitasking?
Responsiveness.
What is the difference between Preemptive and Non-Preemptive Multitasking?
In Preemptive Multitasking, the OS decides when to switch tasks. In Non-Preemptive Multitasking, tasks voluntarily yield control to other tasks.
What is the main challenge in Multitasking?
The main challenge is managing context switching and ensuring fair allocation of CPU time to all tasks.
What is the difference between Multitasking and Multiprocessing?
Multitasking uses a single CPU to execute multiple tasks concurrently, while Multiprocessing uses multiple CPUs/cores for true parallel execution.
What is the difference between Multitasking and Multiprogramming?
Multitasking allows user interaction and concurrent execution of tasks, while Multiprogramming focuses on maximizing CPU utilization without user interaction.
What is Time-Sharing in Multitasking?
Time-Sharing is a technique where the CPU allocates a small time slice (quantum) to each task, rapidly switching between them to create the illusion of parallel execution.
What is the main advantage of Time-Sharing?
The main advantage is that it allows multiple users to interact with the system simultaneously, improving responsiveness.
What is the main disadvantage of Time-Sharing?
The main disadvantage is the overhead of frequent context switching, which can reduce overall system performance.
What is the relationship between Multiprogramming and Multitasking?
Multiprogramming is the foundation of Multitasking. While Multiprogramming focuses on CPU utilization, Multitasking extends it to support user interaction and concurrent task execution.
What is the main use case of Multiprocessing?
The main use case is in systems requiring high performance and parallel execution, such as servers, supercomputers, and data centers.
What is the main use case of Multiprogramming?
The main use case is in batch processing systems where programs run without user interaction, such as payroll or bank statement generation.
What is the main use case of Multitasking?
The main use case is in modern operating systems like Windows, macOS, and Linux, where users can run multiple applications simultaneously.
What is the difference between Parallelism and Concurrency in Multiprocessing?
Parallelism involves executing multiple tasks simultaneously using multiple CPUs/cores, while Concurrency involves managing multiple tasks at the same time, but not necessarily executing them simultaneously.
What is the main disadvantage of Multiprocessing?
The main disadvantage is the increased cost and complexity of managing multiple CPUs/cores and ensuring proper synchronization.
What is the main advantage of Multiprogramming over single-program systems?
The main advantage is better CPU utilization, as the CPU is kept busy by switching between programs instead of sitting idle during I/O operations.
What is the role of the OS in Multiprocessing?
The OS manages the allocation of processes to CPUs/cores, handles synchronization, and ensures efficient resource utilization.
What is the role of the OS in Multiprogramming?
The OS manages the loading of multiple programs into memory, switches between them during I/O waits, and ensures efficient CPU utilization.
What is the role of the OS in Multitasking?
The OS manages the allocation of CPU time to tasks, handles context switching, and ensures fair and responsive execution of multiple applications.
What is the difference between Heavyweight and Lightweight Processes in Multiprocessing?
Heavyweight Processes have their own memory space and resources, while Lightweight Processes (Threads) share memory and resources within a single process.
What is the main challenge in implementing Multiprogramming?
The main challenge is managing memory allocation and ensuring that multiple programs can coexist in memory without interfering with each other.