![best multi processing operating system best multi processing operating system](https://static.javatpoint.com/operating-system/images/multiprocessing-operating-system3.png)
Other problems that need to be addressed when having multiple programs in memory is fragmentation as programs enter or leave the main memory. Note that in order for such a system to function properly, the OS must be able to load multiple programs into separate areas of the main memory and provide the required protection to avoid the chance of one process being modified by another one. Therefore, the ultimate goal of multiprogramming is to keep the CPU busy as long as there are processes ready to execute. In this way, no CPU time is wasted by the system waiting for the I/O task to be completed, and a running process keeps executing until either it voluntarily releases the CPU or when it blocks for an I/O operation. Then, the OS may interrupt that process and give the control to one of the other in-main-memory programs that are ready to execute (i.e. Indeed, suppose the currently running process is performing an I/O task (which, by definition, does not need the CPU to be accomplished). The main idea of multiprogramming is to maximize the use of CPU time. 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. In a multiprogramming system there are one or more programs loaded in main memory which are ready to execute. On the basis of the type of OS to be realized, different scheduling policies may be implemented. Generally speaking, the OS module which handles resource allocation is called scheduler. As we have already introduced, the Operating System (OS), amongst other duties, is responsible for the effective and efficient allocation of those resources. In a modern computing system, there are usually several concurrent application processes which compete for (few) resources like, for instance, the CPU.
![best multi processing operating system best multi processing operating system](https://kullabs.com/uploads/multiprogramming.jpg)
In this post, I will try to clarify four of such terms which often cause perplexity: those are multiprogramming, multiprocessing, multitasking, and multithreading. When you approach operating system concepts there might be several confusing terms that may look similar but in fact refer to different concepts.
![best multi processing operating system best multi processing operating system](https://429151971640327878.weebly.com/uploads/4/6/9/9/46999663/7942272_orig.png)
I would like to acknowledge and thank the author of that, and invite you to take some time to visit and give credit to that source as well. The following post has been inspired by this blog post, which appeared first.