I will write a series of posts about the context switch. Aiming to answer these questions:
- What is a context switch?
- When we need to switch context?
- What’s a process / thread / coroutine(user-space thread)?
- Applicable scenarios for each option.
- Digging into some coroutine libraries, the pros and cons of each.
- boost coroutine
- Why X uses coroutine? (e.g: gateway, crawler)
- Why X not use coroutine? (e.g: mysql)
- Why linux (and other os) doesn’t have coroutine built-in?
- why system call is slow/expensive?
There are 3 articles published currently: