Live data from Hacker News

Interview with Andreas Kling of Serenity OS (2022)

corecursive.com

91–100 of 181 posts

Re: Interview with Andreas Kling of Serenity OS (2022)

#91
post #74

“An operating system is a collection of things that don’t fit inside a programming language; there shouldn’t be one” - Dan Ingalls 1981

That's a really terrible definition that dates from before multitasking, GUIs, and window systems and desktops.

Dan Ingalls wrote this in the Byte Magazine [1] dedicated to Smalltalk-80 in 1981. Smalltalk is its own operating system, it ran on the 1973 Alto that had 16 core processor and was multitasking. It was the first Graphical User Interface (GUI) that introduced the concept of desktops and window systems to the world. So his observation definitely did not date from before multitasking, GUIs, and window systems and desktops.

Smalltalk and its current incarnation Squeak and SqueakNOS (for Squeak No Operating System) is a virtual machine written in a high level programming language that contains everything that we now call an operating system including its device drivers. It runs on bare metal hardware.

Alan Kay his research group [2] attempted to make an entire personal computer operating system in just 10.000 lines of high level programming language and demonstrated that it is possible to do [3].

[3] answers the question "How would you build an operating system?" from OP.

[1] https://archive.org/details/byte-magazine-1981-08

[2] https://tinlizzie.org/IA/index.php/Papers_from_Viewpoints_Re...

[3] https://www.youtube.com/watch?v=ubaX1Smg6pY

Re: Interview with Andreas Kling of Serenity OS (2022)

#92
post #67

Earlier quoted context omitted.

You can definitely do that, it just means that userspace can now stall access to things unless you're very careful :) Like, one model (often used by EDR, which is why everyone hates them) is that every operation must be "authorized" so it doesn't go through until some evaluation happens. But this means the kernel has to ask a program for every operation, which is slow.

What's EDR? But yeah, I recognize that there need to be limits. I haven't really thought it through yet, heh.

EDR stands for Endpoint Detection and Response or Remediation.

Think modern antivirus. Less periodic scans and more continuous monitoring for anomalies.

Re: Interview with Andreas Kling of Serenity OS (2022)

#93
post #89

How does one get started on a toy OS? I don’t mean like concepts, but is there like a minimum viable OS .c file somewhere I can look at, with instructions for how to run it on “bare metal”? I assume I need a bootloader of some kind first? I’m just totally unsure where I’d even begin in a practical sense.

xv6 is a small one built for operating systems courses. We added functionality to it in my college operating systems course as a project.

Re: Interview with Andreas Kling of Serenity OS (2022)

#94
post #75

Serenity is one of the only recent OS projects that I think has any potential. It's a very high velocity, high quality project and I think that's down to the community culture Andreas has fostered. They aren't a load of fuddy-duddies who insist on using mailing lists and IRC. Nobody wants to collaborate with a load of grumpy greybeards.

You think a throw back Win 95 clones with UNIX-like internals is what modern users want?

We’ve moved on from “back in my day, the 80s…” computer UI nostalgia to 90s it seems.

10 more years we’ll have Mac OSX Snow Leopard clone project get abandoned (have had a lot of young Millennials and older GenZ hackers talk it up at me as peak computing)

Just because they’re not grumpy doesn’t mean they aren’t nostalgia driven iconoclasts making serenity out of disdain for status quo

Re: Interview with Andreas Kling of Serenity OS (2022)

#95
post #77

How would you build a minimal OS that can run just the simplest program you can think of? We start with the simplest program and work our way to what the OS needs. I’ll start: a program that asserts an 8bit number

That’s how games used to work. The “OS” was just some middleware library.

Re: Interview with Andreas Kling of Serenity OS (2022)

#96
post #89

How does one get started on a toy OS? I don’t mean like concepts, but is there like a minimum viable OS .c file somewhere I can look at, with instructions for how to run it on “bare metal”? I assume I need a bootloader of some kind first? I’m just totally unsure where I’d even begin in a practical sense.

I think tinycore would be your best bet. Its linux but stripped down to the very bare essentials

Tiny core Linux is far too heavy for what they're asking for. It's the very bare essentials for a user, not a bare metal programmer.

The OSDev wiki has lots of actually minimal examples for different architectures and boards

Re: Interview with Andreas Kling of Serenity OS (2022)

#98
post #53

Earlier quoted context omitted.

I have always found it interesting how people who come from the top down (software -> hardware) get confused by the low level stuff, and myself who came from the bottom up (hardware -> software) gets so confused by non-low-level code. I.e. I have no idea how to write a program for windows, it's totally alien to me and I cannot make sense of the code.

Perfect! I've worked with a lot of C kernel security devs and I don't think I've ever seen one of them write something not Cish, like python/ruby/go/etc. So, what exactly happens here - you need to write a kernel in some super fast low level language like C. I THINK The kernel that you write is probably talking to, for instance an Intel/AMD CPU, Motherboard, GPU, etc API to access the hardware. Is this close/wrong? I…

> Perfect! I've worked with a lot of C kernel security devs and I don't think I've ever seen one of them write something not Cish, like python/ruby/go/etc.

There are a couple of us true full-stack developers but you're very right that we're not common. Programming in low-level languages allow you to think about how, precisely, your memory will be laid out, but on the flip side, they require that you think about memory layouts. If you enjoy thinking about such things, you get used to planning for cache optimization and so on, and moving to python requires actively turning that part of your brain off and taking a „que cera cera" attitude to any performance consideration lower level than big-O notation.

Re: Interview with Andreas Kling of Serenity OS (2022)

#99
post #75

Serenity is one of the only recent OS projects that I think has any potential. It's a very high velocity, high quality project and I think that's down to the community culture Andreas has fostered. They aren't a load of fuddy-duddies who insist on using mailing lists and IRC. Nobody wants to collaborate with a load of grumpy greybeards.

You think a throw back Win 95 clones with UNIX-like internals is what modern users want? We’ve moved on from “back in my day, the 80s…” computer UI nostalgia to 90s it seems. 10 more years we’ll have Mac OSX Snow Leopard clone project get abandoned (have had a lot of young Millennials and older GenZ hackers talk it up at me as peak computing) Just because they’re not grumpy doesn’t mean they aren’t nostalgia driven i…

Down with graybeards, up with salt and pepperbeards

Re: Interview with Andreas Kling of Serenity OS (2022)

#100
post #2

I'm increasingly tempted to try my hand at making a toy OS - or at least a kernel. There's a few things I desperately want an operating system to do: 1. Have either database-like transactions or (at a minimum) write barriers for file operations. The current filesystem semantics are terrible for databases and other applications which need to not corrupt their data after a crash. fsync() is too heavy, because you can't…

> I want to try replacing all of that with a simple, unified API which lets you say "tell me the state of and tell me when it changes". Fuchsia's "Signals" are designed in that direction. You get a "handle" to a resource, and the resource has a 32-bit integer with signal bits that you could subscribe to. The meaning of each bit is different for each type of resource. (In general operating system terminology, "Signal"…

> In general operating system terminology, "Signal" means just a message without any payload that would have required any memory allocation.

Do you have a link for this? It's the first time I'm seeing signals described in terms of lack of memory allocation. I always thought the word "signal" basically meant user-mode interrupts - asynchronously hijacking a thread.

Post reply on HN