2,965 views
3 votes
3 votes

Which of the following are equal things when there is only one CPU in a system.

A) Multiprogramming and Multitasking

B) Multiprocessing and Multiprogramming

C) Multitasking and Multiprocessing

D) None of these

4 Answers

5 votes
5 votes

D. None of these


These are three different concepts, they cannot be equal.

 

In Multi-Programming a particular program is THE BOSS. Being boss means that the process is given the highest priority to occupy the CPU. It is the only one which claims the CPU until its completed. Although, some other process is granted the CPU for some time while the BOSS process works with I/O devices but not the CPU. This is done to get maximum CPU utilization. When the boss process returns after completing its I/O the running process is preempted and the boss process is again granted the CPU.

 

In Multi-Tasking there is no boss process, all processes are treated equal and are granted the CPU in a Round Robin fashion. This makes multi-tasking totally different from multi-programming.

 

Multi-Processing means the system works with multiple CPUs

 

In a sense, When we talk multi-processing we meant hardware only. But, when talking multi-programming or multi-tasking we mean software. This makes the def. of multi-processing totally different from multi-programming or multi-tasking. They cannot be equated.

 

On a multi-processing system we may have implemented multi-programming or multi-tasking its a choice. e.g. a single process at a time is using multiple CPUs to get work done faster; or single process at time is given multiple CPUs for some time then some other process is given all CPUs at once(in a round robin fashion).

4 votes
4 votes

In short:

Multiprogramming is number of processes that can be in ready queue at any given instance of time. Here they can be any number, depending on the capacity of ready queue.

Multiprocessing is the number of tasks going on simultaneously in different cores of cpu. Here number of cpu is one so at a time one task will be going on. Notice that I am using the term task rather than process or thread because task can be generalised to both without creating a confusion about its size. Linux uses the concept of tasks only, no processes or threads.

Multitasking is the number of tasks CPU seems to execute simultaneously. That means we can run web browser and songs simultaneously. They seem to run at same time but truth is at the backend, they are given CPU in time shared manner. Its just an illusion that they are running together. In this question's case, number of tasks can be any. Browser, songs, etc.

So answer is D.

3 votes
3 votes

Answer should be None of these.

Multiprocessing- Happens when hardware can provide multiple processing resource- like multiple CPUs, cores etc. It is a hardware feature.

Multi-programming- Happens, when the system has the capability to run multiple programs at the same time- when one waits for say IO, context switch happens and next one is executed. It is to be supported by software.

Muti-tasking- Similar to multi-programming but here unit is a task which is a smaller unit than a process- a thread of execution can be a task. 

So, in a single CPU system we can say multi-processing is absent (assuming no multi-cores). Also, multi-programming and multi-tasking don't make a difference if there is a single CPU or multiple. So, answer should be D- none of these. 

Ref: http://www.8bitavenue.com/2012/10/difference-between-multiprogramming-multitasking-multithreading-and-multiprocessing/

0 votes
0 votes
A. Multiprograming and Multitasking

In a multiprogramming system there are one or more programs loaded in main memory which are ready to execute. Only one program at a time is able to get the CPU for executing its instructions (i.e., there is at most one process running on the system) while all the others are waiting their turn.

Multiprocessing sometimes refers to executing multiple processes (programs) at the same time. Hence not possible.

Multitasking has the same meaning of multiprogramming but in a more general sense, as it refers to having multiple (programs, processes, tasks, threads) running at the same time. This term is used in modern operating systems when multiple tasks share a common processing resource (e.g., CPU and Memory). At any time the CPU is executing one task only while other tasks waiting their turn. The illusion of parallelism is achieved when the CPU is reassigned to another task (i.e., context switch).

Related questions

1 votes
1 votes
1 answer
1
Umang Raman asked Oct 15, 2015
1,672 views
Which one of the following is allowed only in kernel mode?A) Read the time of day clockB) Save the status of processC) change the PC content.D) non of these
1 votes
1 votes
1 answer
3
Kalpna Bhargav asked Mar 12, 2015
1,138 views
which one of the following process in UNIX operating system does not have a parent process ?(a) sh(b) dev(c) login (d) kernel
0 votes
0 votes
1 answer
4
tishhaagrawal asked Dec 5, 2023
309 views
Can anybody explain why are they dividing the number of pages by page size?According to me, it should be – Page table size = Number of entries * entry sizei.e PT size =...