Knowledge (XXG)

Preemption (computing)

Source 📝

319:" 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. 25: 354:. 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 will consume too much processing time, but if the time slice is too long, processes will take longer to respond to input. 541:, 32-bit applications were made preemptive by running each one in a separate address space, but 16-bit applications remained cooperative for backward compatibility. 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. 368:
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
299:
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.
322:
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
331:), 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. 283:'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. 286:
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
914: 861: 42: 1190: 1161: 653: 1376: 818: 148:, meaning that interruption and then resumption are considered highly secure actions. Such changes to the currently executing task of a 190:. Barring the scheduler from preempting tasks while they are processing kernel functions simplifies the kernel design at the expense of 108: 89: 965: 909: 61: 884: 854: 202:, which determines privilege level within the system, may also be used to distinguish whether a task is currently preemptable. 1077: 975: 604: 565: 268:
to determine which process should execute next. Therefore, all processes will get some amount of CPU time at any given time.
226: 46: 68: 744: 1381: 1355: 904: 889: 950: 935: 894: 340: 303:
At any specific time, processes can be grouped into two categories: those that are waiting for input or output (called "
179: 1116: 1063: 480: 209:, which are designed to permit tasks to be preempted even when in kernel mode. Examples of such operating systems are 195: 187: 75: 346:
The period of time for which a process is allowed to run in a preemptive multitasking system is generally called the
793: 170:
In any given system design, some operations performed by the system may not be preemptable. This usually applies to
1131: 970: 847: 390: 312: 210: 35: 1166: 985: 945: 940: 899: 365: 272: 171: 57: 432:
were also microcomputer operating systems offering preemptive multitasking as a core feature. These both ran on
1209: 1096: 960: 621: 250: 144:
with no assistance or cooperation from the task. This preemptive scheduler usually runs in the most privileged
955: 417: 1343: 1282: 1171: 1151: 1058: 580:, and many other operating systems designed for use in the academic and medium-to-large business markets. 280: 254: 141: 1126: 1092: 994: 930: 616: 265: 246: 149: 134: 377:
Today, nearly all operating systems support preemptive multitasking, including the current versions of
1323: 1297: 1292: 1244: 1121: 515: 328: 261: 82: 1229: 1136: 511: 468: 822: 769: 692: 1338: 1287: 1219: 1176: 1017: 718: 659: 649: 530: 452: 378: 165: 420:
when configured with disk drives, with the operating system supplied by Tandy as an upgrade.
1318: 870: 362: 137: 448:" in Amiga jargon) to multitask preemptively all processes in the same flat address space. 140:, with the intention of resuming it at a later time. This interrupt is done by an external 1262: 1224: 1195: 534: 503: 441: 199: 145: 521:
The earliest version of Windows to support a limited form of preemptive multitasking was
1348: 1272: 1234: 1106: 584: 491: 437: 433: 324: 276: 191: 183: 153: 490:
compatible systems natively supporting preemptive multitasking/multithreading include
1370: 1214: 1053: 1007: 600: 495: 463:, did not support multitasking at all, however alternative operating systems such as 421: 413: 1141: 316: 292: 218: 1267: 1249: 1032: 1022: 1012: 522: 24: 583:
Although there were plans to upgrade the cooperative multitasking found in the
545: 538: 499: 460: 445: 404:
An early microcomputer operating system providing preemptive multitasking was
214: 663: 1204: 1111: 1037: 1002: 557: 472: 405: 358: 308: 304: 175: 130: 122: 677:
Khanna, S.; Sebree, M.; Zolnovsky, J. "Realtime scheduling in SunOS 5.0".
1333: 797: 596: 588: 1328: 1257: 1027: 573: 464: 425: 222: 577: 507: 487: 456: 398: 230: 839: 253:
system wherein processes or tasks must be explicitly programmed to
1277: 794:"How 16-Bit and 32-Bit Programs Multitask in Windows 95 (Q117567)" 592: 569: 561: 483:
provided preemptive multitasking on 1980s-era personal computers.
476: 429: 386: 382: 591:, although in a limited sense), these were abandoned in favor of 553: 549: 526: 409: 260:
In simple terms: Preemptive multitasking involves the use of an
843: 607:, which had always provided Unix-like preemptive multitasking. 537:, commonly known as "DOS boxes", which could be preempted. In 1313: 394: 18: 264:
which suspends the currently executing process and invokes a
514:, they could also run multiple DOS programs concurrently in 587:
to a preemptive model (and a preemptive API did exist in
544:
Preemptive multitasking has always been supported by
1306: 1243: 1189: 1150: 1085: 1076: 1046: 993: 984: 923: 877: 49:. Unsourced material may be challenged and removed. 595:that, as a hybrid of the old Mac System style and 679:Proceedings of the USENIX Winter Conference, 1992 339:"Time slice" redirects here. For other uses, see 307:"), and those that are fully utilizing the CPU (" 271:In preemptive multitasking, the operating system 639: 637: 855: 311:"). In early systems, processes would often " 8: 249:, which permits preemption of tasks, from a 471:did support preemptive multitasking. Other 1082: 990: 862: 848: 840: 819:"Re: newbie question: What is a Blue Task" 749:. Tandy Corporation. 1984. pp. 53–54 440:without memory management. Amiga OS used 109:Learn how and when to remove this message 257:when they do not need system resources. 16:Temporarily interrupting a computer task 633: 416:, including home computers such as the 412:, available for computers based on the 599:, is an operating system based on the 7: 47:adding citations to reliable sources 205:Most modern operating systems have 14: 966:Object-oriented operating system 699:. Linux Kernel Organization, Inc 603:kernel and derived in part from 23: 717:Downard, Dan (September 1983). 34:needs additional citations for 976:Supercomputer operating system 1: 444:of relocatable code blocks (" 247:multitasking operating system 951:Just enough operating system 936:Distributed operating system 451:Early operating systems for 1377:Operating system technology 1064:User space and kernel space 771:The Sinclair QDOS Companion 593:Mac OS X (now called macOS) 533:to run DOS applications in 178:which, if not permitted to 58:"Preemption" computing 1398: 971:Real-time operating system 693:"Release notes for v2.5.4" 644:Tanenbaum, Andrew (2015). 361:is scheduled to allow the 338: 194:. The distinction between 163: 129:is the act of temporarily 1167:Multilevel feedback queue 1162:Fixed-priority preemptive 946:Hobbyist operating system 941:Embedded operating system 697:The Linux Kernel Archives 245:is used to distinguish a 160:User mode and kernel mode 1210:General protection fault 961:Network operating system 915:User features comparison 768:Pennell, Andrew (1985). 646:Modern operating systems 622:Cooperative multitasking 510:7.02 and higher). Since 251:cooperative multitasking 182:, would tend to produce 956:Mobile operating system 552:(native applications), 418:TRS-80 Color Computer 2 243:preemptive multitasking 237:Preemptive multitasking 1059:Loadable kernel module 288:time-shared scheduling 174:functions and service 1127:Process control block 1093:Computer multitasking 931:Disk operating system 617:Computer multitasking 539:Windows 95, 98 and Me 535:virtual 8086 machines 192:system responsiveness 1382:Concurrent computing 1298:Virtual tape library 890:Forensic engineering 516:virtual DOS machines 275:can also initiate a 233:, since version 5). 43:improve this article 1307:Supporting concepts 1293:Virtual file system 746:1984 TRS-80 Catalog 648:. Boston: Pearson. 262:interrupt mechanism 221:(2.5.4 and newer), 1230:Segmentation fault 1078:Process management 725:. pp. 236–240 512:Concurrent DOS 386 475:systems including 469:Concurrent CP/M-86 453:IBM PC compatibles 329:robotic spacecraft 207:preemptive kernels 1364: 1363: 1220:Memory protection 1191:Memory management 1185: 1184: 1177:Shortest job next 1072: 1071: 871:Operating systems 655:978-0-13-359162-0 560:systems (such as 531:Virtual 8086 mode 525:, which used the 281:scheduling policy 180:run to completion 166:Kernel preemption 154:context switching 119: 118: 111: 93: 1389: 1319:Computer network 1083: 991: 864: 857: 850: 841: 834: 833: 831: 830: 821:. Archived from 815: 809: 808: 806: 805: 796:. Archived from 790: 784: 783: 781: 779: 774:. Sunshine Books 765: 759: 758: 756: 754: 741: 735: 734: 732: 730: 714: 708: 707: 705: 704: 689: 683: 682: 674: 668: 667: 641: 548:(all versions), 363:operating system 114: 107: 103: 100: 94: 92: 51: 27: 19: 1397: 1396: 1392: 1391: 1390: 1388: 1387: 1386: 1367: 1366: 1365: 1360: 1302: 1263:Defragmentation 1248: 1239: 1225:Protection ring 1194: 1181: 1153: 1146: 1068: 1042: 980: 919: 873: 868: 838: 837: 828: 826: 817: 816: 812: 803: 801: 792: 791: 787: 777: 775: 767: 766: 762: 752: 750: 743: 742: 738: 728: 726: 716: 715: 711: 702: 700: 691: 690: 686: 676: 675: 671: 656: 643: 642: 635: 630: 613: 523:Windows/386 2.0 504:Caldera OpenDOS 442:dynamic loading 438:microprocessors 375: 344: 337: 327:(like those in 325:control systems 279:to satisfy the 239: 213:2.0/SunOS 5.0, 184:race conditions 168: 162: 146:protection ring 115: 104: 98: 95: 52: 50: 40: 28: 17: 12: 11: 5: 1395: 1393: 1385: 1384: 1379: 1369: 1368: 1362: 1361: 1359: 1358: 1353: 1352: 1351: 1349:User interface 1346: 1336: 1331: 1326: 1321: 1316: 1310: 1308: 1304: 1303: 1301: 1300: 1295: 1290: 1285: 1280: 1275: 1273:File attribute 1270: 1265: 1260: 1254: 1252: 1241: 1240: 1238: 1237: 1235:Virtual memory 1232: 1227: 1222: 1217: 1212: 1207: 1201: 1199: 1187: 1186: 1183: 1182: 1180: 1179: 1174: 1169: 1164: 1158: 1156: 1148: 1147: 1145: 1144: 1139: 1134: 1129: 1124: 1119: 1114: 1109: 1107:Context switch 1104: 1089: 1087: 1080: 1074: 1073: 1070: 1069: 1067: 1066: 1061: 1056: 1050: 1048: 1044: 1043: 1041: 1040: 1035: 1030: 1025: 1020: 1015: 1010: 1005: 999: 997: 988: 982: 981: 979: 978: 973: 968: 963: 958: 953: 948: 943: 938: 933: 927: 925: 921: 920: 918: 917: 912: 907: 902: 897: 892: 887: 881: 879: 875: 874: 869: 867: 866: 859: 852: 844: 836: 835: 810: 785: 760: 736: 709: 684: 669: 654: 632: 631: 629: 626: 625: 624: 619: 612: 609: 585:classic Mac OS 502:(later called 492:Concurrent DOS 434:Motorola 68000 374: 373:System support 371: 336: 333: 277:context switch 238: 235: 161: 158: 117: 116: 31: 29: 22: 15: 13: 10: 9: 6: 4: 3: 2: 1394: 1383: 1380: 1378: 1375: 1374: 1372: 1357: 1354: 1350: 1347: 1345: 1342: 1341: 1340: 1337: 1335: 1332: 1330: 1327: 1325: 1322: 1320: 1317: 1315: 1312: 1311: 1309: 1305: 1299: 1296: 1294: 1291: 1289: 1286: 1284: 1281: 1279: 1276: 1274: 1271: 1269: 1266: 1264: 1261: 1259: 1256: 1255: 1253: 1251: 1246: 1242: 1236: 1233: 1231: 1228: 1226: 1223: 1221: 1218: 1216: 1215:Memory paging 1213: 1211: 1208: 1206: 1203: 1202: 1200: 1197: 1192: 1188: 1178: 1175: 1173: 1170: 1168: 1165: 1163: 1160: 1159: 1157: 1155: 1149: 1143: 1140: 1138: 1135: 1133: 1130: 1128: 1125: 1123: 1120: 1118: 1115: 1113: 1110: 1108: 1105: 1102: 1098: 1094: 1091: 1090: 1088: 1084: 1081: 1079: 1075: 1065: 1062: 1060: 1057: 1055: 1054:Device driver 1052: 1051: 1049: 1045: 1039: 1036: 1034: 1031: 1029: 1026: 1024: 1021: 1019: 1016: 1014: 1011: 1009: 1006: 1004: 1001: 1000: 998: 996: 995:Architectures 992: 989: 987: 983: 977: 974: 972: 969: 967: 964: 962: 959: 957: 954: 952: 949: 947: 944: 942: 939: 937: 934: 932: 929: 928: 926: 922: 916: 913: 911: 908: 906: 903: 901: 898: 896: 893: 891: 888: 886: 883: 882: 880: 876: 872: 865: 860: 858: 853: 851: 846: 845: 842: 825:on 2007-10-13 824: 820: 814: 811: 800:on 2008-01-17 799: 795: 789: 786: 773: 772: 764: 761: 748: 747: 740: 737: 724: 720: 719:"Dynamic Uno" 713: 710: 698: 694: 688: 685: 680: 673: 670: 665: 661: 657: 651: 647: 640: 638: 634: 627: 623: 620: 618: 615: 614: 610: 608: 606: 602: 598: 594: 590: 586: 581: 579: 575: 571: 567: 563: 559: 555: 551: 547: 542: 540: 536: 532: 528: 524: 519: 517: 513: 509: 505: 501: 497: 496:Multiuser DOS 493: 489: 484: 482: 478: 474: 470: 466: 462: 458: 454: 449: 447: 443: 439: 435: 431: 427: 423: 422:Sinclair QDOS 419: 415: 414:Motorola 6809 411: 407: 402: 400: 396: 392: 388: 384: 380: 372: 370: 367: 364: 360: 355: 353: 349: 342: 334: 332: 330: 326: 320: 318: 314: 310: 306: 301: 297: 295: 294: 289: 284: 282: 278: 274: 269: 267: 263: 258: 256: 252: 248: 244: 236: 234: 232: 228: 224: 220: 216: 212: 208: 203: 201: 197: 193: 189: 186:resulting in 185: 181: 177: 173: 167: 159: 157: 155: 152:are known as 151: 147: 143: 139: 136: 132: 128: 124: 113: 110: 102: 99:February 2009 91: 88: 84: 81: 77: 74: 70: 67: 63: 60: –  59: 55: 54:Find sources: 48: 44: 38: 37: 32:This article 30: 26: 21: 20: 1250:file systems 1142:Time-sharing 1100: 827:. Retrieved 823:the original 813: 802:. Retrieved 798:the original 788: 776:. Retrieved 770: 763: 751:. Retrieved 745: 739: 727:. Retrieved 722: 712: 701:. Retrieved 696: 687: 678: 672: 645: 582: 543: 520: 485: 450: 403: 376: 356: 351: 347: 345: 321: 302: 298: 293:time-sharing 291: 287: 285: 270: 259: 242: 240: 219:Linux kernel 206: 204: 169: 131:interrupting 126: 120: 105: 96: 86: 79: 72: 65: 53: 41:Please help 36:verification 33: 1268:Device file 1258:Boot loader 1172:Round-robin 1097:Cooperative 1033:Rump kernel 1023:Multikernel 1013:Microkernel 910:Usage share 723:The Rainbow 527:Intel 80386 467:(1981) and 389:(including 341:Timeslicing 200:kernel mode 1371:Categories 1198:protection 1154:algorithms 1152:Scheduling 1101:Preemptive 1047:Components 1018:Monolithic 885:Comparison 829:2007-03-29 804:2008-01-17 703:2021-07-03 681:: 375–390. 628:References 546:Windows NT 500:Novell DOS 348:time slice 335:Time slice 215:Windows NT 176:interrupts 164:See also: 127:preemption 69:newspapers 1288:Partition 1205:Bus error 1132:Real-time 1112:Interrupt 1038:Unikernel 1003:Exokernel 664:870646449 558:Unix-like 473:Unix-like 406:Microware 359:interrupt 317:busy-wait 309:CPU bound 305:I/O bound 266:scheduler 241:The term 229:systems ( 225:and some 196:user mode 150:processor 142:scheduler 135:executing 123:computing 1334:Live USB 1196:resource 1086:Concepts 924:Variants 905:Timeline 611:See also 597:NeXTSTEP 589:Mac OS 9 481:Coherent 455:such as 436:-family 369:system. 188:deadlock 1329:Live CD 1283:Journal 1247:access, 1245:Storage 1122:Process 1028:vkernel 895:History 878:General 465:MP/M-86 428:on the 426:AmigaOS 391:Android 379:Windows 352:quantum 211:Solaris 83:scholar 1137:Thread 1008:Hybrid 986:Kernel 778:12 May 753:14 May 662:  652:  578:OS/360 508:DR-DOS 488:MS-DOS 486:Later 461:PC DOS 457:MS-DOS 399:iPadOS 366:kernel 315:" or " 273:kernel 231:NetBSD 172:kernel 85:  78:  71:  64:  56:  1339:Shell 1278:Inode 729:9 May 570:macOS 562:Linux 477:MINIX 446:hunks 430:Amiga 387:Linux 383:macOS 290:, or 255:yield 90:JSTOR 76:books 900:List 780:2024 755:2024 731:2024 660:OCLC 650:ISBN 601:Mach 568:and 556:and 554:Unix 550:OS/2 506:and 479:and 459:and 424:and 410:OS-9 397:and 313:poll 198:and 138:task 62:news 1356:PXE 1344:CLI 1324:HAL 1314:API 1117:IPC 605:BSD 574:VMS 572:), 566:BSD 529:'s 408:'s 395:iOS 393:), 357:An 350:or 227:BSD 223:AIX 133:an 121:In 45:by 1373:: 1099:, 721:. 695:. 658:. 636:^ 576:, 564:, 518:. 498:, 494:, 401:. 385:, 381:, 296:. 217:, 156:. 125:, 1193:, 1103:) 1095:( 863:e 856:t 849:v 832:. 807:. 782:. 757:. 733:. 706:. 666:. 343:. 112:) 106:( 101:) 97:( 87:· 80:· 73:· 66:· 39:.

Index


verification
improve this article
adding citations to reliable sources
"Preemption" computing
news
newspapers
books
scholar
JSTOR
Learn how and when to remove this message
computing
interrupting
executing
task
scheduler
protection ring
processor
context switching
Kernel preemption
kernel
interrupts
run to completion
race conditions
deadlock
system responsiveness
user mode
kernel mode
Solaris
Windows NT

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.