Non-preemptive multitasking

Now that memory is more prevelant and we have powerful multi core CPU, can we get non-preemptive multi tasking?

Why was this concept bandpned?

Conversation 23 comments

  • harrymyhre

    Premium Member
    12 April, 2020 - 10:47 pm

    <p>Sorry – abandoned. </p>

  • jimchamplin

    Premium Member
    13 April, 2020 - 12:11 am

    <p>You're talking about cooperative multitasking. Windows 3.x and the classic Mac OS used this system… and it stinks. One errant application can hog the CPU, and if it crashes, control doesn't get returned to the OS. On a single-core system that means the whole system's dead. On a multicore system…</p><p><br></p><p>… I honestly can't see it going any different. Lose a core? </p><p><br></p><p>Cooperative multitasking is simply inferior.</p>

    • ErichK

      Premium Member
      13 April, 2020 - 3:39 pm

      <blockquote><em><a href="#538101">In reply to jimchamplin:</a></em></blockquote><p>I was just about to ask you why we didn't just do pre-emptive multitasking right from the start, but it looks like that's been answered — for PCs it was too processor intensive…?</p><p><br></p><p>Boy when I bought my boxed copy of Windows 95 when it came out and I saw that it said "Pre-emptive Multitasking" right on the package (for 32-bit apps, anyway), I breathed a sigh of relief and said, "Finally."</p>

      • jimchamplin

        Premium Member
        13 April, 2020 - 5:32 pm

        <blockquote><em><a href="#538170">In reply to ErichK:</a></em></blockquote><p>Some systems did, but it really depended on the CPU. Amigas did preemptive on the 68000 while Mac Systems 1-6 were cooperative mainly because the system was designed to only run a single application at a time. Tools like Switcher and Multifinder added more modern abilities but even then it was only task switching only one application had control at a time. System 7-OS 9.2.2 were fully cooperative. On the other hand, A/UX which was Apple's GUI-based UNIX was preemptive.</p><p><br></p><p>Some versions of UNIX I <em>think</em> could handle preemptive multitasking on relatively lowly hardware. Don't quote me on that.</p><p><br></p><p>Edit: Minor typos.</p>

        • hrlngrv

          Premium Member
          13 April, 2020 - 6:25 pm

          <p><a href="https://www.thurrott.com/forums/microsoft/windows/thread/non-preemptive-multitasking#538184&quot; target="_blank"><em>In reply to jimchamplin:</em></a></p><blockquote>Some versions of UNIX . . .</blockquote><p>Be careful with that terminology or The SCO Group's bankrupt estate might sue you.</p><p>IIRC, The Mark Williams Company made and sold an OS named Coherent which did run on 8086/8088 CPUs.</p>

          • jimchamplin

            Premium Member
            14 April, 2020 - 8:46 am

            <blockquote><em><a href="#538192">In reply to hrlngrv:</a></em></blockquote><p>The shambling corpse of SCO still fires off C&amp;Ds from a spectral law office in Sun City, AZ.</p><p><br></p><p>And I completely forgot Coherent.</p>

  • hrlngrv

    Premium Member
    13 April, 2020 - 3:11 am

    <p>What do you believe is wrong with preemptive multitasking?</p>

  • wright_is

    Premium Member
    13 April, 2020 - 3:35 am

    <p>Are you talking co-operative, as in Windows 3, task switching (as in Mac System pre OS X) or do you mean a real time kernel?</p><p>Co-op and task switching were dropped for good reasons, as @jimchamplin says. Mainframes, with hundreds or thousands of users use pre-emptive multi-tasking long before Windows tried multi-tasking. Windows 3 did co-op, because the processor wasn't powerful enough for the overhead of pre-emptive. As soon as they could write a dedicated Kernel that could do pre-emptive multi-tasking and the processors were powerful enough, they switched (Windows NT). Windows 9x lagged behind for a long time, due to compatibility issues, but it was eventually dropped for "real multi-tasking".</p><p>Microsoft did play with a real time Kernel for Windows, but it was very niche and never mainstream – most tasks just don't need it.</p><p>Linux has a real time Kernel option, as does QNX. They are certified. But, again, it only has limited use. Mainly things like automotive or industrial controls. Normal computing just don't need this level of control – it can actually have negative consequences for a normal, desktop operating system.</p>

  • harrymyhre

    Premium Member
    13 April, 2020 - 12:00 pm

    <p>What I don’t like about today’s systems is what happened while I was typing the first message. A background process did something to my browser session while I was typing. </p><p><br></p><p>we have notification centers now so nothing should be allowed to take away the focus from my application. But it happens all the time. I never even used OS/2 but I knew exactly what they were trying to do. </p>

    • hrlngrv

      Premium Member
      13 April, 2020 - 1:35 pm

      <p><a href="https://www.thurrott.com/forums/microsoft/windows/thread/non-preemptive-multitasking#538141&quot; target="_blank"><em>In reply to Harrymyhre:</em></a></p><p>Sounds like you mean focus stealing. That's not the OS's fault. That's ill-behaved application software including extensions. Well, semantics: if an OS provides a mechanism for one process taking focus without explicit user interaction, then the OS provides the mechanism for focus stealing, but it's not the intent of the OS developer that processes steal focus when actual users are actively interacting with another process.</p>

    • jimchamplin

      Premium Member
      13 April, 2020 - 5:26 pm

      <blockquote><em><a href="#538141">In reply to Harrymyhre:</a></em></blockquote><p>OS/2 was preemptively multitasked. Both at the OS/2 prompt and in the Presentation Manager/Workplace Shell.</p><p><br></p><p>And @hrlngrv is correct. That's not the multitasking model, that's software design.</p>

  • ErichK

    Premium Member
    13 April, 2020 - 5:14 pm

    <blockquote><em><a href="#538178">In reply to hrlngrv:</a></em></blockquote><p>It really seems like over the years of its lifespan, the percentage of applications that existed that "behaved well" by only calling DOS and BIOS function calls were in the single digits.</p>

  • jimchamplin

    Premium Member
    13 April, 2020 - 5:23 pm

    <blockquote><em><a href="#538178">In reply to hrlngrv:</a></em></blockquote><p>Did Xenix offer preemptive multitasking on the 808x? I can't remember off the top of my head.</p>

    • hrlngrv

      Premium Member
      13 April, 2020 - 6:16 pm

      <p><a href="https://www.thurrott.com/forums/microsoft/windows/thread/non-preemptive-multitasking#538182&quot; target="_blank"><em>In reply to jimchamplin:</em></a></p><p>Didn't Xenix require 80286 CPUs?</p>

      • jimchamplin

        Premium Member
        13 April, 2020 - 6:34 pm

        <blockquote><em><a href="#538191">In reply to hrlngrv:</a></em></blockquote><p>An XT was the minimum. 8088/8086 and Z8000 systems were supported. Third party versions targeted the M68K and PDP-11. I'm just not sure if the 808x versions had true multitasking. </p><p><br></p><p>I'm certain an AT was required for multi<em>user</em> operation on the IBM-compatible side, but not sure about single-user multitasking.</p>

  • waethorn

    13 April, 2020 - 7:48 pm

    <p>Does anyone want to describe how preemptive multitasking relates to CPU prefetch and look-ahead? You know, the thing that gives modern CPU's their "secret sauce" to getting faster burst speed over non-indexed lookups that is the cause of all of the CPU security problems discovered in the past few years?</p>

    • wright_is

      Premium Member
      14 April, 2020 - 9:24 am

      <blockquote><em><a href="#538201">In reply to Waethorn:</a></em></blockquote><p>They aren't really related. In fact, the less multi-tasking a processor does (regardless of the sort), the more efficient the look-ahead works (and the safer it is, because you are not sharing the processor between tasks).</p><p>Look-ahead still works with multi-tasking, but it needs more cache and better branch prediction. And that is what causes the problems with Spectre &amp; Co. The processor design is optimized for performance, whereas in a modern OS you need to optimize for security.</p><p>But who is going to buy a "slower" PC next time round, just because it is "safer"?</p>

      • waethorn

        14 April, 2020 - 2:45 pm

        <blockquote><em><a href="#538285">In reply to wright_is:</a></em></blockquote><p><em>But who is going to buy a "slower" PC next time round, just because it is "safer"?</em></p><p><br></p><p>Anyone concerned with security and is fed up with the cutting of more and more corners on modern CPU architecture.</p><p><br></p><p>Any anyone why they buy systems from companies like Purism and System76 with older processors and Intel ME completely disabled as well as open source firmware (albeit with Intel's FSP as a binary blob which is still a requirement because Intel still won't allow outside code auditing by open-sourcing it).</p>

        • wright_is

          Premium Member
          15 April, 2020 - 7:16 am

          <blockquote><em><a href="#538362">In reply to Waethorn:</a></em></blockquote><p>The problem is, 99% of users have no concept of what security is and have no idea about the corner cutting. They just want a newer, faster computer.</p>

          • waethorn

            15 April, 2020 - 10:32 am

            <blockquote><em><a href="#538460">In reply to wright_is:</a></em></blockquote><p>And that's the problem with the computer industry as a whole.</p>

    • beckoningeagle

      Premium Member
      14 April, 2020 - 10:13 am

      <blockquote><em><a href="#538201">In reply to Waethorn:</a></em></blockquote><p>It doesn't. The multi-tasking happens at the OS level where it schedules the use of the CPU by the different processes. The pre-fetch and look-ahead happens in the processor to execute these instructions faster by taking shortcuts such as branch prediction. </p>

      • waethorn

        14 April, 2020 - 2:51 pm

        <blockquote><em><a href="#538299">In reply to BeckoningEagle:</a></em></blockquote><p>Well considering that mitigation can be bandaged up with software, albeit with a huge performance hit (hardware fixes via firmware patches still slow things down, although not as much), I'm not convinced the design of the software around hardware features isn't part of the problem. Branch prediction doesn't exist in every processor either. But where it does, it leaves a big security hole open. SMT/Hyperthreading and VT are just a catalyst.</p>

        • beckoningeagle

          Premium Member
          14 April, 2020 - 4:51 pm

          <blockquote><em><a href="#538365">In reply to Waethorn:</a></em></blockquote><p>It may very well be part of the problem, but it is not related to pre-emptive multi-tasking which was the original question.</p>

Windows Intelligence In Your Inbox

Sign up for our new free newsletter to get three time-saving tips each Friday

"*" indicates required fields

This field is for validation purposes and should be left unchanged.

Thurrott © 2024 Thurrott LLC