php旧版本windows

Considering that DOS was a single-tasking OS and the ties it had with early versions of Windows, just how did earlier versions of Windows manage to accomplish multi-tasking? Today’s SuperUser Q&A post looks at the answers to this question.

考虑到DOS是单任务操作系统,并且与早期Windows版本具有联系,那么早期Windows版本如何完成多任务处理? 今天的“超级用户问答”帖子着眼于该问题的答案。

Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites.

今天的“问答”环节由SuperUser提供,它是Stack Exchange的一个分支,该社区是由社区驱动的Q&A网站分组。

Windows 95 screenshot courtesy of Wikipedia.

Windows 95屏幕截图由Wikipedia提供。

问题 (The Question)

SuperUser reader LeNoob wants to know how older versions of Windows were able to run as multi-tasking systems?:

超级用户读者LeNoob想知道Windows的旧版本如何能够作为多任务系统运行?

I read that DOS is a single-tasking OS. But if older versions of Windows (also including Windows 95?) were just wrappers for DOS, how could they run as a multi-tasking OS?

我读到DOS是一个单任务操作系统。 但是,如果旧版本的Windows(还包括Windows 95?)只是DOS的包装,它们如何作为多任务OS运行?

Good question! How did older versions of Windows manage to run as multi-tasking systems?

好问题! Windows的较早版本是如何设法作为多任务系统运行的?

答案 (The Answer)

SuperUser contributors Bob and Pete have the answer for us. First up, Bob:

超级用户贡献者Bob和Pete为我们找到了答案。 首先,鲍勃:

Windows 95 was far more than “just a wrapper” for MS-DOS. Quoting Raymond Chen:

Windows 95不仅仅是MS-DOS的“包装” 。 引用雷蒙·陈:

  • MS-DOS served two purposes in Windows 95: 1.) It served as the boot loader. & 2.) It acted as the 16-bit legacy device driver layer.MS-DOS在Windows 95中有两个用途:1.)它用作引导加载程序。 &2.)充当16位旧式设备驱动程序层。

Windows 95 actually hooked/overrode just about all of MS-DOS, keeping it as a compatibility layer while doing all the heavy lifting itself. It also implemented pre-emptive multi-tasking for 32-bit programs.

Windows 95实际上几乎钩住/覆盖了所有MS-DOS,在进行所有繁重的工作时将其保留为兼容层。 它还为32位程序实现了抢先式多任务处理。

Pre-Windows 95

Windows 95之前

Windows 3.x and older were mostly 16-bit (with the exception of Win32s, a kind of compatibility layer that bridges 16 and 32, but we will ignore that here), were more dependent on DOS, and used only cooperative multi-tasking – that is the one where they do not force a running program to switch out; they wait for the running program to yield control (basically, say “I am done” by telling the OS to run the next program that is waiting).

Windows 3.x和更早的版本大多是16位的(Win32s除外,后者是一种桥接16和32的兼容层,但是在这里我们将忽略它),它们更多地依赖于DOS,并且仅使用协作式多任务处理–那就是他们不强迫正在运行的程序退出的程序; 他们等待正在运行的程序产生控制权(基本上是通过告诉OS运行正在等待的下一个程序来说“我完成了”)。

  • Multi-tasking was cooperative, just like in old versions of MacOS (though unlike Multi-tasking DOS 4.x, which sported pre-emptive multi-tasking). A task had to yield to the OS in order to schedule a different task. The yields were built into certain API calls, notably message processing. As long as a task processed messages in a timely manner, everything was great. If a task stopped processing messages and was busy executing some processing loop, multi-tasking was no more.就像在旧版本的MacOS中一样,多任务是协作的(尽管与多任务DOS 4.x不同,后者具有先发制人的多任务功能)。 任务必须屈服于OS才能安排其他任务。 收益内置于某些API调用中,尤其是消息处理。 只要任务能够及时处理消息,一切就很好。 如果任务停止处理消息并忙于执行某些处理循环,则不再需要多任务处理。

Windows 3.x Architecture

Windows 3.x体系结构

As for how early Windows programs would yield control:

至于早期的Windows程序如何产生控制权:

  • Windows 3.1 uses cooperative multi-tasking – meaning that each application that is in the process of running is instructed to periodically check a message queue to find out if any other application is asking for use of the CPU and, if so, to yield control to that application. However, many Windows 3.1 applications would check the message queue only infrequently, or not at all, and monopolize control of the CPU for as much time as they required. A pre-emptive multi-tasking system like Windows 95 will take CPU control away from a running application and distribute it to those that have a higher priority based on the system’s needs.Windows 3.1使用协作式多任务处理-意味着正在运行的每个应用程序都被指示定期检查消息队列,以查找是否有其他任何应用程序正在请求使用CPU,如果有,则请求控制。该应用程序。 但是,许多Windows 3.1应用程序只会很少或根本不检查消息队列,并在所需的时间内独占CPU的控制权。 像Windows 95这样的抢占式多任务系统将使CPU失去对正在运行的应用程序的控制,并根据系统的需要将其分配给优先级更高的应用程序。

Source

资源

All DOS would see is this single application (Windows or other) running, which would pass control around without exiting. In theory, pre-emptive multi-tasking can possibly be implemented on top of DOS anyway with the use of a real-time clock and hardware interrupts to forcibly give control to the scheduler. As Tonny comments, this was actually done by some OSes running on top of DOS.

DOS只会看到该单个应用程序(Windows或其他)正在运行,它将在不退出的情况下传递控制权。 从理论上讲,抢占式多任务可以通过使用实时时钟和硬件中断在DOS之上实现,以强制控制调度程序。 正如Tonny所言,这实际上是由一些在DOS之上运行的操作系统完成的。

386 Enhanced Mode?

386增强模式?

Note: there have been some comments on 386 enhanced mode of Windows 3.x being 32-bit, and supporting pre-emptive multi-tasking.

注意:关于Windows 3.x的386增强模式(32位)并支持抢先式多任务处理,已有一些评论。

This is an interesting case. To summarise the linked blog post, 386 enhanced mode was basically a 32-bit hypervisor, which ran virtual machines. Inside one of those virtual machines ran Windows 3.x standard mode, which does all the stuff listed above.

这是一个有趣的案例。 总结链接的博客文章,386增强模式基本上是运行虚拟机的32位管理程序。 在其中一个虚拟机中运行Windows 3.x标准模式,该模式执行上述所有操作。

MS-DOS would also run inside those virtual machines, and apparently they were pre-emptively multi-tasked – so it seems that the 386 enhanced mode hypervisor will share CPU time slices between the virtual machines (one of which ran normal 3.x and others which ran MS-DOS), and each VM will do its own thing – 3.x would cooperatively multi-task, while MS-DOS would be single-tasked.

MS-DOS也将在这些虚拟机中运行,并且显然它们是抢先式的多任务处理-因此,似乎386增强模式虚拟机监控程序将在虚拟机之间共享CPU时间片(其中一个运行正常的3.x和其他运行MS-DOS的计算机),则每个VM都会做自己的事– 3.x将协同执行多任务,而MS-DOS将是单任务。

MS-DOS

微软DOS

DOS itself was single-tasking on paper, but it did have support for TSR programs that would stay in the background until triggered by a hardware interrupt. Far from true multi-tasking, but not fully single-tasked either.

DOS本身只是单任务,但是它确实支持TSR程序,这些程序将一直在后台运行,直到被硬件中断触发为止。 远非真正的多任务处理,但也不是完全单任务处理。

All this talk of bit-ness? I asked about multi-tasking!

所有这些关于位的话题? 我问了多任务!

Well, strictly speaking, the bit-ness and multi-tasking are not dependent on each other. It should be possible to implement any multi-tasking mode in any bit-ness. However, the move from 16-bit processors to 32-bit processors also introduced other hardware functionality that could have made pre-emptive multi-tasking easier to implement.

好吧,严格来说,位和多任务并不相互依赖。 应该可以以任何位方式实现任何多任务模式。 但是,从16位处理器向32位处理器的迁移还引入了其他硬件功能,这些功能可以使抢先式多任务更易于实现。

Also, since 32-bit programs were new, it was easier to get them to work when they were forcibly switched out – which might have broken some legacy 16-bit programs.

另外,由于32位程序是新的,因此在强制退出时更容易使它们工作-这可能会破坏某些旧的16位程序。

Of course, this is all speculation. If you really want to know why MS did not implement pre-emptive multi-tasking in Windows 3.x (386 enhanced mode notwithstanding), you will have to ask someone who worked there.

当然,这全是猜测。 如果您真的想知道为什么MS在Windows 3.x中没有实施抢先式多任务处理(尽管有386增强模式),则必须问在那里工作的人。

Also, I wanted to correct your assumption that Windows 95 was just a wrapper for DOS.

另外,我想纠正您的假设,即Windows 95只是DOS的包装。

Followed by the answer from Pete:

随后是Pete的回答:

In a modern operating system, the operating system controls all hardware resources, and running applications are kept in sandboxes. An application is not permitted to access memory that the OS has not allocated to that application, and it cannot directly access hardware devices in the computer. If hardware access is required, the application must communicate through device drivers.

在现代操作系统中,操作系统控制所有硬件资源,并且正在运行的应用程序保存在沙箱中。 不允许应用程序访问操作系统尚未分配给该应用程序的内存,并且该应用程序不能直接访问计算机中的硬件设备。 如果需要硬件访问,则应用程序必须通过设备驱动程序进行通信。

The OS can enforce this control, because it forces the CPU to enter protected mode.

操作系统可以强制执行此控制,因为它可以强制CPU进入保护模式。

DOS, on the other hand, never enters protected mode, but stays in real mode (*see below). In real mode, the running applications can perform anything that it wants to, i.e. access hardware directly. But an application running in real mode can also tell the CPU to enter protected mode.

另一方面,DOS永远不会进入保护模式,而是停留在实模式( *见下文)。 在实模式下,正在运行的应用程序可以执行其想要执行的任何操作,即直接访问硬件。 但是,以实模式运行的应用程序也可以告诉CPU进入保护模式。

And this last part allows applications like Windows 95 to start a multi-threaded environment even though they were basically launched from DOS.

最后一部分允许Windows 95之类的应用程序启动多线程环境,即使它们基本上是从DOS启动的也是如此。

DOS (Disk Operating System) was, as far as I know, not much more than a file management system. It provided a file system, mechanisms for navigating the file system, a few tools, and the possibility to launch applications. It did also allow for some applications to stay resident, i.e. mouse drivers and EMM emulators. But it did not attempt to control the hardware in the computer the way a modern OS does.

据我所知,DOS(磁盘操作系统)只不过是文件管理系统而已。 它提供了文件系统,用于导航文件系统的机制,一些工具以及启动应用程序的可能性。 它还确实允许某些应用程序保持驻留,例如,鼠标驱动程序和EMM仿真器。 但是,它没有像现代OS那样尝试控制计算机中的硬件。

*When DOS was first created in the 1970s, protected mode did not exist in the CPU. It was not until the 80286 processor in the mid 1980s that protected mode became part of the CPU.

*在1970年代首次创建DOS时,CPU中不存在保护模式。 直到1980年代中期8080处理器才成为保护模式的一部分。

Make sure to browse on over to the original thread and read through the lively discussion on this topic using the link below!

确保浏览下面的原始主题,并使用下面的链接阅读有关该主题的生动讨论!



Have something to add to the explanation? Sound off in the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.

有什么补充说明吗? 在评论中听起来不错。 是否想从其他精通Stack Exchange的用户那里获得更多答案? 在此处查看完整的讨论线程。

翻译自: https://www.howtogeek.com/187631/how-was-multi-tasking-possible-in-older-versions-of-windows/

php旧版本windows

php旧版本windows_Windows的旧版本中如何进行多任务处理?相关推荐

  1. 问题解决:pycharm pip无法更新,显示更新成功,但版本依然是旧版本

    问题解决:pycharm pip无法更新,显示更新成功,但版本依然是旧版本 问题提出 pycharm中有时必须要求使用最新版本的pip,否则无法安装相关包.但是在软件内部setting-python ...

  2. 旧版java_Java旧版本清理|JavaRa旧版本清理下载_V2.4 官方版_9号软件下载

    JavaRa 是一款非常实用的Java旧版清理工具,可以帮你检查目前系统安装的 Java 是否为最新版本,并且自动移除最新版本以外的所有旧版本,让这些旧版可以不要再占据硬盘的空间了. 软件特点: 1. ...

  3. 旧版3.1.0版本文章内有新版独立微信社群人脉系统社群空间站最新源码开源+详细教程

    介绍: 3.1.0版本独立微信社群人脉系统社群空间站最新源码开源+详细教程 刚想到3.1.0版本的还没有分享只分享了3.1.1版本和2.8.2版本的现在把3.1.0版本的也分享出来比较完善 功能各有各 ...

  4. 如何将SVN上的版本回滚到旧版本

    原文链接:http://www.cnblogs.com/tommy-huang/p/4729634.html 背景: 工作中,遇到一些问题,需要紧急在svn上先前的版本中补充一些东西并很快上线,从SV ...

  5. git切换到旧版本_git查看历史版本

    git查看历史版本以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! 一.git 获取历史版本的几种方式 我们简单的描述一个 ...

  6. 【开发环境】Windows 中安装 Python 各个版本 ( 下载 Python 各版本 SDK | 安装 Python )

    文章目录 一.下载 Python 各版本 SDK 二.安装 Python 1.安装 Python 2.7 2.安装 Python 3.6.8 ( 3.7 / 3.8 / 3.9 / 3.10 安装方式 ...

  7. 【开发环境】Mac 中安装 Python3 最新版本 ( 下载 Python 最新版本 | 安装 Python3 | 验证 Python3 )

    文章目录 一.下载 Python 最新版本 二.安装 Python3 三.验证 Python3 一.下载 Python 最新版本 下载 最新 Python 版本 ; 进入 Python 主页 http ...

  8. Pytorch:深度学习中pytorch/torchvision版本和CUDA版本最正确版本匹配、对应版本安装之详细攻略

    Pytorch:深度学习中pytorch/torchvision版本和CUDA版本最正确版本匹配.对应版本安装之详细攻略 目录 深度学习中pytorch/torchvision版本和CUDA版本最正确 ...

  9. git 版本控制器 初学习,工作中的问题及其解决方法

    one  day 1.  下载安装git控制器 >>>>>>(测试环境 window10)Git下载地址https://git-scm.com/downloads ...

最新文章

  1. android webview 63版,Issue in WebView Android History When update Chrome stable version 63
  2. SRS流媒体服务器——单机环境搭建和源码目录介绍
  3. css的fill属性,css column-fill属性怎么用
  4. 《鸿蒙理论知识05》HarmonyOS概述之下载与安装软件
  5. PyQt5笔记(03) -- 消息框
  6. 从程序员到项目经理(12):如何管理自己的时间(上)
  7. groupadd 添加用户组
  8. c++无法启动程序,系统找不到指定文件的处理方法
  9. myeclipse中设置项目编码方式
  10. 小红书差评笔记下沉 | 如何让小红书笔记下沉
  11. 豆瓣电影数据分析--Tableau
  12. mysql中如何批量删除冗余数据库,删除WordPress数据库中的多余冗余数据
  13. VBA实战(09) - 工作簿(WorkBook)
  14. 有些程序员经常把“删库跑路”挂在嘴边,如果真的“删库跑路”需要负刑事责任吗?
  15. 牛客网数据开发题库_牛客网刷题笔记--数据库
  16. Android 之路68---动画基础
  17. ubuntu 22.04 安装搜狗中文输入法
  18. 软件测试testing
  19. JavaScript-运算符的优先级
  20. Linux系统 通过i2c读写铁电存储器 ram

热门文章

  1. windows安全模式_Winclone 8 for Mac(Windows分区备份迁移和还原工具)
  2. 河北科技大学——数据结构课后习题
  3. php 递归分销角色,PHP递归无限分类
  4. 面对 this 指向丢失,尤雨溪在 Vuex 源码中是怎么处理的
  5. 程序员如何面试才能拿到offer
  6. 家长必读:不想逼孩子,你应该这样做
  7. 业务技术协同线上化的研发管理实战
  8. server 2008R2 AD域环境中DHCP服务器的授权步骤
  9. Android quot;QR二维码扫描quot;
  10. Framework 1.0/1.1中NotifyIcon的不足