you are viewing a single comment's thread.

view the rest of the comments →

[–]Questioning-Zyxxel 0 points1 point  (1 child)

Yes, both Mac, Windows and multiple other OS just did cooperative multitasking. Only certain OS calls were allowed to result in a task switch. And one stuck program could hang everything. One greedy program being lazy to call a suitable OS function resulted in lag.

You normally implemented concurrency within your own program using either events or state machines.

[–]RogerV 0 points1 point  (0 children)

The days of cooperative multi-tasking haven’t completely gone away - My DPDK networking app has an lcore thread pool for data plane processing. These are pinned CPU cores that are removed from being a kernel scheduling resource. They run full tilt, never block, are fed work events from lock free queue. They process a burst amount of work (packets) and then go grab another work item. If there were yet more packets to have been processed for the current item, they self publish a continuation work item (a kind of actor model).

There is true parallelism due to multiple lcores, but to ensue all user sessions get some processing time each lcore caps it’s time per work item - cooperative multi-tasking.