What is your favourite system call?

Before the OpenSolaris user group meeting yesterday I had a internal meeting about forming an internal community for the Techies in Sun in the U.K., great meeting hopefully we will all get together in January on the same day as the January LOSUG meeting so that any one who wants to stay on for that can.

Anyway back to the topic.

As the meeting was closing and unfortunately after I had stopped taking notes, someone, asked us all: "What is your favourite Kernel Function", which everyone present translated as "What is your favourite system call?"

I was stuck between, ioctl(2) and mmap(2) (fork() had already been taken which was the other one on my instant list).

ioctl could actually also be my least favourte system call as it just feels wrong in so many cases, but on the otherhand the power of it essentially allowing you to do anything if you can be bothered to write a driver for it is fantastic.

However my winner was mmap(2). Being able to map files directly into the address space, being able to allocate and deallocate memory and have the deallocated memory returned to the system (yes you could do this with brk(2) but it is not really practical).

I'm also influenced by the fact I still remember the excitement when SunOS 4.0 came out and mmap(2) really came into being.

So what would be your favourte system call and why?

Tags:

Comments:

Post a Comment:
Comments are closed for this entry.
About

This is the old blog of Chris Gerhard. It has mostly moved to http://chrisgerhard.wordpress.com

Search

Archives
« April 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today