UNIX Codebase/Distros?

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
Post Reply
User avatar
PavelChekov
Member
Member
Posts: 113
Joined: Mon Sep 21, 2020 9:51 am
Location: Aboard the Enterprise

UNIX Codebase/Distros?

Post by PavelChekov »

In the 80s, it seems there were a plethora of UNIXes, but when you look them up it says, something along the lines of:
- SunOS used the 4.3BSD codebase
- Solaris is based off of SVR4
- AIX uses SVR3

What does this mean? Are they just like distros, different userspaces for one of these established kernels?

Thanks
USS Enterprise NCC-1701,
The Final Frontier,
Space,
The Universe

Live Long And Prosper

Slava Ukraini!
Слава Україні!
kzinti
Member
Member
Posts: 898
Joined: Mon Feb 02, 2015 7:11 pm

Re: UNIX Codebase/Distros?

Post by kzinti »

User avatar
PavelChekov
Member
Member
Posts: 113
Joined: Mon Sep 21, 2020 9:51 am
Location: Aboard the Enterprise

Re: UNIX Codebase/Distros?

Post by PavelChekov »

kzinti wrote:SVR3 = System V Release 3

See https://en.wikipedia.org/wiki/List_of_Unix_systems
I understand what the terms mean just not how AIX uses the SVR3 codebase.
USS Enterprise NCC-1701,
The Final Frontier,
Space,
The Universe

Live Long And Prosper

Slava Ukraini!
Слава Україні!
kzinti
Member
Member
Posts: 898
Joined: Mon Feb 02, 2015 7:11 pm

Re: UNIX Codebase/Distros?

Post by kzinti »

You'd have to look at the source code of both AIX and SVR4 to answer that question. Or perhaps do some research on the origin of AIX and how it was build.

No single answer will explain the relationship between all Unix variants.
User avatar
PavelChekov
Member
Member
Posts: 113
Joined: Mon Sep 21, 2020 9:51 am
Location: Aboard the Enterprise

Re: UNIX Codebase/Distros?

Post by PavelChekov »

kzinti wrote:You'd have to look at the source code of both AIX and SVR4 to answer that question.
So it's more of just a fork of these existing codebases? Like OpenBSD to 4.3BSD?
USS Enterprise NCC-1701,
The Final Frontier,
Space,
The Universe

Live Long And Prosper

Slava Ukraini!
Слава Україні!
kzinti
Member
Member
Posts: 898
Joined: Mon Feb 02, 2015 7:11 pm

Re: UNIX Codebase/Distros?

Post by kzinti »

Likely to be the case, yes.
thewrongchristian
Member
Member
Posts: 422
Joined: Tue Apr 03, 2018 2:44 am

Re: UNIX Codebase/Distros?

Post by thewrongchristian »

PavelChekov wrote:In the 80s, it seems there were a plethora of UNIXes, but when you look them up it says, something along the lines of:
- SunOS used the 4.3BSD codebase
- Solaris is based off of SVR4
- AIX uses SVR3

What does this mean? Are they just like distros, different userspaces for one of these established kernels?

Thanks
The kernel will have been vendor ported, and probably had the most modifications from the UNIX (BSD, SysV) on which it was based. Early version of AIX, for example, used a kernel that was not even written in C, AIX kernel prior to v3 used a PL/I based microkernel, with the AIX personality on top (I'm not sure if the UNIX personality was implemented in C.)

The SunOS kernel was heavily modified from the BSD kernel from which it was derived. So much so, that the SunOS 4 virtual memory design completely replaced the VAX based virtual memory from BSD 4.2, and was in fact ported to be used as VM design for the SVR4 kernel (this was basically an agreement between Sun and AT&T, and I think is what triggered SunOS 5 becoming a SVR4 based system.)

OSF/1, developed by a consortium including DEC, HP and IBM, used the Mach microkernel, with a BSD kernel personality bolted on top, and a BSD user space, and so was BSD based. Ditto for NextSTEP.

So the kernel is necessarily vendor specific. The SysV or BSD-ness is basically the API to user space and the commands presented to the user. That would be the system call and libc API, differences in terminal handling (BSD and SysV had incompatible terminal C interfaces) and the shell and user commands.

A BSD based system with SysV enhancements would have been provided with a SysV compatibility library and perhaps also SysV commands.

A SysV based system with BSD enhancements would similarly have been provided with a BSD compatibility library and commands.

In contrast, Linux distros tend to be a different user space on top of the common Linux kernel, though the user space used by most distros tends to be largely GNU based, so you could say that while SunOS 4 was BSD based and SunOS 5 was SVR4 based, something like Redhat is GNU based, and it's the reason GNU have such a bee in their bonnet about calling Linux based distros GNU/Linux.

Of course, in any case, much of the user space interface presented to the user is not any of SVR4, BSD or GNU, but in fact X11 released under the MIT license from Project Athena.
User avatar
PavelChekov
Member
Member
Posts: 113
Joined: Mon Sep 21, 2020 9:51 am
Location: Aboard the Enterprise

Re: UNIX Codebase/Distros?

Post by PavelChekov »

From some stuff I read, I get the idea that the AT&T System V kernel was just a reference implementation for others to be based on. Is this correct? Were the other kernels structured similarly?
USS Enterprise NCC-1701,
The Final Frontier,
Space,
The Universe

Live Long And Prosper

Slava Ukraini!
Слава Україні!
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: UNIX Codebase/Distros?

Post by Solar »

Every good solution is obvious once you've found it.
Post Reply