1.多重编程:
多重编程是一次运行的多个进程,它通过组织作业(代码和数据)来提高CPU利用率,从而使CPU始终有一个要执行的进程。目的是在主存储器中保留多个作业。如果一个作业被输入/输出占用,则可以将CPU分配给其他作业。
2.多线程:
多线程是一种技术,可以在一个进程中创建多个线程以提高系统的计算速度。在多线程中,进程的许多线程是同时执行的,并且根据经济性来完成多线程中的进程创建。
多程序和多线程之间的区别:
S.No. | Multiprogramming | Multithreading |
---|---|---|
1. | The concurrent application of more than one program in the main memory is called as multiprogramming. | The process is divided into several different sub-processes called as threads, which has its own path of execution. This concept is called as multithreading. |
2. | It takes more time to process the jobs. | It takes moderate amount of time for job processing. |
3. | In this, one process is executed at a time. | In this, various components of the same process are being executed at a time. |
4. | The number of users is one at a time. | The number of users usually one. |
5. | Throughput is less. | Throughput is Moderate. |
6. | Its efficiency is Less. | Its efficiency is moderate. |
7. | It is economical. | It is economical. |
8. | The number of CPU is one. | The number of CPU can be one or more than one. |