# A brief history of select(2)

DevFeed: [A brief history of select(2)](<https://devfeed.tech/articles/a-brief-history-of-select-2-38956.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2016-11-01-a-brief-history-of-select2>)

Author: Marek

Published: 2016-10-31T23:00:00Z

Content type: article

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [async](<https://devfeed.tech/topics/async.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [Process](<https://devfeed.tech/topics/process.md>), [freebsd](<https://devfeed.tech/topics/freebsd.md>), [io\_uring](<https://devfeed.tech/topics/io-uring.md>), [ML model versioning](<https://devfeed.tech/topics/ml-model-versioning.md>)

Tags: [abstractions](<https://devfeed.tech/tags/abstractions.md>), [api](<https://devfeed.tech/tags/api.md>), [api-design](<https://devfeed.tech/tags/api-design.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [batch-processing](<https://devfeed.tech/tags/batch-processing.md>), [batching](<https://devfeed.tech/tags/batching.md>), [bind](<https://devfeed.tech/tags/bind.md>), [blocking](<https://devfeed.tech/tags/blocking.md>), [bsd](<https://devfeed.tech/tags/bsd.md>), [c](<https://devfeed.tech/tags/c.md>), [channel](<https://devfeed.tech/tags/channel.md>), [communication](<https://devfeed.tech/tags/communication.md>), [history](<https://devfeed.tech/tags/history.md>), [i-o](<https://devfeed.tech/tags/i-o.md>), [linux](<https://devfeed.tech/tags/linux.md>), [multiplexing](<https://devfeed.tech/tags/multiplexing.md>), [select](<https://devfeed.tech/tags/select.md>), [syscall](<https://devfeed.tech/tags/syscall.md>), [unix](<https://devfeed.tech/tags/unix.md>)

## AI overview

The article traces `select(2)` to the need to handle multiple I/O streams in one process. Early Unix programs mostly used blocking I/O, and `cu` relied on two processes to read and write concurrently. With 4.2BSD's sockets and applications such as Blit's virtual terminals, remote login clients, and later `inetd`, that model was insufficient: `select` let a program wait until a descriptor was ready, while nonblocking reads alone could require polling. The article argues that multiplexing arose from practical needs around networking, terminal work, and shared server state, rather than from a Unix design based on CSP-like channels. It also qualifies the history: Rob Pike's update says earlier Blit work used Greg Chessons' `mpx`, and notes that `select` and sockets appeared around the same time but were not necessarily designed as a single system. A later update corrects the claim that nonblocking I/O did not exist before 1983, citing earlier TTY support.

## Source excerpt

A brief history of select(2) I/O multiplexing part #1 Recently I've been thinking about the multiplexing in Linux, namely the syscall. I was curious if is better or worse than the or . I was wondering if there was a benefit in batching calls. But let's step back for a while, before we start a serious discussion we need to get some context. Most importantly - is file descriptor multiplexing an aberration or a gentle extension to the Unix design philosophy's?