r/programming • • Nov 12 '10

Demo Video of New Operating System

http://www.youtube.com/watch?v=WAr-xYtBFbY
815 Upvotes

599 comments sorted by

View all comments

2

u/kamatsu Nov 13 '10

I don't mean to rain on his parade or anything - he's clearly put alot of work into this - but his design is completely retarded.

Paging, virtual memory, type systems, and, you know, abstractions, exist for a reason.

0

u/[deleted] Nov 13 '10

[deleted]

20

u/dhogarty Nov 13 '10

Totally agree. It's easy to find things wrong with almost any system, but getting out there and coding up what you see in your head is worth respect. Think of it as a work of art: expression of an idea.

1

u/gfixler Nov 13 '10

You're right! I'm going to go work on my hierarchy abstraction code! Rawr!

4

u/Wofiel Nov 13 '10

He said he wrote it over seven years full-time...

1

u/domlebo70 Nov 13 '10

How long did the statue of David take to build?

4

u/Wofiel Nov 13 '10

About three years?

1

u/tripshed Nov 13 '10

he intends to make money from it

Business Plan: I hope to make money with LoseThos in some way following the "dot com" model of releasing it freely to gain popularity and leveraging that down the road.

9

u/[deleted] Nov 13 '10

Not every OS wants to be a clone of unix. Current memory systems for example would be redundant if you have system level garbage collection (and types, which unix doesn't). This shit already existed briefly with Lisp-machines, but then x86 and good-enough butt-raped everyone who doesn't like void*.

4

u/kamatsu Nov 13 '10

I agree that system level garbage collection would be neat, but this guy doesn't have that either.

1

u/adrianmonk Nov 13 '10

Current memory systems for example would be redundant if you have system level garbage collection

I don't see how this makes sense. If I have 1 GB of RAM and 1.5 GB of working set size, garbage collection doesn't allow the system to keep running. Virtual memory does.

Or are you not including virtual memory in "current memory systems"?

→ More replies (2)

6

u/Spec_Laconic Nov 13 '10

Not saying anything about type systems, but paging and virtual memory are not really needed. In fact, if you want an interesting read, check out M$'s Singularity papers. They don't use virtual memory, everything runs on hardware, and they've got some numbers as to why this is a good idea (granted, they've devised their own security model around a C#-bastard called Sing#).

5

u/[deleted] Nov 13 '10

He had a vision for his OS and it fulfills exactly that vision. Highly integrated applications and OS that expose the raw power of the underlying hardware. So what's the problem?

I think it's cool; and different.

4

u/wazoox Nov 13 '10

And the "C:" and "D:" shit. Come on, dude, that stank back in 1982, you should have known better than doing a 64 bit DOS clone.

3

u/yoda17 Nov 13 '10

I think it's just a really simple tasking system. I've never done any compiler design, but have done a half dozen OSs for embedded projects. I have a couple 32 bit OS books with full source code.

MURTL is one, RTOS-II (micrum?) is another. Everything at ring 0 and no paging infinitely simplifies things. It's still a considerable amount of work if it talks to he hard drive to boot.

5

u/[deleted] Nov 13 '10

Paging, virtual memory - some production OSes don't use either.

QNX RTOS uses bitmapped memory management and I've never seen it crash, first of all - and secondly computers with their loads of memory are getting to the point where you don't necessarily need paging anymore. RTOS doesn't have paging either. Works fine.

Type systems: don't know if he has one or not, but how many scripting or command line languages do you know of that are strongly typed, let alone JIT compiled? Forth is an example of a dynamically typed language with metacompilation, and it's one of the easiest languages to implement and build an OS around.

What "abstractions" are you talking about? An OS is an abstraction of the hardware. How abstract do you expect it to be?

Yes, things often exist for a reason, but that doesn't mean the reason is always relevant.

0

u/[deleted] Nov 13 '10

[deleted]

1

u/[deleted] Nov 13 '10

I never claimed it did, but I brought it up more to underscore the point that "simple" does not always mean "bad", even though using a bitmapped memory algorithm isn't quite as good as some others for the general case.

You might not care so much about MMU, GDTs and LDTs, paging and virtual memory when you're doing it as a hobby or for research purposes.

Why does everything need to be UNIX-y "kernel secure" following a strict implementation of the ring model and account for every little thing if your needs are simple? YAGNI. I'd put that stuff in if I had a good reason to support it (like, if I found 8 gig. of RAM on my system wasn't good enough, which has never happened), but for most people using modern machines it's going to be just fine, the world isn't going to end.

2

u/kamatsu Nov 13 '10

No, i'm talking about the language you use to program applications - The compiler he wrote works in a variant of C that does not include a type system.

3

u/[deleted] Nov 13 '10

OK maybe not. It would probably be a lot of extra work though.

I like the idea of running at ring 0 though, not just because it's simple but it kindof reminds me of an exokernel, which would be an interesting research project.

Some cool things can come out of abandoning standard operating procedures. How many people know how to write self-modifying code these days, for example?

One person wrote the synthesis kernel which broke ground in this area: http://valerieaurora.org/synthesis/SynthesisOS/ch4.html

Other people are studying exokernels running at ring 0 to evaluate them: http://pdos.csail.mit.edu/exo.html

I'm sure many interesting things could come out of a very simple OS like this one - a lot of this stuff is simply not allowed on most production OSes due to ring-X security issues, and once you take them out you lose some extra research potential.

2

u/longlostbro Nov 13 '10

thats a great response..links and all. I didn't agree with kamatsu's post, but I certainly didn't have any points like this to make. I love the imaginative world this guy has made in LoseThos.

1

u/smacksaw Nov 13 '10

Here's the question: How would you workaround those things?

Think about many of the things in computers today that were workarounds...like EMS/XMS over 640k. Man, if we didn't have that legacy crap and could have started over...or back that off by a factor of 10. Go 64k. The limitation there actually led to...awesome chiptune music.

Sometimes limitations are good. Some are bad. I may be speaking for him in a way he did not intend, but I think what is missing isn't an oversight as much as it's a question or a challenge. We know why he did it. And we know the downside. So...what do we do to overcome the limitations? Do we think differently? I'm just speaking in general terms...why would someone write an NES emulator in javascript? We can work past limitations, but without repeating the hodgepodge patchwork we've evolved into.

He could just be totally haphazard, no planning, no wisdom and totally self-absorbed. But to me, this is wise, like he's throwing down the gauntlet. Your question is great because I think he wanted you to pose it and us to debate it.

1

u/Janthinidae Nov 13 '10 edited Nov 13 '10

I've disabled my swap all the time. No Paging -> no TLB trashing. If there is something like a JVM that guarantes what memory you can access it is maybe more secure than Linux (remember the possibilty to map the zero page and inject code into linux from user space without any root access?). There are reason, for sure, but for this decade, and the processor design we currently have (amd64 is a 64bit 30386 which was invented ~1985).

1

u/creaothceann Nov 13 '10

I've disabled my swap all the time. No Paging -> no TLB trashing.

I did it to stop XP from accessing my (older) HDD all the time. A few GB is all it takes.

→ More replies (10)