3 ms·
It may have been at the time, if UI responsiveness was important to you. On the Mac (maybe not a good example because the original one didn’t even have true co
by Someone 4y ago
It may have been at the time, if UI responsiveness was important to you.
On the Mac (maybe not a good example because the original one didn’t even have true cooperative multitasking), it certainly helped make opening and closing menus snappy, for example. When you opened a menu, the OS copied the bits behind it, and when it closed, it copied those bits back, without triggering a redraw of those bits. It could do that became it knew nothing would be drawn while the menu was open.
Pre-emptive multitasking also requires code to be re-entrant or to use locks. Re-entrant code uses more memory (can’t use as many globals), and locks slow down code. With memory being scarce and CPUs slow, those were more costly at the time than they are today.
On the other hand, it turned “when do I tell the OS it can run another process now if it wants to do so” into a black art.