How can one demonstrate Multiprogramming and Idle loop in C ???

Please help !!! I can't think any way .....
:?:

Thanks

Recommended Answers

All 4 Replies

Class exercise? At least make a stab at it! In any case, your description of the problem is not complete... What was the purpose of the assignment? Is this a two-part question, or do you need to show each principal in a combined manner?

Class exercise? At least make a stab at it! In any case, your description of the problem is not complete... What was the purpose of the assignment? Is this a two-part question, or do you need to show each principal in a combined manner?

No it is not a Class Assignment !

I have started studying Operating Systems .....
For that I searched for the demonstration programs on the net ... but could not find !

It is a two part question.

Ok. Posting your questions in a clearer manner would be helpful...

1. Demonstrate multi-programming
2. Idle loop

Going in reverse. The idle loop is a no-op process that keeps the CPUs running when they have nothing else to do. It is basically an infinite loop, as in

while (1)
   relinquish_to_whatever_other_process_needs_the_cpu();

As for multiprogramming, there are a number of definitions of this. One is that of multi-tasking - the CPU can handle more than one process at a time, by using time-slicing (allocating some segment of time to each process) to provide even access to the processor resources. Here is a wikipedia article on the subject: http://en.wikipedia.org/wiki/Multiprogramming

No it is not a Class Assignment !

That's irrelevant at this point. We're cracking down on "begging" questions, so in the future you may find similar threads to this one deleted. By "begging" we mean questions that fail to show proof of effort such as described here.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.