Cooperative Multitasking Scheduling

Discussions focus on cooperative versus preemptive thread scheduling, green threads, protothreads, and concurrency models in systems like Go goroutines, Erlang processes, and embedded environments.

πŸ“‰ Falling 0.4x Programming Languages
2,397
Comments
19
Years Active
5
Top Authors
#7427
Topic ID

Activity Over Time

2008
3
2009
30
2010
34
2011
39
2012
46
2013
98
2014
80
2015
95
2016
127
2017
128
2018
164
2019
144
2020
266
2021
195
2022
192
2023
291
2024
270
2025
182
2026
13

Keywords

e.g JS nodejs.org BEAM XNU GHC DNS L1141 IPC VM threads scheduler thread priority cooperative blocking locking yield os task

Sample Comments

cakoose β€’ Aug 22, 2011 β€’ View on HN

This paper uses cooperatively scheduled threads (i.e. no preemption or concurrent execution of threads), which means you don't have to deal with synchronization.

jesse__ β€’ Jan 18, 2026 β€’ View on HN

Yeah man, you're running on a multitasking OS. Just let the scheduler do the thing.

fluoridation β€’ Dec 12, 2023 β€’ View on HN

Sound like it's a hardware implementation of cooperative multitasking.

Spivak β€’ Oct 17, 2021 β€’ View on HN

Don’t you still have to worry about this since OS threads can be arbitrarily preempted?

kragen β€’ Jan 3, 2024 β€’ View on HN

not exactly; see https://en.wikipedia.org/wiki/Cooperative_multitasking

bad_login β€’ Dec 9, 2016 β€’ View on HN

preemptive green thread solve that.

touisteur β€’ May 24, 2020 β€’ View on HN

Giving a chance to threads/processes with the same priority to be scheduled without doing any I/O or syscall? Used this once.

Yoric β€’ Mar 20, 2023 β€’ View on HN

Still trying to understand: what's the difference between "forc[ing] preemption" and cooperative threading?

phamilton β€’ Feb 9, 2016 β€’ View on HN

My understanding is that isn't really preemption, rather it's cooperative scheduling. As soon as the scheduler hand execution to the actor, everything else in the system has to hope there isn't a bug in the actor that permanently ties up that thread.

greesil β€’ Oct 18, 2013 β€’ View on HN

How is this different from protothreads?