User-level threads....... with threads. - Paul Turner - Google

Channel:Linux Plumbers Conference · Length:33:59 · Published:2013-10-15 · Views:40985

Watch on YouTube

Summary

Paul Turner of Google presents kernel interfaces for user-level scheduling of real threads, aiming at a uniform synchronous programming model across C++, Java, Go and Python. It introduces the switchto-style system calls behind Google's fibers.

Why HN recommends it

HN cites it as the key explanation of cooperative, user-scheduled kernel threads and the prior art behind later async and coroutine debates.

Paul Turner explained this really well at this year's Linux Plumbers Conference. The whole talk is fantastic — HN, 2013

Operating systems & kernels · Linux & open-source ecosystems

Subtitles (excerpt)

all right sorry um okay so my name is Paul I work on Google I work I work at Google I work on CBU schedule related things and I'm going to be talking about some work we've been looking at um for Threads and programming models um in general so obviously the topic is a little controversial so I'm going to go into some background first uh when we say threading models there's kind of three traditional models of thread you've seen uh over the years the first is one to one where every user thread has a back and corresponding caral stack um this is actually currently pretty much ubiquitous everybody's doing this this is what Lin does this is what BSD does this is what solarus used to do windows does this um but there are some other ways of doing it uh previously we saw n to n to one and M to n uh the second is very a variant of the first in the first what this means is you have multiple user level Stacks that are multiplexed onto one colel stack and the idea is you can perform user level switches without talking to the kernel and this works but if that thread blocks on the Kernel stack all of those user context are bound to it so MTN was kind of a variant on this which tried to implement which tried to introduce multiple

On Hacker News

Paul Turner explained this really well at this year's Linux Plumbers Conference. The whole talk is fantastic, but the explanation of what pron is describing in particular (and how it could be improved) starts around 8:39: [VIDEO] — russell_h, 2013-12
Google needs to get off its ass and open source Fibers (not to be confused with Google Fiber). Fibers sparked plenty of joy in me back when I was at Google. It's just a more dignified way of doing things with threads, IMO. Here's the talk which, unfortunately, does not show the higher level APIs I'm talking about: [VIDEO] . If this were released today everyone would slap their foreheads and say "… — m0zg, 2021-11
Allow me to third that. It's one of dangers assuming that what you learned at university 15-20 years ago still applies. Another interesting talk: [0] (and even that is 5 years old) [0] [VIDEO] — lomnakkus, 2018-03
Related to this discussion, this talk on user-scheduled OS threads is really interesting. It's a shame no proposed implementation or experimental patches have appeared [VIDEO] — asb, 2016-12
Oh OK, I definitely could have written that better. From what I can tell, M:N threading has been thoroughly abandoned by Linux, but it might be worth revisiting given the horrendous I/O scaling of Linux kernel threads. I would imagine scheduling user threads cooperatively simplifies things a lot. Google has a very interesting talk about cooperative native thread scheduling, but they haven't upstr… — acconsta, 2015-09

Related videos