Design Internals of UNIX Non Blocking Sockets

Fundamental of asynchronous programming: Non Blocking Sockets Why async socket programming An application can create thousands of sockets but creating a thread per socket becomes infeasible for a large number (e.g. 100k sockets) An async framework consists non-blocking sockets and an event loop * The kernel allows applications to seek for an event * Application … More Design Internals of UNIX Non Blocking Sockets

Linux Device Driver Development: Block Device Driver

It is my very first interaction with Linux kernel at device driver level. My objective is to develop a block device driver, very simple, that just forward I/O requests to a virtual device. This post explains my observations limited to attacking the problem. Block v/s Character Device Linux support block and character device drivers. Only … More Linux Device Driver Development: Block Device Driver

Dissecting Python List allocator (CPython)

List is one of the most frequently used data structure in Python applications. The code for Python list object allocator is present in Python-2.7.5/Objects/listobject.c. Python allocates list objects in heap and uses underlying malloc based APIs. List is a container of Python object references. In plain C terminology. it is a dynamic array of pointers. … More Dissecting Python List allocator (CPython)

Openstack swift: EADDRNOTAVAIL error

Problem swift-bench keeps EADDRNOTAVAIL error with a highly concurrency setting and multiple swift-bench clients. Setup Ubuntu 13, Swift single machine installation (refer SAIO), swift-client runs local with no-proxy mode. Solution EADDRNOTAVAIL stands for either unavailability of ephemeral ports and a known kernel bug. Check your range of ports: $cat /proc/sys/net/ipv4/ip_local_port_range swift-bench in no-proxy mode uses … More Openstack swift: EADDRNOTAVAIL error