portability improvements for non-Linux systems

Cathey, Jim jcathey at ciena.com
Mon Apr 5 16:25:31 UTC 2010


>The problem is more with locating the PAGE_SIZE constant: Linux
>defines it as (sysconf(_SC_PAGESIZE)) in <sys/user.h>, and Hurd
>defines it to a constant value in <mach/vm_param.h>.

The thought that PAGE_SIZE is a constant is also somewhat parochial,
we had DNIX systems in the 80's where it in fact was not a constant.
(Per-process it was, but processes could have different page sizes
depending on how big they needed to get.  This was particularly
important on machines of the day with rather limited memory, and
the fact that statistically one half page per memory segment per
process goes to waste.  Smaller pages for smaller processes saved
memory.)

Then of course there was the whole class of machines, now pretty
much in the past, with variable segment MMU's that didn't do demand
paging at all.

Paging is an artifact of current system design.  I don't think that
long-lived API's should be predicated on anything to do with it.

>Hurd implements the filesystem as a series of "translator" processes.

This DNIX also did!  Network protocols were also in the filesystem
namespace.  It was pretty cool, you could debug just about _anything_
using standard system tools...

-- Jim






More information about the busybox mailing list