Servant or Nanny: The Geek’s Version

Last time I was talking about the choice between a servant or nanny. It was concluded that people tend to fall in favor of a nanny OS. This is even true for geeks, who work with servants based on a nanny framework.

This time, I will examine more into the details of system calls.

Andrew S. Tanenbaum wrote that exec() is "the most complicated system call in Linux" (second paragraph, pp. 740, Modern Operating Systems, 3rd).

By the way, exec() is a system call family. A member of that family typically allocates a new address space, loading a program, thus creating a new process. The syntax of execl() is loading a program, thus creating a new process. The syntax of execl() is

int execl(const char *path, const char *arg0,
const char *arg1, const char *arg2, ...
const char *argn, (const char*) 0);

It is amazing to Windows geeks, since the (not exactly) equivalent system call NtCreateProcess has the following syntax:

OUT PHANDLE ProcessHandle,
IN ACCESS_MASK DesiredAccess,
IN HANDLE ParentProcess,

Putting aside the fancy arguments, you have to get familiar with dreaded object types before taking any further move. To become a decent Windows geek, you still have to know concepts such as handle, object manager etc. In *nix, you don’t have to suffer from such a misery. The clearness and simplicity in the system calls of *nix lie in the fact that C language is tailored for *nix, as it was designed to do so. The concepts of C language work just in concert with the OS architecture of *nix.

And NtCreateProcess() is far from the most complicated system call in Windows. Now the way to become a Windows geek is much more bumpy than that to become a *nix geek. This is true for me, as it takes me less than half an hour before writing my first program of a new *nix system call, and several hours of a Windows work.

So what is my point?

To program in Windows spares a lot more effort than in *nix. The former is a nanny, and the latter is a servant.

A stereotypical nanny is an old aunt-aged female who takes excessive care of you. Sometimes you may just get annoyed because you want more of your freedom. Yet a nanny has to work as hard (if not harder) as a servant. She may spare a lot effort, but seldom expect any rewards.


About stoic
a geek, a researcher on the way, a real graduate student obsessed with culture, history and travelling

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: