恐龙生活在什么时代| 法王是什么意思| 什么样的充电宝能带上飞机| 不停的放屁是什么原因| 病例是什么| 对偶句是什么意思| 早起嘴苦是什么原因| opec是什么意思| 庄周梦蝶是什么意思| 身上痒是什么原因| 什么是领导| 脾胃不好吃什么食物好| 1月1号是什么星座| 为什么会早泄| 刮痧的痧是什么东西| 一个厂一个人念什么| 绿心黑豆有什么功效| 推崇是什么意思| 浩浩荡荡是什么意思| 异口同声是什么意思| 特诊科是什么意思| 香槟玫瑰花语是什么意思| 民营经济属于什么经济| 腿抽筋吃什么药最好| 红馆是什么地方| 痰栓是什么意思| 两鬓斑白是什么意思| 头昏脑涨是什么原因| 什么的假山| 鼻干眼干口干属于什么症状| 双数是什么| 疣是什么| 浅棕色是什么颜色| 大便带绿色是什么原因| 鸡生肖配什么生肖最好| 脸上长白斑是什么原因| 十八反是什么意思| 圆房要做什么| 小孩睡觉出汗是什么原因| 儿童腮腺炎吃什么药| 余沧海为什么是两个人| aa是什么意思| 鱿鱼不能和什么一起吃| 前程无量是什么意思| 总警司相当于大陆什么官| 碱性磷酸酶低是什么原因| 为什么不能空腹吃香蕉| 2.4什么星座| 南方有什么水果| 什么疾什么快| 筷子掉地上是什么征兆| 军校毕业是什么军衔| 包皮炎用什么药最有效| 熤是什么意思| 孕妇胃疼可以吃什么药| 一五行属什么| pe什么材质| 溜达鸡是什么意思| 中性粒细胞偏低是什么意思| 州字五行属什么| 关晓彤属什么生肖| 棉绸是什么面料| 科技布是什么材质| 紫藤花什么时候开| 孕中期头疼是什么原因| chris是什么意思| 肺结节吃什么好| 麻叶是什么植物| 为什么晚上睡不着觉| tm什么意思| 阳寿是什么意思| 帛字五行属什么| 外面下着雨犹如我心血在滴什么歌| 早上眼屎多是什么原因| 吃什么可以补钾| 子痫前期是什么意思| 吃龟苓膏有什么好处| 薄荷叶有什么功效| 欣喜若狂的近义词是什么| 脂肪肝是什么意思| 米放什么不生虫子| 有什么好看的国漫| 围绝经期是什么意思| 为什么有的人怎么吃都不胖| 二级产前超声检查是什么| 人死之前为什么会拉屎| 砷对人体有什么危害| 甲状腺看什么门诊| 处女座是什么| 上海有什么好玩的地方| 3月1号是什么星座| 女生为什么会肾虚| 神经外科治疗什么病| 河南话信球是什么意思| 27属相是什么生肖| 臀纹不对称有什么影响| 胎停了有什么明显症状| 蜱虫用什么药可以消灭| 喝黄芪水有什么副作用| 医学上cr是什么意思| 两女一杯什么意思| 尿隐血挂什么科| 痔疮的克星是什么| 腱鞘是什么| 来大姨妈拉肚子是什么原因| 夏天适合种什么菜| 同好是什么意思| 业力是什么意思| 什么人容易心梗| 水灵灵是什么意思| 囊中之物是什么意思| 经血发黑什么原因| 鱼油吃多了有什么副作用| 犟驴是什么意思| 尿液粉红色是什么原因| 5月22号是什么星座| 业火是什么意思| 芈月传芈姝结局是什么| 盛夏是什么意思| 手爱出汗是什么原因| 手足癣用什么药最好| 为什么屁多| 脸上长痘痘用什么药膏效果好| 公历和农历有什么区别| 产物是什么意思| 感冒发烧吃什么药比较好| 吃什么可以提高免疫力| 尿蛋白2十吃什么药| 肝钙化斑是什么意思| 黑色素瘤是什么| ggdb是什么牌子| 中国海警是什么编制| 孕妇感冒了对胎儿有什么影响| 云南白药里的保险子有什么作用| 五谷丰收是什么生肖| 为什么明明很困就是睡不着| 胃炎吃什么药| 女生痛经有什么办法缓解| 什么油适合高温油炸| 三文鱼为什么叫三文鱼| 逝者如斯夫是什么意思| 冬虫夏草长什么样| 飞机什么东西不能带| 农历六月是什么生肖| e m s是什么快递| 善太息是什么意思| 感染hpv用什么药| 车厘子不能和什么一起吃| sig是什么意思| 移植后需要注意什么| 凯格尔运动是什么| 慢性浅表性胃炎伴糜烂吃什么药| 子宫疼是什么原因| 吃什么补雌激素| 月经推迟量少是什么原因| 肺火吃什么药| 眼睛红血丝用什么眼药水| 孩子半夜咳嗽是什么原因| 尿潴留是什么原因引起的| 面基是什么意思| 大料是什么调料| 六月份种什么菜| 驳什么意思| 什么鱼不能吃脑筋急转弯| bbd是什么意思| 叶子发黄缺什么肥| 什么是押韵| 尿路感染是什么原因造成的| 女人为什么不会怀孕| 卵巢疼是什么原因| 梦到鸡是什么意思| 无语是什么意思| 即兴是什么意思| 什么地舞动| 肩膀痛挂什么科| dp是什么意思| 血压低挂什么科| 大腿根内侧发黑是什么原因| 尿常规隐血弱阳性什么意思| 素数是什么| nadh是什么| 软脚虾是什么意思| 读书破万卷下一句是什么| 嗓子疼发烧吃什么药| 冠脉cta主要检查什么| 6月19日什么星座| 阴道放气是什么原因| 犯罪是什么意思| 韩国欧巴是什么意思| 刚生完孩子可以吃什么水果| 坚字五行属什么| 把头是什么意思| 钺读什么| 宝宝经常发烧是什么原因引起的| 水红色是什么颜色| 梨子和什么一起榨汁好喝| 神龙见首不见尾是什么意思| 脑梗输什么液效果最好| 异类是什么意思| 交感神经型颈椎病吃什么药| jw是什么意思| 48岁属什么| 月经准时来说明什么| 玉戴久了会有什么变化| mers是什么病毒| 做梦梦到很多蛇是什么意思| 支气管肺炎吃什么药| 尿频尿黄是什么原因| 海啸是什么| 调剂生是什么意思| 1月26是什么星座| 裙摆是什么| 房子什么朝向好| crp医学上是什么意思| 小气是什么意思| 二月十八是什么星座| 一代明君功千秋是什么生肖| bml是什么| 扁桃体发炎发烧吃什么药| 云裳是什么意思| 女人手指粗短是什么命| 双肺纤维灶是什么意思| 什么情况下需要做造影| 武汉市长是什么级别| 夜深人静是什么意思| 扁平疣是什么原因长出来的| 什么是腱鞘炎| 阳强易举是什么意思| 男人血精是什么原因造成的| 查肾功能需要做什么检查| 肝衰竭是什么原因引起的| 三湖慈鲷可以和什么鱼混养| 耳朵轮廓痒是什么原因| 世界上什么东西最大| 什么颜色最吸热| e6是什么意思| ch发什么音| 吃什么补肾| 支气管炎吃什么药最有效| 炼蜜是什么| 夏至是什么节日| 什么样的女人旺夫| 什么是职业年金| 心率90左右意味着什么| 早泄吃什么好| 助听器什么品牌最好| 梦见来月经是什么意思| 什么时候排卵期| 石榴代表什么生肖| 男人梦见老鼠什么征兆| 胆汁是由什么分泌的| 总出汗是什么原因| 开车压到猫有什么预兆| 吃青提有什么好处| 怨妇是什么意思| 左膝关节退行性变是什么意思| 针眼用什么眼药水| 肥肠炒什么菜好吃| 纳是什么| 意境是什么意思| 桃子是什么季节的水果| 孔子的父亲叫什么| 蚂蚁搬家是什么意思| 25岁属什么生肖| 百度Jump to content

女人是爱的精灵 爱情中女人有哪些背叛心理

From Wikipedia, the free encyclopedia
百度 (编译/王雷)

In computing, preemption is the act performed by an external scheduler — without assistance or cooperation from the task — of temporarily interrupting an executing task, with the intention of resuming it at a later time.[1]:?153? This preemptive scheduler usually runs in the most privileged protection ring, meaning that interruption and then resumption are considered highly secure actions. Such changes to the currently executing task of a processor are known as context switching.

User mode and kernel mode

[edit]

In any given system design, some operations performed by the system may not be preemptable. This usually applies to kernel functions and service interrupts which, if not permitted to run to completion, would tend to produce race conditions resulting in deadlock. Barring the scheduler from preempting tasks while they are processing kernel functions simplifies the kernel design at the expense of system responsiveness. The distinction between user mode and kernel mode, which determines privilege level within the system, may also be used to distinguish whether a task is currently preemptable.

Most modern operating systems have preemptive kernels, which are designed to permit tasks to be preempted even when in kernel mode. Examples of such operating systems are Solaris 2.0/SunOS 5.0,[2] Windows NT, Linux kernel (2.5.4 and newer),[3] AIX and some BSD systems (NetBSD, since version 5).

Preemptive multitasking

[edit]

The term preemptive multitasking is used to distinguish a multitasking operating system, which permits preemption of tasks, from a cooperative multitasking system wherein processes or tasks must be explicitly programmed to yield when they do not need system resources.

In simple terms: Preemptive multitasking involves the use of an interrupt mechanism which suspends the currently executing process and invokes a scheduler to determine which process should execute next. Therefore, all processes will get some amount of CPU time at any given time.

In preemptive multitasking, the operating system kernel can also initiate a context switch to satisfy the scheduling policy's priority constraint, thus preempting the active task. In general, preemption means "prior seizure of". When the high-priority task at that instance seizes the currently running task, it is known as preemptive scheduling.

The term "preemptive multitasking" is sometimes mistakenly used when the intended meaning is more specific, referring instead to the class of scheduling policies known as time-shared scheduling, or time-sharing.

Preemptive multitasking allows the computer system to more reliably guarantee each process a regular "slice" of operating time. It also allows the system to rapidly deal with important external events like incoming data, which might require the immediate attention of one or another process.

At any specific time, processes can be grouped into two categories: those that are waiting for input or output (called "I/O bound"), and those that are fully utilizing the CPU ("CPU bound"). In early systems, processes would often "poll" or "busy-wait" while waiting for requested input (such as disk, keyboard or network input). During this time, the process was not performing useful work, but still maintained complete control of the CPU. With the advent of interrupts and preemptive multitasking, these I/O bound processes could be "blocked", or put on hold, pending the arrival of the necessary data, allowing other processes to utilize the CPU. As the arrival of the requested data would generate an interrupt, blocked processes could be guaranteed a timely return to execution.

Although multitasking techniques were originally developed to allow multiple users to share a single machine, it became apparent that multitasking was useful regardless of the number of users. Many operating systems, from mainframes down to single-user personal computers and no-user control systems (like those in robotic spacecraft), have recognized the usefulness of multitasking support for a variety of reasons. Multitasking makes it possible for a single user to run multiple applications at the same time, or to run "background" processes while retaining control of the computer.

Time slice

[edit]

The period of time for which a process is allowed to run in a preemptive multitasking system is generally called the time slice or quantum.[1]:?158? The scheduler is run once every time slice to choose the next process to run. The length of each time slice can be critical to balancing system performance vs process responsiveness - if the time slice is too short then the scheduler itself will consume too much processing time, but if the time slice is too long, processes will take longer to respond to input.

An interrupt is scheduled to allow the operating system kernel to switch between processes when their time slices expire, effectively allowing the processor's time to be shared among a number of tasks, giving the illusion that it is dealing with these tasks in parallel (simultaneously). The operating system which controls such a design is called a multi-tasking system.

System support

[edit]

Today, nearly all operating systems support preemptive multitasking, including the current versions of Windows, macOS, Linux (including Android), iOS and iPadOS.

An early microcomputer operating system providing preemptive multitasking was Microware's OS-9, available for computers based on the Motorola 6809, including home computers such as the TRS-80 Color Computer 2 when configured with disk drives,[4] with the operating system supplied by Tandy as an upgrade.[5] Sinclair QDOS[6]:?18? and AmigaOS on the Amiga were also microcomputer operating systems offering preemptive multitasking as a core feature. These both ran on Motorola 68000-family microprocessors without memory management. Amiga OS used dynamic loading of relocatable code blocks ("hunks" in Amiga jargon) to multitask preemptively all processes in the same flat address space.

Early operating systems for IBM PC compatibles such as MS-DOS and PC DOS, did not support multitasking at all, however alternative operating systems such as MP/M-86 (1981) and Concurrent CP/M-86 did support preemptive multitasking. Other Unix-like systems including MINIX and Coherent provided preemptive multitasking on 1980s-era personal computers.

Later MS-DOS compatible systems natively supporting preemptive multitasking/multithreading include Concurrent DOS, Multiuser DOS, Novell DOS (later called Caldera OpenDOS and DR-DOS 7.02 and higher). Since Concurrent DOS 386, they could also run multiple DOS programs concurrently in virtual DOS machines.

The earliest version of Windows to support a limited form of preemptive multitasking was Windows/386 2.0, which used the Intel 80386's Virtual 8086 mode to run DOS applications in virtual 8086 machines, commonly known as "DOS boxes", which could be preempted. In Windows 95, 98 and Me, 32-bit applications were made preemptive by running each one in a separate address space, but 16-bit applications remained cooperative for backward compatibility.[7] In Windows 3.1x (protected mode), the kernel and virtual device drivers ran preemptively, but all 16-bit applications were non-preemptive and shared the same address space.

Preemptive multitasking has always been supported by Windows NT (all versions), OS/2 (native applications), Unix and Unix-like systems (such as Linux, BSD and macOS), VMS, OS/360, and many other operating systems designed for use in the academic and medium-to-large business markets.

Early versions of the classic Mac OS did not support multitasking at all, with cooperative multitasking becoming available via MultiFinder in System Software 5 and then standard in System 7. Although there were plans to upgrade the cooperative multitasking found in the classic Mac OS to a preemptive model (and a preemptive API did exist in Mac OS 9, although in a limited sense[8]), these were abandoned in favor of Mac OS X (now called macOS) that, as a hybrid of the old Mac System style and NeXTSTEP, is an operating system based on the Mach kernel and derived in part from BSD, which had always provided Unix-like preemptive multitasking.

See also

[edit]

References

[edit]
  1. ^ a b Tanenbaum, Andrew (2015). Modern operating systems. Boston: Pearson. ISBN 978-0-13-359162-0. OCLC 870646449.
  2. ^ Khanna, S.; Sebree, M.; Zolnovsky, J. "Realtime scheduling in SunOS 5.0". Proceedings of the USENIX Winter Conference, 1992: 375–390.
  3. ^ "Release notes for v2.5.4". The Linux Kernel Archives. Linux Kernel Organization, Inc. Retrieved 2025-08-06.
  4. ^ Downard, Dan (September 1983). "Dynamic Uno". The Rainbow. pp. 236–240. Retrieved 9 May 2024.
  5. ^ 1984 TRS-80 Catalog. Tandy Corporation. 1984. pp. 53–54. Retrieved 14 May 2024.
  6. ^ Pennell, Andrew (1985). The Sinclair QDOS Companion. Sunshine Books. ISBN 978-0-946408-69-6. Retrieved 12 May 2024.
  7. ^ "How 16-Bit and 32-Bit Programs Multitask in Windows 95 (Q117567)". Archived from the original on 2025-08-06. Retrieved 2025-08-06.
  8. ^ "Re: newbie question: What is a Blue Task". Archived from the original on 2025-08-06. Retrieved 2025-08-06.
喝水就打嗝是什么原因 最近发胖过快什么原因 像狐狸的狗是什么狗 糖类抗原CA125高是什么意思 包皮过长是什么样的
子宫肌壁回声不均匀是什么意思 佛口蛇心是什么生肖 剪刀手什么意思 粘液丝高是什么原因 乏力是什么原因
桃胶有什么作用 乙肝核心抗体阳性是什么意思 无蔗糖是什么意思 四维空间是什么 五六点是什么时辰
护理专业出来能干什么 r一谷氨酰转移酶高说明什么 梦见打死狗有什么预兆 hoho是什么意思 什么是c字裤
黔驴技穷的意思是什么youbangsi.com 钾高是什么原因造成的hcv7jop5ns5r.cn 罗布麻是什么东西hcv9jop5ns2r.cn 深圳为什么叫鹏城sscsqa.com 人间仙境是什么意思hcv7jop5ns3r.cn
病毒性感冒什么症状hcv8jop4ns4r.cn 五行缺水是什么意思hanqikai.com 河里的贝壳叫什么hcv8jop0ns1r.cn 苯三酚注射有什么用hcv9jop8ns0r.cn 痛风用什么药beikeqingting.com
例假吃什么水果好hcv8jop5ns9r.cn 两毛二是什么军衔hcv7jop6ns0r.cn 副歌部分是什么意思hcv9jop8ns2r.cn 见招拆招下一句是什么hcv8jop2ns7r.cn 大腿根疼是什么原因hcv7jop5ns2r.cn
心绞痛是什么病shenchushe.com 人情世故什么意思hcv8jop9ns8r.cn 庭长是什么级别hcv8jop8ns0r.cn 血小板计数高是什么原因zsyouku.com 山楂有什么作用hcv8jop2ns1r.cn
百度