J
J de Boyne Pollard
M> The library functions which are included to allow process
M> launch, forking, and termination, imply that it is both
M> possible and desirable for a process to fork itself. This is
M> a fundamental part of the Unix thought process, but is
M> not essential for a working OS.
There are no Standard C Library functions for process forking or
overlaying. The fork() and execve() functions are part of the C
language bindings to POSIX. They are not parts of the Standard C
Library.
M> Why should the user have access to memory mapping,
M> allocation and de-allocation routines? [...]
Similarly, mmap() is not a Standard C Library function.
M> What I am trying to say is not that these things are right
M> or wrong, but that the implementation of the functions,
M> and thus the library, pre-supposes that the OS will work
M> in the Unix manner.
The error that you are making in your argument is that it is entirely
circular. You are taking functions from the POSIX C language bindings
and arguing that they pre-suppose a Unix-like operating system. Of
course they do. POSIX is the _definition_ of a Unix-like operating
system. However, you cannot make such an argument based upon
functions from the _Standard C Library_. The Standard C Library does
not either pre-suppose or mandate a Unix-like operating system.
Indeed, freestanding implementations of the C or C++ languages do not
pre-suppose operating systems at all.
M> my point is basically that the C library defines the API of the OS.
This
M> forces the OS to have that API, and this leaves very little leeway
for
M> the OS designer to deviate from another UNIX clone.
That point is wrong, as explained above. The Hurd and Plan 9 are
existence proofs of its incorrectness, as are the many embedded
systems written in the C and C++ languages.
M> launch, forking, and termination, imply that it is both
M> possible and desirable for a process to fork itself. This is
M> a fundamental part of the Unix thought process, but is
M> not essential for a working OS.
There are no Standard C Library functions for process forking or
overlaying. The fork() and execve() functions are part of the C
language bindings to POSIX. They are not parts of the Standard C
Library.
M> Why should the user have access to memory mapping,
M> allocation and de-allocation routines? [...]
Similarly, mmap() is not a Standard C Library function.
M> What I am trying to say is not that these things are right
M> or wrong, but that the implementation of the functions,
M> and thus the library, pre-supposes that the OS will work
M> in the Unix manner.
The error that you are making in your argument is that it is entirely
circular. You are taking functions from the POSIX C language bindings
and arguing that they pre-suppose a Unix-like operating system. Of
course they do. POSIX is the _definition_ of a Unix-like operating
system. However, you cannot make such an argument based upon
functions from the _Standard C Library_. The Standard C Library does
not either pre-suppose or mandate a Unix-like operating system.
Indeed, freestanding implementations of the C or C++ languages do not
pre-suppose operating systems at all.
M> my point is basically that the C library defines the API of the OS.
This
M> forces the OS to have that API, and this leaves very little leeway
for
M> the OS designer to deviate from another UNIX clone.
That point is wrong, as explained above. The Hurd and Plan 9 are
existence proofs of its incorrectness, as are the many embedded
systems written in the C and C++ languages.