先决条件–不同类型的操作系统
1.时间共享:
时间共享是多重编程的逻辑扩展,在这种时间共享中,操作系统会在相应的时隙中为许多用户/进程分配计算机资源。在这种情况下,处理器时间与多个用户共享,这就是为什么它被称为时间共享操作系统。对于不同的流程,它有一个固定的时间片。它的主要目的是交互式响应时间。
分时操作系统的优势:
- 快速反应。
- 减少CPU空闲时间。
- 所有任务都指定了特定时间。
- 重复软件的可能性较小。
- 缩短响应时间。
分时操作系统的缺点:
- 它消耗大量资源。
- 需要高规格的硬件。
- 它具有可靠性问题。
- 安全和完整性问题。
- 数据通信问题的可能性。
2.多重编程:
多程序操作系统允许通过监视多个进程的状态并在多个进程之间切换来执行多个进程。在此处理器和内存中,未充分利用的问题得以解决,并且多个程序在CPU上运行,这就是为什么将其称为“多程序编程”。它没有固定的过程时间片。其主要目的是资源利用。
多重编程操作系统的好处:
- 没有CPU空闲时间。
- 任务并行运行。
- 响应时间更短。
- 最大化计算机的总作业吞吐量。
- 提高资源利用率。
多程序OS的缺点:
- 有时长时间的工作不得不等待很长时间。
- 跟踪所有过程有时很困难。
- 需要CPU调度。
- 需要有效的内存管理。
- 在执行期间,用户无需与任何程序进行交互。
分时与多程序之间的区别:
S.No. | TIME SHARING | MULTIPROGRAMMING |
---|---|---|
01. | Time Sharing is the logical extension of multiprogramming, in this time sharing Operating system many users/processes are allocated with computer resources in respective time slots. | Multiprogramming operating system allows to execute multiple processes by monitoring their process states and switching in between processes. |
02. | Processors time is shared with multiple users that’s why it is called as time sharing operating system. | Processor and memory underutilization problem is resolved and multiple programs runs on CPU that’s why it is called multiprogramming. |
03. | In this process, two or more users can use a processor in their terminal. | In this, the process can be executed by a single processor. |
04. | Time sharing OS has fixed time slice. | Multi-programming OS has no fixed time slice. |
05. | In time sharing OS system, execution power is taken off before finishing of execution. | In multi-programming OS system before finishing a task the execution power is not taken off. |
06. | Here the system works for the same or less time on each processes. | Here the system does not take same time to work on different processes. |
07. | In time sharing OS system depends on time to switch between different processes. | In Multiprogramming OS, system depends on devices to switch between tasks such I/O interrupts etc. |
08. | System model of time sharing system is multiple programs and multiple users. | System model of multiprogramming system is multiple programs. |
09. | Time sharing system maximizes response time. | Multiprogramming system maximizes response time. |
10. | Example: Windows NT. | Example: Mac OS. |