Category: 

What is Multiprogramming?

One of the benefits of multiprogramming is that the user will notice minimal to no lag time when moving from one application to another.
Memory is very important for multiprogramming.
Article Details
  • Written By: Malcolm Tatum
  • Edited By: Bronwyn Harris
  • Last Modified Date: 01 April 2014
  • Copyright Protected:
    2003-2014
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
Artists tend to grow up in wealthier households than doctors.  more...

April 24 ,  2005 :  The world's first cloned dog was born.  more...

Multiprogramming is one of the more basic types of parallel processing that can be employed in many different environments. Essentially, it makes it possible for several programs to be active at the same time, while still running through a single processor. Its functionality in this environment involves a continual process of sequentially accomplishing tasks associated with the function of one program, then moving on to run a task associated with the next program.

This type of processing is very different from the multiprocessing because, even though there may be several programs currently active, the uniprocessor is not simultaneously executing commands for all the programs. Instead, the processor addresses each program, executes a single command, then moves on to the next program in the queue. The previous program remains active, but enters into a passive state until the uniprocessor returns to the front of the queue and executes a second command.

From an end user standpoint, the process is seamless. As far as actual functionality, the user appears to be using several different applications at the same time. This is because multiprogramming utilizes the uniprocessor to execute commands quickly. The end result is that a user notices little if any lag time when minimizing one application in order to perform a task associated with a different application.

Ad

The mechanism within multiprogramming is known as an interrupt. Each task is granted a specific amount of time for processing before the operating systems will move on to the next program and the next task. In a sense, this method is about juggling several tasks at one time, quickly performing one piece of the required action, then moving to do something with a different task before returning to the former job.

Memory is important for this form of processing to function correctly. There needs to be enough capacity to ensure that, if one program within the rotating queue encounters a problem, it does not prevent delays or impact the operation of other open applications. At the same time, some type of memory protection should be in place. If this is not the case, then a problem with one application can create a cascading effect that shuts down or at least slows down the other open applications.

Ad

Discuss this Article

allenJo
Post 4

@Mammmood - My understanding is that a multiprogramming system involves loading more than one program in memory at once on a single CPU. Multiprocessing, on the other hand, means that you have multiple processors to run those different tasks. Nowadays, with quad processors you may see more of multiprocessing in addition to multiprogramming.

Mammmood
Post 3

@allenJo - That’s a good illustration. So what is the difference between multiprogramming vs multiprocessing?

allenJo
Post 2

This is a good multiprogramming definition. The important point is to realize that multiprogramming is an illusion. What the computer does is create a “thread” for each process. It takes turns switching between threads, and it does it so fast that to the end user, it appears to be happening all at once.

I’ve written software code to demonstrate this process using loops. The computer will start counting from 1 to 100 in 3 different threads. It may get to number 50 in the first thread, and then start counting from 1 in the next thread until it gets to 37 or whatever, then it will jump to the third thread and start counting. It will then jump back to the first thread and pick up where it left off. It does this until it completes all three threads, and I have it display the sequence so that you can see what thread it’s on and what number it's processing.

autosmog
Post 1

What is monoprogramming?

What are the differences between static RAM and dynamic RAM?

What is Microprogramming?

Post your comments

Post Anonymously

Login

username
password
forgot password?

Register

username
password
confirm
email