Writing a truly UNIX OS

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

Writing a truly UNIX OS

Post by PavelChekov »

Pretty much everything "unix" these days is actually Unix-like, but would it be possible to write an actual UNIX system, that is based off the original codebase, that would be a truly "modern" OS (e.g., 64-bit, multi-processing)?
USS Enterprise NCC-1701,
The Final Frontier,
Space,
The Universe

Live Long And Prosper

Slava Ukraini!
Слава Україні!
User avatar
iansjack
Member
Member
Posts: 4695
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Writing a truly UNIX OS

Post by iansjack »

What, like Solaris? Or the various BSDs?
User avatar
PavelChekov
Member
Member
Posts: 113
Joined: Mon Sep 21, 2020 9:51 am
Location: Aboard the Enterprise

Re: Writing a truly UNIX OS

Post by PavelChekov »

iansjack wrote:What, like Solaris?
Yes, I guess I should be more clear: would it be possible to make an open-source hobby OS, not a commercial one, that is actually UNIX?
USS Enterprise NCC-1701,
The Final Frontier,
Space,
The Universe

Live Long And Prosper

Slava Ukraini!
Слава Україні!
User avatar
iansjack
Member
Member
Posts: 4695
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Writing a truly UNIX OS

Post by iansjack »

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

Re: Writing a truly UNIX OS

Post by PavelChekov »

iansjack wrote:What, like FreeBSD?
BSD has (to my knowledge) been rewritten to the point of not containing a single line of AT&T code.
USS Enterprise NCC-1701,
The Final Frontier,
Space,
The Universe

Live Long And Prosper

Slava Ukraini!
Слава Україні!
User avatar
iansjack
Member
Member
Posts: 4695
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Writing a truly UNIX OS

Post by iansjack »

But the original AT&T code is copyright. You couldn’t use it in an open source OS.
nexos
Member
Member
Posts: 1079
Joined: Tue Feb 18, 2020 3:29 pm
Libera.chat IRC: nexos

Re: Writing a truly UNIX OS

Post by nexos »

illumos is a fork of when Solaris was open source. That is about as close as you can get to an open source true Unix.. TBH though, I'm sure there isn't any AT&T code left.
"How did you do this?"
"It's very simple — you read the protocol and write the code." - Bill Joy
Projects: NexNix | libnex | nnpkg
User avatar
iansjack
Member
Member
Posts: 4695
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Writing a truly UNIX OS

Post by iansjack »

Just as an aside, if we are talking about the original Unix code base, it was written in PDP11 assembly language. It’s difficult to think that that code would be very relevant today.
linguofreak
Member
Member
Posts: 510
Joined: Wed Mar 09, 2011 3:55 am

Re: Writing a truly UNIX OS

Post by linguofreak »

iansjack wrote:Just as an aside, if we are talking about the original Unix code base, it was written in PDP11 assembly language. It’s difficult to think that that code would be very relevant today.
The very most original Unix code base was in PDP-7 assembly language, but that and the early PDP-11 releases were completely internal to Bell Labs and only ran on a few machines ever. By the time Unix was unleashed upon the world, it was written mostly in C.
linguofreak
Member
Member
Posts: 510
Joined: Wed Mar 09, 2011 3:55 am

Re: Writing a truly UNIX OS

Post by linguofreak »

iansjack wrote:But the original AT&T code is copyright. You couldn’t use it in an open source OS.
v6, v7, (PDP-11) and 32v (the VAX port of v7) are now under BSD-style licenses. System III and later are still proprietary.
User avatar
Voldemort
Posts: 12
Joined: Mon May 02, 2022 2:03 pm

Re: Writing a truly UNIX OS

Post by Voldemort »

Hi Pavel,
Yes, I guess I should be more clear: would it be possible to make an open-source hobby OS, not a commercial one, that is actually UNIX?
The tuhs project might be of some interest to you. https://minnie.tuhs.org/cgi-bin/utree.pl

xv6 is something you may find interesting as well.

RetroBsd might interest you too.
https://github.com/RetroBSD/retrobsd

Another interesting approach might be to get old unix'es working on new risc v boards as a proof of concept.
See this project for instance.
https://github.com/mit-pdos/xv6-riscv


~Voldemort~
~Voldemort~
Post Reply