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

php旧版本windows

php旧版本windows

how-was-multi-tasking-possible-in-older-versions-of-windows-00

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

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/279561.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

docker swarm的应用----docker集群的构建

一、docker安装 这里我们安装docker-ce 的18.03版本 yum -y remove docker 删除原有版本 #安装依赖包 [rootDocker ~]# yum -y install yum-utils device-mapper-persistent-data lvm2 #添加docker的CE版本的yum源配置文件 [rootDocker ~]# curl https://download.docker…

微信小程序 fire_如何在Fire TV和Fire TV Stick上侧面加载应用程序

微信小程序 fireAmazon’s Fire TV and Fire TV stick technically runs Android…but you wouldn’t know it from looking. Amazon has a wall of content for its set-top box, and doesn’t want Google (with its own competing platform) to crash the party. But even t…

设备无法获得谷歌运行怎么办_因此,您刚刚获得了Google主页。 怎么办?

设备无法获得谷歌运行怎么办So you scored a Google Home for Christmas. That’s awesome because this is a killer little smart speaker that can do a lot of different things—in fact, it can be a little overwhelming. The good news is that we’ve got you covered…

IDEA Maven创建多个Module相互依赖

1、前言 在大型企业项目中,系统架构复杂多变,一个项目根本无法支撑起所有业务。为了提高项目扩展性、灵活性、重用性,封装性,将项目分为多个Module是非常必要的。 这里就不说IDEA如何安装了,安装好IDEA后需要修改maven…

速达5000出现计算成本数据溢出的问题

算成本提示某货品成本溢出处理方法,该问题是由于货品成本异常,成本上亿或者负亿造成的; 1.首先通过语句:select * into tmp_goods from l_goods where ABS(aprice)>100000,把成本价格超过10万的货品资料取出&#x…

收银员英文缩写_如何在没有收银员的苹果商店购买东西

收银员英文缩写If you visit an Apple Store in the hopes of buying a new iPhone, iPad, or MacBook, you have to talk to an Apple employee, since all the expensive products are kept in the back. However, if it’s just an accessory you want, you can buy it with…

php表单提交完返回,表单内容不清空解决方法

2019独角兽企业重金招聘Python工程师标准>>> 我们经常在注册的时候,填写一大推信息以后在提交注册的时候,因为某一项信息不正确,在返回的时候之前的填写的内容全部没有了,这样会导致用户丧失再次填写的信息&#xff0c…

word标尺灰色_如何在Microsoft Word中使用标尺

word标尺灰色Word’s rulers let you control the margins of your page and the indentation of paragraphs. They’re great for precisely lining up images, text, and other elements. If you’re printing a document, the rulers can help ensure that what you see on …

Matplotlib学习---用matplotlib画误差线(errorbar)

误差线用于显示数据的不确定程度,误差一般使用标准差(Standard Deviation)或标准误差(Standard Error)。 标准差(SD):是方差的算术平方根。如果是总体标准差,那么用σ表示…

Android One和Android Go有什么区别?

In 2014, Google announced a lineup of low-cost, low-spec phones called Android One. In 2017, they announced Android Go, specifically designed for low-cost, low-spec phones. So…what’s the difference? 2014年,Google宣布了一系列名为Android One的低…

outlook advanced find 快捷键不起作用

症状:用户反应按outlook advanced find的快捷键时无效,快捷键为CtrlShiftF。第一感觉是肯定跟别的软件有冲突了,观察了下,发现用户正在使用sougou拼音输入法,于是点其属性查看,果然发现与其的简繁切换冲突了…

21-while里的break简单用法

break是结束循环,break之后、循环体内代码不再执行。 while True:yn input(Continue(y/n): )if yn in [n,N]:breakprint(running......) 结果输出: 转载于:https://www.cnblogs.com/hejianping/p/10861816.html

视频造假_如何发现“深造假”面部切换视频

视频造假Recently, Reddit has been making news again with a subreddit in w hich people use a machine learning tool called “Deep Fake” to automatically replace one person’s face with another in a video. Obviously, since this is the internet, people are us…

找到特定ip地址 修改ip_您如何找到网站的IP地址?

找到特定ip地址 修改ipWhether you are in it just for a bit of geeky fun, or are seriously wanting to know the answer, how do you find out the IP address for a website? Today’s SuperUser Q&A post looks at the answer, and how to know if more than one we…

Rational Rose 2003 下载、破解及安装方法(图文)

方法一: 1、安装Rational Rose2003时,在需选择安装项的时候,只选择Rational Rose EnterPrise Edition即可,不需选择其他项,之后选择“DeskTop Installation from CD Image“,一路下一步。出现Mem_pointer_B…

【学习笔记】第三章 python3核心技术与实践--Jupyter Notebook

可能你已经知道,Python 在 14 年后的“崛起”,得益于机器学习和数学统计应用的兴起。那为什么 Python 如此适合数学统计和机器学习呢?作为“老司机”的我可以肯定地告诉你,Jupyter Notebook (https://jupyter.org/&…

二进制安位处理_处理器与安​​全性之间的联系是什么?

二进制安位处理Newer processors are able to contribute to the security of your system, but what exactly do they do to help? Today’s Super User Q&A post looks at the link between processors and system security. 较新的处理器能够为您的系统安全做出贡献&am…

Haproxy+多台MySQL从服务器(Slave) 实现负载均衡

本系统采用MySQL一主多从模式设计,即1台 MySQL“主”服务器(Master)多台“从”服务器(Slave),“从”服务器之间通过Haproxy进行负载均衡,对外只提供一个访问IP,当程序需要访问多台"从"服务器时,只需要访问Ha…

爱普生第三方相机_值得购买第三方相机镜头吗?

爱普生第三方相机When people buy a Canon or Nikon camera, they often assume that they can only buy Canon or Nikon lenses. But that isn’t true. While Nikon lenses won’t work on your Canon camera, there are third-party lens manufacturers—such as Sigma, Tam…

如何用 Flutter 实现混合开发?闲鱼公开源代码实例

2019独角兽企业重金招聘Python工程师标准>>> 具有一定规模的 App 通常有一套成熟通用的基础库,尤其是阿里系 App,一般需要依赖很多体系内的基础库。那么使用 Flutter 重新从头开发 App 的成本和风险都较高。所以在 Native App 进行渐进式迁移…