Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cooperative multitasking is still a thing #15

Open
gevial opened this issue Jul 25, 2023 · 1 comment
Open

Cooperative multitasking is still a thing #15

gevial opened this issue Jul 25, 2023 · 1 comment

Comments

@gevial
Copy link

gevial commented Jul 25, 2023

Hi,

Just noted in the end of Chapter 2 it reads “ For these reasons, the tech world switched to preemptive multitasking a long time ago and never looked back.”
It looks like a bit of overstatement because concepts like coroutines and green threads are quite popular nowadays, and we even have quite popular languages built on top of that (Go with its goroutines).
Appreciate language runtime-level cooperative multitasking is not the same as OS-level, but still worth mentioning I think.

Overall, a great write-up that I very much liked to read!

thanks!

@itoshkov
Copy link

The cooperative multitasking is still a thing, but on language level, not OS level. This is because on language level you don't have one of the problems - having malicious or badly designed program stealing all the resources. Your program still can be badly designed and have some thread steal all the CPU time allocated for the process for itself. But this is a bug in your program and you can fix it. Whereas if OS uses coop multitasking, bad design in somebody else's program can clog the whole system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants