NOTE:This blog had a good run, but is now in retirement.
Please see Practicing Ruby for Gregory's more recent works.

Eric Wong's Posts ( feed)

USP: fcntl: file descriptor flags vs file status flags

Eric explains how to use fcntl system call from Ruby to set various properties of IO objects.

2012-09-23 10:43 (View Comments)

USP: Handling excessive CPU Usage within a Process

Eric presents an example of a process which monitors itself for excessive CPU usage derived from PulseAudio source code.

2012-03-27 01:11 (View Comments)

USP: Implementing signal handlers - some caveats

Today Eric talks about how to implement signal handlers properly and what pitfalls to look out for.

2012-03-27 00:25 (View Comments)

USP: Unix signals - primitive interprocess communication

Today Eric talks about signal handling basics.

2012-03-20 21:56 (View Comments)

USP: Unix processes and their attributes

Today Eric presents various bits of information that the kernel manages for a process.

2011-11-11 22:37 (View Comments)

USP: IO#dup and the dup(2) system call

Eric explains duplicating file descriptors.

2011-10-19 04:59 (View Comments)

USP: Unix time and the Ruby Time class

Eric explains Unix time concepts and how time related functionality is accessed from Ruby.

2011-09-24 02:28 (View Comments)

USP: An introduction to the Unix pipe

We learn what pipes are and how they are realized in a Unix kernel.

2011-09-23 00:35 (View Comments)

USP: Directories on the filesystem

This article explains how hierarchical filesystems are organized and what utilities Ruby provides for access to directories and directory entries.

2011-09-23 00:21 (View Comments)

USP: Regular files and metadata

This article presents the various types of meta data of a file which can be obtained from the kernel. We also learn how to access this information from Ruby.

2011-09-20 04:13 (View Comments)

USP: basic IO methods

This article introduces basic methods used for doing IO and how they map to system calls.

2011-09-19 21:28 (View Comments)

USP: The Ruby IO Class

Class IO is at the core of Ruby's IO functionality. We also look at what types of buffers are active in an application and whether and how they are shared.

2011-09-17 03:33 (View Comments)

USP: The Unix object model (as seen in procfs)

This is an introduction to places where information about processes in a running Unix system can be found.

2011-09-17 03:32 (View Comments)

USP: Avoiding system calls

Eric describes common strategies to reduce the number of system calls done. This does make sense since they come with an overhead.

2011-09-15 00:34 (View Comments)

USP: System calls in Unix

Explanation of the different functional layers involved in eventually getting the kernel to do something for us.

2011-09-15 00:34 (View Comments)

USP: Traditional Unix filesystem behavior

POSIX filesystems are byte oriented and the abstraction is difficult to adhere for certain use cases.

2011-09-14 23:55 (View Comments)

USP: An overview of the Unix filesystem

In this installment Eric explains basic features of the Unix hierarchical filesystem including virtual filesystems.

2011-09-14 23:30 (View Comments)

USP: The Unix object model (as seen from user space)

Eric introduces fundamental concepts of the runtime architecture of a Unix system: processes and file descriptors.

2011-09-13 04:24 (View Comments)

USP: Prerequisite Knowledge

This is the first article in the series of our guest author Eric Wong about Unix systems programming (USP).

2011-09-13 01:29 (View Comments)