阴唇肥大是什么原因| 腊八蒜用什么醋比较好| 茶油是什么油| 均质是什么意思| 脂溢性皮炎是什么原因引起的| 肝硬化早期吃什么药| 元气是什么| 痰多是什么原因| 什么叫桥本甲状腺炎| 高瞻远瞩是什么生肖| 漏尿是什么原因造成的| 骑士是什么意思| 肾结石吃什么水果| 悠是什么意思| 手指甲发白是什么原因| 生动形象是什么意思| 爱生闷气的人容易得什么病| 十指连心是什么意思| 家有一老如有一宝是什么意思| 浅卡其色裤子配什么颜色上衣| 蜱虫用什么药消灭| 为什么白天尿少晚上尿多| 区委书记属于什么级别| 金牛座是什么象星座| 绞丝旁奇念什么| 孕妇吃什么蔬菜好| 玉米淀粉可以做什么| 口腔溃疡为什么那么痛| 港澳通行证办理需要什么证件| 冰醋酸是什么| 痹是什么意思| 锦鲤吃什么| 为什么会得肾构错瘤| 牛有几个胃分别叫什么| 牛子是什么| 葡萄糖输液有什么作用| 轻度脑萎缩是什么意思| 桃花依旧笑春风什么意思| 路亚竿什么品牌好| im是什么| 耳目比喻什么| 瓜子脸剪什么发型好看| 故人是什么意思| 经常感冒吃什么增强抵抗力| 维c之王是什么水果| 男人高冷是什么意思啊| 乳酸杆菌少或无是什么意思| 夫妻都是o型血孩子是什么血型| 原始心管搏动是什么意思| 反酸吃什么马上能缓解| ntl是什么意思| 脑缺血吃什么药| dx是什么意思| 纷扰是什么意思| sca是什么意思| 为什么尿频| 男人吃荔枝有什么好处| 梦见两个小男孩是什么意思| lena是什么意思| 70岁是什么之年| 酸入肝是什么意思| 身体多病戴什么首饰| 高干文是什么意思| 颈椎病头晕吃什么药好| 车迟国的三个妖怪分别是什么| 馒头逼是什么意思| 大生化检查能查出什么病来| 维民所止什么意思| 腋下有异味用什么药| 生物科技是做什么的| 喝水呛咳是什么原因| 大圣归来2什么时候上映| 1月23日是什么星座| 荒唐是什么意思| 一个骨一个宽是什么字| 吃什么药可以自杀| 乙型肝炎e抗体阳性是什么意思| 薄凉是什么意思| 梦见大便是什么意思| 狐臭用什么药| 四月七号是什么星座| 汗毛长是什么原因| 眼睛突然出血是什么原因导致| 春秋大梦是什么意思| 用白醋泡脚有什么好处| 吃什么对血栓好| 县长是什么级别的干部| 县团级是什么级别| 尾椎骨疼痛是什么原因| 日本有什么好玩的| 申遗是什么意思| 自己做生意叫什么职业| 头昏应该挂什么科| 男性检查hpv挂什么科| 画眉是什么| 胃上火有什么症状| 岚的意思是什么| 又什么又什么的葡萄| 吃什么可以增强硬度| 孕妇适合吃什么零食| 吃什么能提高记忆力| 历法是什么意思| edd是什么意思| 手术后为什么不让睡觉| 大象吃什么| 梦见亲人是什么意思| 异次元是什么意思| 眉心长痘痘什么原因| 鸡拉白色稀粪吃什么药| 门口放什么植物好风水| 突然头昏是什么原因引起的| 开心的动物是什么生肖| 人各有命是什么意思| 头晕做什么检查| 什么都别说| 五月二十八是什么日子| 毛片是什么| 眉毛里面有痣代表什么| 羊肉炖什么补肾壮阳| gc是什么激素| 不懂事是什么意思| 桥本甲状腺炎挂什么科| 早上头晕是什么原因| 什么品种荔枝最好吃| 淋巴结看什么科| 先心病是什么病| 去脂体重什么意思| 杏仁有什么好处| 叫姑姑是什么关系| 断奶吃什么药| 梦见男婴儿是什么意思| 有缘人什么意思| 海绵体充血不足吃什么药| 白细胞低有什么危害| 银饰为什么会变黑| 反复口腔溃疡是什么病的前兆| 阴枣是什么| 103是什么意思| 清水文是什么意思| 绞股蓝有什么功效| 甲状腺球蛋白抗体高说明什么| 地球为什么自转| cba新赛季什么时候开始| 急性结肠炎什么症状| 12388是什么电话| 水变成冰为什么体积变大| 西米露是什么做的| 艺五行属性是什么| 清新的什么| 财星是什么意思| 一个木一个舌读什么| 什么叫尊重| 你在左边我紧靠右是什么歌| 复制是什么意思| 什么面什么刀| 紫癜病是什么症状| arg是什么氨基酸| 回族信奉什么教| 单纯疱疹吃什么药| 孕妇吃什么| 大白刁是什么鱼| 天天想睡觉没精神是什么原因| 毛片是什么意思| sam是什么意思| 拎不清是什么意思| 平年是什么意思| 嚷能组什么词| 圣诞节什么时候| 防蓝光是什么意思| 40不惑什么意思| 伤口愈合为什么会痒| 皮肤越抓越痒是什么原因| 心肌酶高吃什么药| 新生儿囟门什么时候闭合| 妈妈最大的愿望是什么| 冷漠是什么意思| 大便有粘液什么原因| 98年什么命| 桑树枝煮水有什么功效| 谬论是什么意思| 搀扶是什么意思| e是什么牌子| 麦冬不能和什么一起吃| 耳朵听不清楚是什么原因| 随大流什么意思| 肌肉一跳一跳什么原因| 男生小肚子疼是什么原因| 疝气是什么原因引起的| 什么水果寒凉性| 头什么脚什么| 晚上老咳嗽是什么原因| 远字五行属什么| 超声科检查什么| 夏天喝盐水有什么好处| 7月18日是什么日子| tj什么意思| 男人小便刺痛吃什么药| 代字五行属什么| 为什么会得丹毒| whatsapp是什么软件| 慢性宫颈炎用什么药好| 得道是什么意思| 少腹是什么意思| 南无阿弥陀佛是什么意思| 吃什么东西补充胶原蛋白| 一个歹一个殇读什么| 手机壳为什么会发黄| kcal是什么意思| 淋巴发炎吃什么药| 口腔白斑是什么病| 猴子是什么动物| 粉饼是干什么用的| lps医学上是什么意思| 耳廓上长痣代表什么| 受精卵着床有什么反应| 吃什么排气| 什么叫玄学| 甲状腺1类是什么意思| 空气炸锅可以做什么| 血常规查的是什么项目| 里急后重什么意思| 外甥像舅舅有什么说法| 晕车药什么时候吃最好| nsnm什么意思| 开斋节是什么意思| 人工流产和无痛人流有什么区别| 什么的蘑菇| 儿童感冒咳嗽吃什么药| 虾和什么不能一起吃| c4是什么驾驶证| 外周动脉僵硬度增高什么意思| 见红的血是什么颜色| 元胡是什么| 唇炎涂什么药膏| 用什么泡水喝可以降血压| 什么叫淋巴结转移| 下午四点到五点是什么时辰| 碘酒和碘伏有什么区别| 晕车吃什么能缓解| 十二指肠溃疡a1期什么意思| 眼睛红肿吃什么消炎药| 口角炎吃什么药| 甲减吃什么食物好| 甲状腺是什么功能| 乙酉是什么意思| 什么水不能喝| 什么叫袖珍人| 零四年属什么| 双恋是什么意思| 钮祜禄氏是什么旗| 什么是先兆流产| 成都有什么区| 多巴胺分泌是什么意思| 低血压高吃什么药| 舌头发黑是什么原因| 夜尿多是什么原因引起的| 尿素偏高是什么意思| 印字五行属什么| 胎盘低置是什么原因造成的| 胃蛋白酶原1偏低是什么意思| 月经期间喝酒会有什么影响| 全职太太是什么意思| 三叉神经痛挂什么科| 相敬如宾是什么意思| 百度

英媒称中美展开数字技术争霸战 中国拥有“规模”优势

百度 干,需要雄心壮志,也需要科学态度。

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-14.
  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-14. Retrieved 2025-08-14.
  8. ^ "Re: newbie question: What is a Blue Task". Archived from the original on 2025-08-14. Retrieved 2025-08-14.
月经病是什么意思啊 1965属什么生肖 肝异常一般是什么情况 组织液是什么 孕妇吃鸡蛋对胎儿有什么好处
银行行长是什么级别 老公不交工资意味什么 k3是什么意思 烧仙草是什么做的 鱼泡是鱼的什么器官
眼睛流泪用什么眼药水 九地是什么中药 突然的反义词是什么 北戴河是什么海 第一次世界大战是什么时候
送女朋友什么礼物 男性吃什么增强性功能 嘴唇干是什么原因引起的 喉咙有异物感看什么科 导师是什么意思
离婚的女人叫什么hcv8jop4ns9r.cn 南瓜不能和什么一起吃hcv8jop3ns9r.cn 什么是艾灸qingzhougame.com 高血压看什么科室hcv9jop1ns6r.cn 腰子是什么hcv7jop9ns8r.cn
振水音阳性提示什么hcv9jop4ns3r.cn 癸水的根是什么hcv7jop5ns6r.cn 文武双全是什么意思hcv8jop0ns7r.cn 直肠癌是什么原因引起的hcv8jop6ns6r.cn 臭氧是什么东西hcv8jop5ns0r.cn
正规医院减肥挂什么科hcv8jop1ns6r.cn 什么是向量hcv7jop9ns7r.cn 无助是什么意思hcv9jop2ns3r.cn 助教是干什么的hcv9jop7ns5r.cn 判处死刑缓期二年执行是什么意思bfb118.com
脸一边大一边小是什么原因hcv8jop8ns1r.cn 脑萎缩有什么症状xinjiangjialails.com 木耳炒什么好吃hcv8jop0ns0r.cn 右束支传导阻滞是什么意思hcv8jop0ns3r.cn 巨石强森是什么人种hcv8jop3ns4r.cn
百度