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,一经查实,立即删除!

相关文章

批量提取视频文件信息(文件大小及时长)并统计

随着设备性能提高,视频文件越来越大了。服务器在对外提供视频服务时,需要承担越来越大的存储负担。一般提供1080P的AVC编码视频已满足多数观看需求。(1小时视频大约1.3G)此文要解决的就是关于已有大量高清视频(1小时超…

列出所有K个元素的子集-----2013年1月26日

问题描述:列出一个集合的元素个数为k的所有子集。思路:在字典顺序列出所有子集的基础上判断元素个数就可以了&#xff0c;比较简单。代码如下:1 #include <stdio.h>2 #define MAX 10003 4 int main()5 {6 int n5;7 int set[MAX]{1};8 int index0;9 int …

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…

PS 技巧

1. 钢笔的使用&#xff1a; 扣完一圈以后&#xff0c;按Ctrl回车键&#xff0c;会出现蚂蚁线&#xff0c;然后按CtrlJ 是复制扣出来的图层&#xff0c;右下角的框里会出现一个新图层&#xff0c;注意每个图层前边有一个小框&#xff0c;点一下是出现眼睛就可以显示该图层在中央…

Ibatis - Open quote is expected for attribute {1} associated with an element type '

昨天晚上提交的代码&#xff0c;今天运行起来&#xff0c;始终报错&#xff1a; Open quote is expected for attribute "{1}" associated with an element type id,查了半天&#xff0c;觉得很奇怪。 回滚到昨天的代码&#xff0c;运行正常。经过compare代码&#…

Linux系统运维之路

九月份开始&#xff0c;半年内搞定运维&#xff0c;博客会慢慢的更新&#xff0c;vim编辑器&#xff0c;Nginx配置文件优化 运维基础 运维基础-Linux发展史、安装、基本操作 运维基础-用户和组管理 运维基础-文件权限管理 运维基础-进程管理 运维基础-IO 管道 运维基础-查找压…

设备无法获得谷歌运行怎么办_因此,您刚刚获得了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、前言 在大型企业项目中&#xff0c;系统架构复杂多变&#xff0c;一个项目根本无法支撑起所有业务。为了提高项目扩展性、灵活性、重用性&#xff0c;封装性&#xff0c;将项目分为多个Module是非常必要的。 这里就不说IDEA如何安装了&#xff0c;安装好IDEA后需要修改maven…

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

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

Win32页上的所有控件属性与方法

Win32页上的所有控件。该页控件是在32位Win系统中的一些基本控件&#xff0c;如果你选择开发CLX程序&#xff0c;则在控件面板上不会显示该页TTabControl属性DisplayRect&#xff1a;只定该控件客户区的一个矩形HotTrack&#xff1a;设置当鼠标经过页标签时&#xff0c;它的字是…

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

收银员英文缩写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…

上传文件 connection reset

适用于&#xff1a;Windows 7&#xff0c;Windows Server 2003&#xff0c;Windows Server 2008&#xff0c;Windows Server 2008 R2&#xff0c;Windows Vista 由于FTP的工作方式&#xff0c;在防火墙后面的服务器上使用文件传输协议&#xff08;FTP&#xff09;服务会产生一系…

分区表备份工具下载

分区表一般很少被破坏&#xff0c;然而一旦出问题&#xff0c;想要恢复卷上的数据就非常麻烦。这个工具软件是我以前经常用的&#xff0c;卷分区被误删除后可在几分钟内得到恢复&#xff0c;非常方便。使用说明请参见&#xff1a;[url]http://www.sansky.net/html/2007-05-23-4…

【PaddlePaddle系列】报错解决方法合集 (不定时更新)

1、PaddlePaddle使用CPU时正常运行&#xff0c;但是使用GPU时却报出一堆错误信息&#xff0c;节选如下&#xff1a; paddle.fluid.core.EnforceNotMet: enforce allocating < available failed, 1835602936 > 1651048192at [/paddle/paddle/fluid/platform/gpu_info.cc:1…

算法:前K个最大的元素

前几天&#xff0c;阮一峰 和 winter 在前端九部组织了一个互面小组&#xff0c;目的是为了分享和解答面试遇到的面试题&#xff0c;感兴趣的可以了解一下。 下面我就把我回答的一个问题整理出来分享给大家。 问题描述 题目是&#xff1a;算法&#xff0c;前 K 个最大的元素。 …

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

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

es6拼接字符串的方式。

文章&#xff1a;es6拼接字符串的方式。转载于:https://www.cnblogs.com/Tpf386/p/9519007.html

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 …

drools简单应用

当某个服务的需求经常变的时候&#xff0c;如果使用了硬编码的方式进行开发会是一件非常麻烦的事。 最近在对项目的积分模块进行改造的时候想到了规则引擎&#xff0c;使用规则引擎处理复杂而且多变的业务逻辑有其非常大的优势&#xff0c;包括实时更新、性能等方面。 不多说&a…