Knowledge (XXG)

Cooperative multitasking

Source 📝

187:
As a cooperatively multitasked system relies on each process regularly giving up time to other processes on the system, one poorly designed program can consume all of the CPU time for itself, either by performing extensive calculations or by
200:
environment, this is a hazard that is often considered to make the entire environment unacceptably fragile, though, as noted above, cooperative multitasking has been used frequently in server environments including NetWare and CICS.
164:, that feature a single-threaded event-loop in their runtime. This contrasts with cooperative multitasking in that await cannot be invoked from a non-async function, but only an async function, which is a kind of 171:
Cooperative multitasking allows much simpler implementation of applications because their execution is never unexpectedly interrupted by the process scheduler; for example, various
447: 394: 145:, which is a network-oriented operating system, used cooperative multitasking up to NetWare 6.5. Cooperative multitasking is still used on 723: 694: 270: 93:
Although it is rarely used as the primary scheduling mechanism in modern operating systems, it is widely used in memory-constrained
82: 498: 442: 355: 417: 387: 610: 508: 909: 888: 437: 422: 161: 483: 468: 427: 649: 596: 664: 503: 380: 699: 518: 478: 473: 432: 742: 493: 208:
multitasking interrupts applications and gives control to other processes outside the application's control.
488: 241: 126: 876: 815: 704: 684: 633: 591: 205: 176: 105:
subsystem. Cooperative multitasking was the primary scheduling scheme for 16-bit applications employed by
56: 659: 625: 527: 463: 78:
whose role is limited to starting the processes and letting them return control back to it voluntarily.
40: 55:
to another process. Instead, in order to run multiple applications concurrently, processes voluntarily
856: 830: 60: 825: 777: 654: 52: 762: 669: 197: 138: 281: 871: 820: 752: 709: 550: 106: 71: 851: 403: 193: 44: 333: 306: 795: 757: 728: 94: 17: 881: 805: 767: 639: 216: 212: 134: 118: 48: 903: 747: 586: 540: 674: 800: 782: 565: 555: 545: 153: 172: 157: 122: 114: 110: 737: 644: 570: 535: 189: 165: 866: 67:
because all programs must cooperate for the scheduling scheme to work.
861: 790: 560: 146: 142: 130: 372: 810: 102: 98: 376: 356:"Python behind the scenes #12: How async/await works in Python" 846: 211:
The potential for system hang can be alleviated by using a
215:, often implemented in hardware; this typically invokes a 27:
Computer multitasking that does not preempt processes
839: 776: 722: 683: 618: 609: 579: 526: 517: 456: 410: 334:"Async Rust: Cooperative vs Preemptive scheduling" 388: 8: 264: 262: 242:"Definition of non-preemptive multitasking" 97:and also, in specific applications such as 615: 523: 395: 381: 373: 175:inside the application do not need to be 129:for 16-bit legacy applications, and the 236: 234: 232: 228: 192:; both would cause the whole system to 152:Cooperative multitasking is similar to 63:. This type of multitasking is called 59:periodically or when idle or logically 332:Kerkour, Sylvain (January 25, 2022). 74:of an operating system is known as a 7: 133:Versions of Mac OS X prior to 25: 499:Object-oriented operating system 269:Joe Bartel (November 5, 2011). 509:Supercomputer operating system 1: 271:"Non-Preemptive Multitasking" 484:Just enough operating system 469:Distributed operating system 597:User space and kernel space 37:non-preemptive multitasking 926: 504:Real-time operating system 18:Nonpreemptive multitasking 700:Multilevel feedback queue 695:Fixed-priority preemptive 479:Hobbyist operating system 474:Embedded operating system 307:"Preemptive multitasking" 743:General protection fault 494:Network operating system 448:User features comparison 119:classic Mac OS 83:asynchronous programming 33:Cooperative multitasking 489:Mobile operating system 127:preemptive multitasking 81:This is related to the 592:Loadable kernel module 156:in languages, such as 660:Process control block 626:Computer multitasking 464:Disk operating system 76:cooperative scheduler 41:computer multitasking 910:Concurrent computing 831:Virtual tape library 423:Forensic engineering 70:In this scheme, the 840:Supporting concepts 826:Virtual file system 354:Skvortsov, Victor. 763:Segmentation fault 611:Process management 313:. November 2, 2009 287:on August 19, 2019 47:never initiates a 897: 896: 753:Memory protection 724:Memory management 718: 717: 710:Shortest job next 605: 604: 404:Operating systems 107:Microsoft Windows 72:process scheduler 16:(Redirected from 917: 852:Computer network 616: 524: 397: 390: 383: 374: 367: 366: 364: 362: 351: 345: 344: 342: 340: 329: 323: 322: 320: 318: 303: 297: 296: 294: 292: 286: 280:. Archived from 275: 266: 257: 256: 254: 252: 238: 95:embedded systems 45:operating system 39:, is a style of 35:, also known as 21: 925: 924: 920: 919: 918: 916: 915: 914: 900: 899: 898: 893: 835: 796:Defragmentation 781: 772: 758:Protection ring 727: 714: 686: 679: 601: 575: 513: 452: 406: 401: 371: 370: 360: 358: 353: 352: 348: 338: 336: 331: 330: 326: 316: 314: 305: 304: 300: 290: 288: 284: 273: 268: 267: 260: 250: 248: 240: 239: 230: 225: 185: 141:applications. 123:Windows 9x 115:Windows NT 111:Windows 95 91: 51:from a running 28: 23: 22: 15: 12: 11: 5: 923: 921: 913: 912: 902: 901: 895: 894: 892: 891: 886: 885: 884: 882:User interface 879: 869: 864: 859: 854: 849: 843: 841: 837: 836: 834: 833: 828: 823: 818: 813: 808: 806:File attribute 803: 798: 793: 787: 785: 774: 773: 771: 770: 768:Virtual memory 765: 760: 755: 750: 745: 740: 734: 732: 720: 719: 716: 715: 713: 712: 707: 702: 697: 691: 689: 681: 680: 678: 677: 672: 667: 662: 657: 652: 647: 642: 640:Context switch 637: 622: 620: 613: 607: 606: 603: 602: 600: 599: 594: 589: 583: 581: 577: 576: 574: 573: 568: 563: 558: 553: 548: 543: 538: 532: 530: 521: 515: 514: 512: 511: 506: 501: 496: 491: 486: 481: 476: 471: 466: 460: 458: 454: 453: 451: 450: 445: 440: 435: 430: 425: 420: 414: 412: 408: 407: 402: 400: 399: 392: 385: 377: 369: 368: 346: 324: 298: 278:classiccmp.org 258: 227: 226: 224: 221: 217:hardware reset 213:watchdog timer 184: 181: 90: 87: 49:context switch 26: 24: 14: 13: 10: 9: 6: 4: 3: 2: 922: 911: 908: 907: 905: 890: 887: 883: 880: 878: 875: 874: 873: 870: 868: 865: 863: 860: 858: 855: 853: 850: 848: 845: 844: 842: 838: 832: 829: 827: 824: 822: 819: 817: 814: 812: 809: 807: 804: 802: 799: 797: 794: 792: 789: 788: 786: 784: 779: 775: 769: 766: 764: 761: 759: 756: 754: 751: 749: 748:Memory paging 746: 744: 741: 739: 736: 735: 733: 730: 725: 721: 711: 708: 706: 703: 701: 698: 696: 693: 692: 690: 688: 682: 676: 673: 671: 668: 666: 663: 661: 658: 656: 653: 651: 648: 646: 643: 641: 638: 635: 631: 627: 624: 623: 621: 617: 614: 612: 608: 598: 595: 593: 590: 588: 587:Device driver 585: 584: 582: 578: 572: 569: 567: 564: 562: 559: 557: 554: 552: 549: 547: 544: 542: 539: 537: 534: 533: 531: 529: 528:Architectures 525: 522: 520: 516: 510: 507: 505: 502: 500: 497: 495: 492: 490: 487: 485: 482: 480: 477: 475: 472: 470: 467: 465: 462: 461: 459: 455: 449: 446: 444: 441: 439: 436: 434: 431: 429: 426: 424: 421: 419: 416: 415: 413: 409: 405: 398: 393: 391: 386: 384: 379: 378: 375: 357: 350: 347: 335: 328: 325: 312: 308: 302: 299: 283: 279: 272: 265: 263: 259: 247: 243: 237: 235: 233: 229: 222: 220: 218: 214: 209: 207: 204:In contrast, 202: 199: 195: 191: 182: 180: 178: 174: 169: 167: 163: 159: 155: 150: 148: 144: 140: 136: 132: 128: 124: 120: 117:, and by the 116: 112: 108: 104: 100: 96: 88: 86: 84: 79: 77: 73: 68: 66: 62: 58: 57:yield control 54: 50: 46: 43:in which the 42: 38: 34: 30: 19: 783:file systems 675:Time-sharing 629: 359:. Retrieved 349: 337:. Retrieved 327: 315:. Retrieved 310: 301: 289:. Retrieved 282:the original 277: 249:. Retrieved 245: 210: 203: 190:busy waiting 186: 170: 151: 147:RISC OS 137:used it for 92: 80: 75: 69: 64: 36: 32: 31: 29: 801:Device file 791:Boot loader 705:Round-robin 630:Cooperative 566:Rump kernel 556:Multikernel 546:Microkernel 443:Usage share 361:January 30, 339:January 30, 311:riscos.info 154:async/await 65:cooperative 731:protection 687:algorithms 685:Scheduling 634:Preemptive 580:Components 551:Monolithic 418:Comparison 317:August 15, 291:August 15, 251:August 15, 223:References 206:preemptive 158:JavaScript 85:approach. 821:Partition 738:Bus error 665:Real-time 645:Interrupt 571:Unikernel 536:Exokernel 246:pcmag.com 177:reentrant 173:functions 166:coroutine 149:systems. 125:used non- 904:Category 867:Live USB 729:resource 619:Concepts 457:Variants 438:Timeline 196:. In a 183:Problems 862:Live CD 816:Journal 780:access, 778:Storage 655:Process 561:vkernel 428:History 411:General 143:NetWare 139:classic 135:Leopard 131:PowerPC 109:before 101:or the 61:blocked 53:process 670:Thread 541:Hybrid 519:Kernel 198:server 162:Python 872:Shell 811:Inode 285:(PDF) 274:(PDF) 89:Usage 433:List 363:2023 341:2023 319:2015 293:2015 253:2015 194:hang 113:and 103:JES2 99:CICS 889:PXE 877:CLI 857:HAL 847:API 650:IPC 160:or 121:. 906:: 632:, 309:. 276:. 261:^ 244:. 231:^ 219:. 179:. 168:. 726:, 636:) 628:( 396:e 389:t 382:v 365:. 343:. 321:. 295:. 255:. 20:)

Index

Nonpreemptive multitasking
computer multitasking
operating system
context switch
process
yield control
blocked
process scheduler
asynchronous programming
embedded systems
CICS
JES2
Microsoft Windows
Windows 95
Windows NT
classic Mac OS
Windows 9x
preemptive multitasking
PowerPC
Leopard
classic
NetWare
RISC OS
async/await
JavaScript
Python
coroutine
functions
reentrant
busy waiting

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