Multi-Processing | Multi-Tasking | Multi-Programming Flashcards

1
Q

What is Multiprocessing?

A

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.

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

What is the difference between Symmetric Multiprocessing (SMP) and Asymmetric Multiprocessing (AMP)?

A

In SMP, all CPUs are equal and share the same memory. In AMP, CPUs have specific roles (e.g., one master CPU controls others).

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

What is the main challenge in Multiprocessing?

A

The main challenge is managing synchronization and communication between processes running on different CPUs/cores.

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

What is Multiprogramming?

A

Multiprogramming is a technique where multiple programs are loaded into memory at the same time, and the CPU switches between them to maximize utilization.

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

What is the main goal of Multiprogramming?

A

The main goal is to keep the CPU busy at all times by executing one program while others are waiting for I/O operations.

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

What is the difference between Multiprogramming and Multiprocessing?

A

Multiprogramming maximizes CPU utilization on a single CPU by switching between programs, while Multiprocessing uses multiple CPUs/cores for parallel execution.

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

What is the main disadvantage of Multiprogramming?

A

No pre-emption. higher priority tasks would have to wait for the task currently running.

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

What is Multitasking?

A

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.

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

What is the main advantage of Multitasking?

A

Responsiveness.

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

What is the difference between Preemptive and Non-Preemptive Multitasking?

A

In Preemptive Multitasking, the OS decides when to switch tasks. In Non-Preemptive Multitasking, tasks voluntarily yield control to other tasks.

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

What is the main challenge in Multitasking?

A

The main challenge is managing context switching and ensuring fair allocation of CPU time to all tasks.

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

What is the difference between Multitasking and Multiprocessing?

A

Multitasking uses a single CPU to execute multiple tasks concurrently, while Multiprocessing uses multiple CPUs/cores for true parallel execution.

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

What is the difference between Multitasking and Multiprogramming?

A

Multitasking allows user interaction and concurrent execution of tasks, while Multiprogramming focuses on maximizing CPU utilization without user interaction.

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

What is Time-Sharing in Multitasking?

A

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.

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

What is the main advantage of Time-Sharing?

A

The main advantage is that it allows multiple users to interact with the system simultaneously, improving responsiveness.

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

What is the main disadvantage of Time-Sharing?

A

The main disadvantage is the overhead of frequent context switching, which can reduce overall system performance.

17
Q

What is the relationship between Multiprogramming and Multitasking?

A

Multiprogramming is the foundation of Multitasking. While Multiprogramming focuses on CPU utilization, Multitasking extends it to support user interaction and concurrent task execution.

18
Q

What is the main use case of Multiprocessing?

A

The main use case is in systems requiring high performance and parallel execution, such as servers, supercomputers, and data centers.

19
Q

What is the main use case of Multiprogramming?

A

The main use case is in batch processing systems where programs run without user interaction, such as payroll or bank statement generation.

20
Q

What is the main use case of Multitasking?

A

The main use case is in modern operating systems like Windows, macOS, and Linux, where users can run multiple applications simultaneously.

21
Q

What is the difference between Parallelism and Concurrency in Multiprocessing?

A

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.

22
Q

What is the main disadvantage of Multiprocessing?

A

The main disadvantage is the increased cost and complexity of managing multiple CPUs/cores and ensuring proper synchronization.

23
Q

What is the main advantage of Multiprogramming over single-program systems?

A

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.

24
Q

What is the role of the OS in Multiprocessing?

A

The OS manages the allocation of processes to CPUs/cores, handles synchronization, and ensures efficient resource utilization.

25
Q

What is the role of the OS in Multiprogramming?

A

The OS manages the loading of multiple programs into memory, switches between them during I/O waits, and ensures efficient CPU utilization.

26
Q

What is the role of the OS in Multitasking?

A

The OS manages the allocation of CPU time to tasks, handles context switching, and ensures fair and responsive execution of multiple applications.

27
Q

What is the difference between Heavyweight and Lightweight Processes in Multiprocessing?

A

Heavyweight Processes have their own memory space and resources, while Lightweight Processes (Threads) share memory and resources within a single process.

28
Q

What is the main challenge in implementing Multiprogramming?

A

The main challenge is managing memory allocation and ensuring that multiple programs can coexist in memory without interfering with each other.