The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+3 votes
680 views

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

asked in Operating System by Loyal (6.2k points) | 680 views

4 Answers

+3 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.

answered by Active (4.1k points)
+3 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).

answered by Boss (30.8k points)
+2 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/

answered by Veteran (363k points)
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).
answered by Active (3.5k points)
0
On a single CPU system, how they become same?
+1
In case of multitasking, by Scheduling and context switching even single CPU  in a system, can achieve parallelism but multiprocessing can't.  In that sense, can't we comment multiprogramming and multitasking  are same?
0
ya. thats right. so it should be None of these.
+1
0
Multiprogramming :one CPU,  multiple programs are in ready queue but cpu will run only one process at a time. This is non-preemptive way of executing the process.

 

Multitasking- time-shared+multiprogramming, one CPU

It is preemptive version of multiprogramming, context switch takes place very fastly which creates illusion that cpu is doing multiple task at same time but onle one task is done at a time in back-end.

 

Multiprocessing: There are multiple core of CPU, it is totally related to Hardware part so not related to multiprogramming and multitasking

Related questions

+1 vote
1 answer
1
+1 vote
1 answer
7


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

42,700 questions
48,662 answers
156,613 comments
63,971 users