[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
|
|
Subscribe / Log in / New account

Restartable sequences

Restartable sequences

Posted Jul 9, 2015 7:16 UTC (Thu) by epa (subscriber, #39769)
Parent article: Restartable sequences

Perhaps a similar mechanism could be used for concurrency in general, assuming a single-CPU machine. The special section runs and if the process is pre-empted for any reason at all then the restart handler is called. Then the final commit is a single instruction. If the scheduler timeslice is big enough this might let multithreaded code be written without locking. Of course the process will starve if interrupts happen so often the special section can never complete.


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds