News for hackers. Stuff that matters.
Re:How to write a simple operating system by Jeaye on Sunday April 16, 2017 @02:41PM (#14126863)
That's not an operating system; it's a trivial kernel. Linux, in all its complexity, is still not an operating system; it's a kernel.

For anyone seriously interested in building something less trivial, I recommend starting here: http://wiki.osdev.org/Getting_Started

Re:How to write a simple operating system by gumby on Sunday April 16, 2017 @03:04PM (#14126983)
I've always thought of the operating system basically being everything in kernel space and as user space being peripheral.

I think we both have our biases.

Re:How to write a simple operating system by JustSomeNobody on Sunday April 16, 2017 @04:20PM (#14127312)
I'm with you. An OS is the core functionality on which everything else is hung. Code to fork a process? That's OS. Window manager? Not OS.
Re:How to write a simple operating system by jacquesm on Sunday April 16, 2017 @03:57PM (#14127201)
No, we don't have 'our biases' you're just plain wrong.

An operating system is everything needed to run a machine, a kernel is the foundation on top of which all that user space code runs.

So from a unix perspective everything in /usr/bin /bin /usr/local /etc, /boot and whatever other directories are there after you install makes up the operating system. Whatever you install after you get the base system up and running are applications, the programs we run on top of operating systems.

Now, the line can get a little blurry: is 'X' part of the operating system or not? Is your window manager, are the various built ins? Probably yes, but not always.

Is a text editor part of your OS? Probably not, but there is a good case to be made for the fact that without a text editor of any kind an operating system is fairly useless. But that doesn't make 'libreoffice' or 'sublime' part of your OS, those are applications.

For myself, I draw the line where a minimum base install stops, so everything up to and including window manager for a desktop machine (for a headless machine or server much less than that).

From a very technical perspective you could have an operating system that consists of just a kernel and one user space program, in that case the kernel really would be the entirety of the operating system. But that's a pretty rare case (though it can be done).

This is all written from a UNIX/Linux perspectie, for OS you might draw the lines a little different and for MS/Windows different still. But those basic principles apply.

Re:How to write a simple operating system by epboyd on Sunday April 16, 2017 @04:00PM (#14127214)
And what about a microkernel environment where device drivers, filesystems, etc. are in user space?
Re:How to write a simple operating system by jacquesm on Sunday April 16, 2017 @04:04PM (#14127236)
They're still part of the operating system.

What you are trying to get at is that everything in userspace is not part of the kernel and that is correct. But the kernel does not make a complete operating system.

This is also the reason why the whole GNU/Linux thing existed, without the userland that GNU provided the Linux kernel would have been pretty useless.

Re:How to write a simple operating system by kiriakasis on Monday April 17, 2017 @04:54AM (#14129902)
My position is a little in between, an OS is the finished you are delivering.

Linux is an OS, just a terrible one without any GNU.

Re:How to write a simple operating system by JustSomeNobody on Sunday April 16, 2017 @04:16PM (#14127293)
> No, we don't have 'our biases' you're just plain wrong.

You sound defensive.

Re:How to write a simple operating system by oneweekwonder on Sunday April 16, 2017 @03:52PM (#14127184)
Re:How to write a simple operating system by greenhouse_gas on Sunday April 16, 2017 @07:01PM (#14128044)
I think that it's a semantic thing, but most "simple OS in 24 hours" projects only talk about the kernel because the rest is easy/off-topic.

ls? Basic sh (without the scripting part, but there are tutorials on building compilers/interpreters)? Basic init?

Re:How to write a simple operating system by DSMan195276 on Sunday April 16, 2017 @08:50PM (#14128532)
I think it's worth adding though - articles like these aren't kernel's, they're just programs running on the bare-metal. This stuff (booting the computer and getting to a sane environment) is really the easy part, designing the kernel and creating the kernel's facilities that it provides to programs is the bulk of the work when writing a kernel/OS.

That's not to say these articles are bad, they're still fun, but it's like having a "simple emulator in 24 hours" that just sets up a simple GUI and doesn't actually start designing the emulator. It's technically the start of an emulator, but while that part might actually be complicated it's still not really that relevant to designing an emulator.