OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Nov 12, 2019 12:53 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: To POSIX or not to POSIX
PostPosted: Tue Apr 09, 2019 2:46 pm 
Offline
Member
Member

Joined: Wed Jun 17, 2015 9:40 am
Posts: 501
Location: Athens, Greece
Hi,


I think all discussion is good discussion. But I'll zoom in on two sentences that are almost always very true:
Korona wrote:
Producing something is always better than producing nothing (regardless whether that means producing a POSIX-compatible or a POSIX-incompatible OS). I really do believe that the perfect is the enemy of the good.
Indeed, willing to do a project of a quadruple complexity and the quadruple time requirements than just a mostly unoriginal POSIX OS made me not willing to try to find some time for it (because I knew I hadn't enough time anyway). Thus, I've been producing almost nothing lately.

I think I decided it. I'll do a POSIX OS for now, just to have something to keep me going. Expect some bootloader questions during the next days. :-)


Regards,
glauxosdever


Top
 Profile  
 
 Post subject: Re: To POSIX or not to POSIX
PostPosted: Tue Apr 09, 2019 5:36 pm 
Offline
Member
Member
User avatar

Joined: Fri Feb 17, 2017 4:01 pm
Posts: 400
Location: Ukraine, Bachmut
I couldn't care less about linux, moreover - improving it, I've chosen to POSIX my (mostly non-existent yet) OS just for one reason, and it's practical - to attract possible future (or rather futuristic :D) users. to let them run those frigging console things. On ARM SBC landscape, they all are used to this environment (there is nothing except linux and its lame brother from the Corporation of Goodness), so providing them a basic set of familiar utilities and programs, would be good for the OS. And it's impossible to implement all that by a single person or even small group. So porting existing implementations comes to mind. Because of this combination, POSIX has been chosen to implement. Mostly because there are tons of prgrams openly available, written to POSSIX. But of course, it has danger of distracting interested people from targetting the main API. It's a tradeoff. Anyway, where are those "interested people"?
My OS is going to have environmental subsystems (ESSs) - API implementations, providing the environments for programs written for them. It's an NT concept. I want to create a minimalistic WinAPI-like subsystem (the main one), - I have no illusion to implement all that cosmos, just a basic set and POSIX subsystem. Binary or at least source code compatibility for the former would be so kewl, but it's infeasible. Binary compatibility is even irrelevant, because I target MIPS! :D NT begun on MIPS, but it was not today. Maybe for some silly simple WinAPI programs, it could be possible to port them over, but mostly I am left here with the need of writing my own stuff. So I have a broad field for my own API design desicions, creativity shortly speaking. for POSIX on the other hand, I'll try to keep the standard to easen porting (compiling) its programs to the OS. No X stuff though (I know it's not POSIX). just no no no. Every graphical need should be satisfied through the main WinAPI ESS. Graphical subsystem is considered an (important) extension of the base API. From this, we see, that it's possible to have hybrid programs having bindings both to WinAPI an POSIX. How is that feasible - subject for farther work. :D
Every ESS may be extended by frameworks and similar stuff the way it's defined for that API set. Every ESS consists of:
1) possible kernel module dealing with ESS specifics (like fork() thing mentioned above), that can be efficiently resolved only in kernel. Anything non-specific should be taken from the main (always present) ESS - WinAPI-like.
2) support processes, creating all the needed runtime aspects of the particular ESS.
3) dynamic libraries implementing the API in question.

Except the main ESS, every other ESS should be installed (and could be deinstalled). Any ESS except the main one can and do depend on other ESSs (at least main one, that means - we try not to duplicate things hardly). In theory, it's possible to add as many new ESSs (or extend existing ones) as possible. In theory. :) This is why I am looking at POSIX. I don't care too much of all uninspiring things in it, because I have a strong reason to still have it, that prevails over my reluctance to everything UNIX*. POSIX is the embodiment of UNIX literally.
* - except C. :)

_________________
future big goal: ANT - NT-like OS for mips, arm and x86.
current smaller goal: efify - UEFI for a couple of boards (mips and arm).


Top
 Profile  
 
 Post subject: Re: To POSIX or not to POSIX
PostPosted: Wed Apr 10, 2019 4:53 am 
Offline
Member
Member

Joined: Mon Jul 05, 2010 4:15 pm
Posts: 539
I suggest not to go POSIX for the kernel API as it would limit your own creativity, user space POSIX layer would be better. Also POSIX isn't a good fit for all operating system, for example fork support or IO handling. The reason you would want POSIX is that there is a lot of SW out there written for POSIX that you can reuse. However, more important than POSIX is full libc support and you can come quite far with that. Unfortunately, many seem to mix POSIX and standard C libraries in existing software.


Top
 Profile  
 
 Post subject: Re: To POSIX or not to POSIX
PostPosted: Wed Apr 10, 2019 8:48 am 
Offline
Member
Member

Joined: Wed Aug 30, 2017 8:24 am
Posts: 270
OSwhatever wrote:
Unfortunately, many seem to mix POSIX and standard C libraries in existing software.
Donning my application developer's hat for a moment, of course I mix POSIX and standard C. If I'm doing network code, I have literally no other choice. Standard C is very limited in what it allows you to do. Standard C has no directories, no sockets, no links, no file locks, no pipes. I might need some of those at some point or another.


Top
 Profile  
 
 Post subject: Re: To POSIX or not to POSIX
PostPosted: Wed Apr 17, 2019 4:11 am 
Offline
Member
Member
User avatar

Joined: Mon May 22, 2017 5:56 am
Posts: 146
That's odd, C was from the beginning expected to provide a Unix-like API even on non-Unix systems. (I think Dennis Ritchie wrote that. It's been a while.) I guess it needed to be divided up somehow, whether between two separate standards organizations or as a single standard with optional components. (That's almost microkernel vs. modular macrokernel. :)) As it is, with C having become such a minimal standard, I don't see anything wrong with taking the nicer parts of POSIX to use with your C.

_________________
Wir mussen wissen, wir werden wissen.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group