clarification : exokernel .. ?

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!
SpooK
Member
Member
Posts: 260
Joined: Sun Jun 18, 2006 7:21 pm

Re: Yup ...

Post by SpooK »

SandeepMathew wrote:Guys .. I think i understood the concept ..., But why then the
exokernel systems are not so popular ... :?
Developers seem more interested in hybrid kernels these days. The exokernel is still mostly a "proof of concept" project by MIT.

Also, the purpose of an exokernel can be quite easily dismissed with the advent of true hardware multiplexing (e.g. AMD's SVM) and the like.
SandeepMathew wrote: :evil: Even microkernel systems are not so popular when compared
to Monolithic systems with support for loadable modules ... What
is the main reason for this ...? I guess only mach microkernel is
really popular ... What is the main reason ..? Is this something
similar to tcp/ip vs osi ..?
In the end, all of those Ring-3 drivers and task switches count... against the cycles available for all other processes.

As I said above, the "Hybrid" kernel seems to be the way to go these days. Taking the speed and security of a monolithic kernel and injecting the stable concepts of a microkernel to find a happy medium.

Please note that security and stability are interchangeable on some points between the two kernel styles.

As for the "mono vs. micro" warriors, the truth always lies somewhere in the middle... and that middle is the hybrid kernel method.
SandeepMathew wrote: Sligthly off-topic still :- dont you think linux is becoming more windowish
day by day .... :?: :?: :?:
No. Linux (kernel) is still Linux. X11 is still X11. Bash is still Bash.

It's projects like Gnome, KDE, XFCE and Fluxbox and distributions like Ubuntu and Gentoo that are making it more user friendly.
Avarok
Member
Member
Posts: 102
Joined: Thu Aug 30, 2007 9:09 pm

Post by Avarok »

:D

To defend my earlier statement, the x86 platform is still inherently insecure because of certain CPU bugs - privileged things being available in Ring 3. Because this problem is 100% widespread and no solution is yet available, I'm not going to disseminate more information than I should.
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies.
- C. A. R. Hoare
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Post by Alboin »

Avarok wrote:and no solution is yet available
One could use another processor. ;)
C8H10N4O2 | #446691 | Trust the nodes.
User avatar
AndrewAPrice
Member
Member
Posts: 2298
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Post by AndrewAPrice »

Avarok wrote::D

To defend my earlier statement, the x86 platform is still inherently insecure because of certain CPU bugs - privileged things being available in Ring 3. Because this problem is 100% widespread and no solution is yet available, I'm not going to disseminate more information than I should.
The OS should cater for this: e.g. scan through a program before executing it for privileged instruction (simpler with Execute Xor Write then you can be sure the instructions won't change during execution), and if for some reason the GDT/IDT/page directory/control register etc changes, the OS could periodically check and change them back, and if something accidentally causes a reboot, then there should be someway of configuring what drivers/program should start automatically (via a recovery disk? GRUB modules?) so you can eliminate the defective code yourself.
My OS is Perception.
DeletedAccount
Member
Member
Posts: 566
Joined: Tue Jun 20, 2006 9:17 am

Post by DeletedAccount »

Linux is becoming windowish .. I meant with respect to some features
not the UI .. eg Earlier linux was a plain monolithic kernel . Now
it has support for kernel modules ... It has become more modular
like windows ...

Kernel Colonel : I thought Mac Os X was a Microkernel ... It is something
which i read from Silberchatz .. Thanks for the information ... I dont know
much details of the Mac Os X kernel ....


According to a survey much of the OS crashes occur due to faulty device
drivers .. this is where exokernel comes in .. by moving driver code to
user space should give more stablity ... In principle there should be
less swiches from user mode to kernel mode ... But it seems ...during
the implementation .. same problems will crop up again ...

Guess Aspect Oriented Systems and Language Based Protection (slower with some overhead ) is the way to go ... see JX operating system ...
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post by Brynet-Inc »

So if a kernel is modular.. it's trying to be "windowish"? :?

Nonsense.. :roll:
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Post by Alboin »

SandeepMathew wrote:Linux is becoming windowish .. I meant with respect to some features
not the UI .. eg Earlier linux was a plain monolithic kernel . Now
it has support for kernel modules ... It has become more modular
like windows ...
To my knowledge, Microsoft hasn't yet patented the idea of using modules....yet....
SandeepMathew wrote: According to a survey much of the OS crashes occur due to faulty device
drivers .. this is where exokernel comes in .. by moving driver code to
user space should give more stablity ... In principle there should be
less swiches from user mode to kernel mode ... But it seems ...during
the implementation .. same problems will crop up again ...

Guess Aspect Oriented Systems and Language Based Protection (slower with some overhead ) is the way to go ... see JX operating system ...
I have to disagree. Really, language based protection? I like the idea that the programmer should know, to a certain extent, what he is doing. If he needs a babysitter, than he shouldn't be programming to begin with. I like speed. A lot. I'd rather have a crash every few years than have a slow system. (I've only had 2 crashes on my Linux box thus far; both of which were due to Beryl trashing my display.)
C8H10N4O2 | #446691 | Trust the nodes.
Crazed123
Member
Member
Posts: 248
Joined: Thu Oct 21, 2004 11:00 pm

Post by Crazed123 »

And I like the idea of not rewriting decades worth of work on compilers just because some jackass has started the Church of the Safe Language and actually thinks he can compile C into something safe.

He can't. The machine model implied by the C spec is inherently and implicitly unsafe!

Ditto on C++, Objective C, Object Pascal, assembler, and anything else with pointers.
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Post by Colonel Kernel »

SandeepMathew wrote:Linux is becoming windowish .. I meant with respect to some features
not the UI .. eg Earlier linux was a plain monolithic kernel . Now
it has support for kernel modules ... It has become more modular
like windows ...
At best that's a very passing resemblance. It's like saying two people look alike because they both have brown eyes. It just isn't enough.
Kernel Colonel : I thought Mac Os X was a Microkernel ... It is something
which i read from Silberchatz .. Thanks for the information ... I dont know
much details of the Mac Os X kernel ....
The textbooks seem to be frequently wrong about which modern OSes are microkernels, but I think OS X is especially susceptible to this myth because of its association with Mach.
According to a survey much of the OS crashes occur due to faulty device drivers .. this is where exokernel comes in .. by moving driver code to user space should give more stablity ... In principle there should be less swiches from user mode to kernel mode ... But it seems ...during
the implementation .. same problems will crop up again ...
I think you're conflating exokernels and microkernels. The ideas are somewhat orthogonal. The exokernel concept can be implemented as a microkernel, but it need not be. Xok for example has kernel-mode disk and network drivers, but they are extremely bare-bones and only provide the ability to multiplex disk blocks and packets, respectively. The network driver is especially interesting in that it uses filters sent to it from user space that are expressed in a declarative language designed just for this purpose.
Alboin wrote:Really, language based protection? I like the idea that the programmer should know, to a certain extent, what he is doing. If he needs a babysitter, than he shouldn't be programming to begin with.
You clearly haven't spent any time out there in the real world of software development. People make mistakes all the time. The "babysitting" you speak of has other names -- "unit testing", "code reviews", and if you're lucky, "compiler errors". Guess which one is the cheapest and most effective way to find problems before your code is released into the wild?

To give a concrete example, the project I'm working on right now is all being developed in C++. The core of the team has 5 developers including me, with an average number of years' experience in C++ development of about 5 or 6 (I'm at the high end with over 10 years' experience). Almost everyone on the team has put segfault-causing bugs in the code, repeatedly. Except me of course, because I've been burned so many times that I'm extra careful now. :) These are capable people who have been around C and C++ for a while, and problems like these still happen. It is really, really difficult to focus on solving the problem at hand when you're constantly battling low-level issues like memory management and type safety.

(Disclaimer: I know it's possible to write very abstract C++ using libraries like Boost and STL... this project I'm working on is signifcantly lower-level than that (lots of raw buffer manipulation and data conversion) and must be portable to *nixes where these libraries don't work well, if at all.)
I like speed.
What makes you think language-based protection is necessarily slow? It does not imply interpretation, or JIT, or reflection, or any of that stuff.
I'd rather have a crash every few years than have a slow system. (I've only had 2 crashes on my Linux box thus far; both of which were due to Beryl trashing my display.)
I'd rather have a fast system that doesn't crash, and I think so would most of the rest of the computer-using populace.
Crazed123 wrote:And I like the idea of not rewriting decades worth of work on compilers just because some jackass has started the Church of the Safe Language and actually thinks he can compile C into something safe.
The way you go on you'd think someone was asking you, personally to rewrite decades worth of work on compilers. If other people want to do it, or are getting paid to do it, relax and let them try!
He can't. The machine model implied by the C spec is inherently and implicitly unsafe!

Ditto on C++, Objective C, Object Pascal, assembler, and anything else with pointers.
That's why there are other languages.

The big problem I see with language-based protection is not speed, or the extra compiler R&D, but the lack of choice of languages it seems to imply for application developers. That more than anything else makes me skeptical of the idea, just like the idea of having a universal common language run-time... some languages are just too different for it to make sense.
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
Avarok
Member
Member
Posts: 102
Joined: Thu Aug 30, 2007 9:09 pm

Post by Avarok »

I seem to love playing devil's advocate so may I?

~~~
Exokernel:

Xok fails as an example of a pure exokernel. A pure exokernel doesn't necessarily move everything to ring 3, it just necessarily foists the abstraction completely on someone else. Zero abstraction is perfect, if it's multiplexed and secure.

To that end, something like VirtualIron or Xen is an excellent exokernel in that the user code is securely (we hope) multiplexed on top of what it thinks is raw machine hardware.

~~~

In the "real world of software development", we're all still using 860 languages that are subsets of what's possible in assembler. We're all still using verbose lengths of text to express our code. We're still getting hung up on syntax errors and array bounds exceptions.

My computer still has a floppy controller and 16 bit code to manage hardware I don't have that existed 20 years ago. My BIOS is still proprietary locked down **** that hasn't had anything but caked on "features" since the day I was born. It also only boots 2 seconds faster now than DOS did off that 5 1/4".

I've more or less given up on programming as a whole because of the fundamental flaw in the cornerstone of the whole process. Fix the cornerstone, and the rest of the building will practically land in your lap.

I'd start with the BIOS if you're a systems programmer, or the means of expressing assembler/machine code graphically if you're a general programmer. I like IDA Pro's graph functionality.

With love,
The Devil. :twisted:
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Post by Alboin »

Colonel Kernel wrote:
Alboin wrote:Really, language based protection? I like the idea that the programmer should know, to a certain extent, what he is doing. If he needs a babysitter, than he shouldn't be programming to begin with.
You clearly haven't spent any time out there in the real world of software development. People make mistakes all the time. The "babysitting" you speak of has other names -- "unit testing", "code reviews", and if you're lucky, "compiler errors". Guess which one is the cheapest and most effective way to find problems before your code is released into the wild?
Please note the boldness of
to a certain extent
I wasn't referring to type checking, and lighter systems, but to languages that are run on a VM\and or checked for every possible little bug at runtime. I'm all for language based checking, that is, to a certain degree.
C8H10N4O2 | #446691 | Trust the nodes.
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Post by Colonel Kernel »

Alboin wrote:Please note the boldness of to a certain extent
I noticed. I was responding to this part mainly:
Alboin wrote:If he needs a babysitter, than he shouldn't be programming to begin with.
My point was that you'd be surprised just how perfect a programmer has to be to not need at least a little "babysitting" now and then, at least in the absence of decent type safety guarantees.
I wasn't referring to type checking, and lighter systems, but to languages that are run on a VM\and or checked for every possible little bug at runtime.
As I said language based protection != heavyweight VM, necessarily. You can certainly do it that way if you want crappy performance, but it's not the only way.
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
Crazed123
Member
Member
Posts: 248
Joined: Thu Oct 21, 2004 11:00 pm

Post by Crazed123 »

And I object to the safe languages on the basis that I can't kernel hack with them (why not a statically-typed safe language that allowed pointers in declared-unsafe sections just like Object Pascal allows inlined assembler blocks?) and their lack of manual, byte-by-byte memory manipulation makes interfacing them to foreign code rather difficult.

I remember how easy it was to generate Delphi units for major C++ libraries (ran on same OS and same processor == WORKED, with as little as a non-default calling convention), and I cry when I read about "foreign function interfaces" of safer languages like Haskell or ML.
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Post by Colonel Kernel »

Crazed123 wrote:And I object to the safe languages on the basis that I can't kernel hack with them (why not a statically-typed safe language that allowed pointers in declared-unsafe sections just like Object Pascal allows inlined assembler blocks?) and their lack of manual, byte-by-byte memory manipulation makes interfacing them to foreign code rather difficult.
C# can do all that. Of course a kernel needs unsafe code somewhere. How does your need for kernel hacking conflict with taking advantage of optional type safety in the kernel, and enforcing mandatory type safety of user processes that run in the same address space? If all you ever do is hack the kernel, what do you care about how those user processes run?
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
User avatar
AndrewAPrice
Member
Member
Posts: 2298
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Post by AndrewAPrice »

Colonel Kernel wrote:Of course a kernel needs unsafe code somewhere.
You never know. One day MS and Intel will design a new processor where everything must run on safe code. Think along the lines of an MSIL processor?
My OS is Perception.
Post Reply