-
Notifications
You must be signed in to change notification settings - Fork 3
System API
clarus edited this page Sep 26, 2014
·
23 revisions
It seems hard and even impossible to have fully asynchronous system API on widespread operating systems such as Linux. Asynchronous calls can be emulated using one thread per call, but threads are expensive.
Waiting for this problem to be properly solved, we will design an asynchronous and OS independent API, interacting with the OS through a proxy. The proxy communicates with the application using a pipe, and tries to be as less blocking as possible.
We describe here a simple API which will be used to start with. There is no error handling, and read/write operations are of unbounded size.
Log.write message
File.read file_name
System.exit
TCPClientSocket.write id message
TCPClientSocket.close id
TCPServerSocket.bind port
TCPServerSocket.close id
File.read file_name content
TCPClientSocket.accepted id
TCPClientSocket.read id counter content
TCPClientSocket.written id
TCPServerSocket.bound id
- Scalable Event Multiplexing: epoll vs. kqueue: blog post comparing APIs to process events in Unix.
- Kernel Asynchronous I/O (AIO) Support for Linux : Asynchronous file handling on Linux.
- MegaPipe: A New Programming Interface for Scalable Network I/O
- Lwt: a Cooperative Thread Library
- Implémentations efficaces de la concurrence sous Windows