Layered vs. Non-layered
-
- Posts: 8
- Joined: Thu Jan 22, 2009 12:10 pm
Layered vs. Non-layered
It makes perfect sense to me for an operating system to be built in "layers", as in the Scheduler is build first, and then higher level abstractions built on top of that, for example.
But I have heard that operating systems can be built in a modular, "non-layered" approach, with implementation different from the layered approach. This intrigues me, because, well, It just seems so unnatural to me that I have a hard time imagining how a non-layered operating system might be implemented, and why anyone would want to do it that way. I'm curious, is all.
Discussion?
But I have heard that operating systems can be built in a modular, "non-layered" approach, with implementation different from the layered approach. This intrigues me, because, well, It just seems so unnatural to me that I have a hard time imagining how a non-layered operating system might be implemented, and why anyone would want to do it that way. I'm curious, is all.
Discussion?
- AndrewAPrice
- Member
- Posts: 2299
- Joined: Mon Jun 05, 2006 11:00 pm
- Location: USA (and Australia)
Re: Layered vs. Non-layered
An operating system without abstractions? No filesystems or files, merely binary data. No processes, merely threads associated with a page directory. No input handlers, merely interrupts forwarded to who ever wants it.
?
?
My OS is Perception.
Re: Layered vs. Non-layered
Could you give concrete examples of what you're trying to say?
Valix is an experiment in an interpreted userspace with object-oriented and functional design patterns. Developers needed! Join #valix on irc.freenode.net
Re: Layered vs. Non-layered
Why cant a modular operating system be built in "layers"?But I have heard that operating systems can be built in a modular, "non-layered" approach
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
Re: Layered vs. Non-layered
By any chance, are you meaning an Exokernel? Those have very little abstraction (basically, just enough to be able to multiplex the hardware).
-
- Member
- Posts: 153
- Joined: Sun Jan 07, 2007 9:40 am
- Contact:
Re: Layered vs. Non-layered
WTH are you talking about? Please get familiar with the lingo. http://wiki.osdev.org/Kernels There's a language that OS developers use and it would be wise to learn it if you're attempting to have a meaningful discussion.WechtleinUns wrote:It makes perfect sense to me for an operating system to be built in "layers", as in the Scheduler is build first, and then higher level abstractions built on top of that, for example.
-
- Posts: 8
- Joined: Thu Jan 22, 2009 12:10 pm
Re: Layered vs. Non-layered
Oh, I am sorry. I suppose my experience with "layered" operating systems would be the Xinu Approach, which is a textbook I have read and re-read many times. Xinu seems to be, if my reading is correct, a monolithic operating system, and it is layered, obviously. I suppose the difference between layered and un-layered in my mind is the difference between a single large binary, with newer features implemented on top of old features, and a series of stand-alone binaries that can operate independently.
I wasn't sure if it was even possible to create a kernel where all the modules stand alone and don't need each other to implement themselves. But based on your reactions, I'm a little confused. Is it the case that every module needs a different, lower level abstraction to be implemented, i.e. work in layers?
Or is it possible to create a series of modules that are perfectly isolated, and don't need each other to cooperate or be implemented?
Here, this is a good approach: In xinu, there is talk of concurrency, which I'm sure you all know very well. The role of the operating system is to faciliate concurrency between processes while giving the illusion that there is no concurrency to user-space programs. My question is this: Is it possible to create a kernel that is actually a group of isolated modules that do not have a framework coordinating them, but still somehow manage to cooperate?
Sort of like the userspace programs in the days before operating systems, where everyone had to make sure their program played nice with others. This time, the modules might have to be programmed in such a way that they play nice with each other without any base framework. Is that possible?
p.s. Sorry if this sounds really stupid. please don't throw rocks at me.
I wasn't sure if it was even possible to create a kernel where all the modules stand alone and don't need each other to implement themselves. But based on your reactions, I'm a little confused. Is it the case that every module needs a different, lower level abstraction to be implemented, i.e. work in layers?
Or is it possible to create a series of modules that are perfectly isolated, and don't need each other to cooperate or be implemented?
Here, this is a good approach: In xinu, there is talk of concurrency, which I'm sure you all know very well. The role of the operating system is to faciliate concurrency between processes while giving the illusion that there is no concurrency to user-space programs. My question is this: Is it possible to create a kernel that is actually a group of isolated modules that do not have a framework coordinating them, but still somehow manage to cooperate?
Sort of like the userspace programs in the days before operating systems, where everyone had to make sure their program played nice with others. This time, the modules might have to be programmed in such a way that they play nice with each other without any base framework. Is that possible?
p.s. Sorry if this sounds really stupid. please don't throw rocks at me.
Re: Layered vs. Non-layered
So you're actually talking about Microkernel based operating systems? Those range from the not-really-at-all like very recent Linux kernels (with FUSE, CUSE, and userspace USB drivers, even though the VAST majority is monolithic) to the extremely-micro-kernel like Minix 3 (nearly everything is a module)/
It depends on exactly what you mean. If the OS simply implements a generic message passing interface, does that count as a 'framework coordinating them'? If the applications can communicate at all, then they can cooperate... in a Microkernel, one of the few jobs of the core kernel is to try to make the communication as good as possible.My question is this: Is it possible to create a kernel that is actually a group of isolated modules that do not have a framework coordinating them, but still somehow manage to cooperate?
-
- Posts: 8
- Joined: Thu Jan 22, 2009 12:10 pm
Re: Layered vs. Non-layered
Ah. I see. So the only way you can have those types of modules is if there is a framework of communication? I am interested, however, in how one can take it to the extreme, where the modules can communicate without any need for a kernel. Reallly, instead of a super small kernel, the kernel is gone and there are only modules, each one being able to function in a concurrent environment without having to communicate or have any module working as well..
In other words, not really a group of modules, but taking a monolithic kernel and chopping it up into separate programs that are programmed in such a way that they will work 99% of the time, without having to know what the other kernel programs are doing. Is that possible?
In other words, not really a group of modules, but taking a monolithic kernel and chopping it up into separate programs that are programmed in such a way that they will work 99% of the time, without having to know what the other kernel programs are doing. Is that possible?
Re: Layered vs. Non-layered
You could do something close if you put everything (read: modules) in ring0 and give up on the benefits of memory protection (which'd make it possible for a single module crapping out to take out the entire machine). The modules would still have to agree on how they'd communicate before hand, and you'd still have something that at least somewhat resembles a core kernel (such as memory management).
-
- Posts: 12
- Joined: Sat Feb 02, 2008 5:49 pm
Re: Layered vs. Non-layered
Hello all,
Example: THE operating system
- TJ
Neon is correct. Layering can be orthogonal to how the system is physically structured. One can have a layered system with or without modules. The key concept of a layered system is that each layer only relies on the functionality of the lower layers.neon wrote:Why cant a modular operating system be built in "layers"?WechtleinUns wrote:But I have heard that operating systems can be built in a modular, "non-layered" approach
Example: THE operating system
- TJ
Theorem: a cat has nine tails.
Proof: No cat has eight tails. A cat has one tail more than no cat.
Therefore, a cat has nine tails.
Proof: No cat has eight tails. A cat has one tail more than no cat.
Therefore, a cat has nine tails.
Re: Layered vs. Non-layered
Yes, it is Unix spelled backwards. However, it is indeed an operating system. Wikipedia page: http://en.wikipedia.org/wiki/Xinu
It seems to be a teaching OS from the University of Purdue.
It seems to be a teaching OS from the University of Purdue.