OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Mar 29, 2024 12:37 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: A new design
PostPosted: Sat May 21, 2016 12:13 am 
Offline
Member
Member

Joined: Sat Apr 11, 2015 9:37 am
Posts: 37
I have made some "typical" Hobby Operating systems, (with paging, usermode, ELF file loading, Higher-Half, FAT32 support and other stuff..) But now I am thinking of a whole new design:
This time, my OS wll not use pagng, nor user mode, but it should be able to load so-called user mode programs. Those prgrams would not be able to tamper with kernel memory or othe programs' resources. The trick would be that the kernel would be running a super simple VM internally. On request, that VM would load user applications. The instructions would be executed by the kernel, not the CPU. (the kernel will do what the application instructs it to do.) because the process would only be allowed to use as much resources as permitted by the kernel, the whole system should look very similar to other typical Unix clones.
The VM is almost ready. I intend to write programs for it in it's own version of assembly.

Am I doing the right thing, or this is simply a waste of time ?? Suggestions are welcome. :D :D


Top
 Profile  
 
 Post subject: Re: A new design
PostPosted: Sat May 21, 2016 12:57 am 
Offline
Member
Member

Joined: Fri May 01, 2015 2:23 am
Posts: 63
That's no operating system, that's a bare metal hypervisor.

_________________
Hellbender OS at github.


Top
 Profile  
 
 Post subject: Re: A new design
PostPosted: Sat May 21, 2016 1:02 am 
Offline
Member
Member

Joined: Fri Jan 30, 2015 4:57 pm
Posts: 215
Location: Germany
What are the advantages over supervision by cpu?


Top
 Profile  
 
 Post subject: Re: A new design
PostPosted: Sat May 21, 2016 1:21 am 
Offline
Member
Member

Joined: Tue Mar 04, 2014 5:27 am
Posts: 1108
snasim2002 wrote:
The instructions would be executed by the kernel, not the CPU.

How come? Is the CPU gonna be idle / in power-saving mode?

snasim2002 wrote:
Am I doing the right thing, or this is simply a waste of time ??

Are you having an XY problem?


Top
 Profile  
 
 Post subject: Re: A new design
PostPosted: Sat May 21, 2016 2:10 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4591
Location: Chichester, UK
snasim2002 wrote:
This time, my OS wll not use pagng
Big mistake. Why ignore such a useful protection and virualization mechanism? What do you expect to gain by not supporting paging?

Otherwise you just seem to be describing a fairly standard OS model with an (unnecessary and inefficient) extra layer of CPU virtualization inserted. What's the point of this (other than to provide a less efficient implementation of the memory protection that you have thrown away by not using the processors natural MMU)?


Top
 Profile  
 
 Post subject: Re: A new design
PostPosted: Sat May 21, 2016 2:53 am 
Offline
Member
Member
User avatar

Joined: Sat Jan 15, 2005 12:00 am
Posts: 8561
Location: At his keyboard!
Hi,

Hellbender wrote:
That's no operating system, that's a bare metal hypervisor.


I think snasim2002 means something more like a SASOS running a managed language (sort of like Singularity, but with interpreted byte-code rather than compiled byte-code).


Cheers,

Brendan

_________________
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.


Top
 Profile  
 
 Post subject: Re: A new design
PostPosted: Sat May 21, 2016 7:43 am 
Offline
Member
Member

Joined: Wed Jun 03, 2015 5:03 am
Posts: 397
snasim2002 wrote:
Am I doing the right thing, or this is simply a waste of time ?? Suggestions are welcome. :D :D

Yes, you are doing just the thing you want, so it should be right for you.

But may be you are asking about what is right thing for us?

_________________
My previous account (embryo) was accidentally deleted, so I have no chance but to use something new. But may be it was a good lesson about software reliability :)


Top
 Profile  
 
 Post subject: Re: A new design
PostPosted: Sat May 21, 2016 8:08 am 
Offline
Member
Member
User avatar

Joined: Sat Dec 27, 2014 9:11 am
Posts: 901
Location: Maadi, Cairo, Egypt
As others have already mentioned, this is just a bare-metal hypervisor, and it really isn't a new design. It's been done before, and it's going to have much lower performance than your real hardware can manage.
Oh, and paging is something very valuable; developing a bare-metal hypervisor is not a reason to abandon paging support.

_________________
You know your OS is advanced when you stop using the Intel programming guide as a reference.


Top
 Profile  
 
 Post subject: Re: A new design
PostPosted: Sat May 21, 2016 8:45 am 
Offline
Member
Member

Joined: Sat Apr 11, 2015 9:37 am
Posts: 37
I agree paging is incredibly usefull.. I have used it extensively in my previous kernels, but, as I mentioned, this time I don't want something "usefull", but I want something "new", even if it't inefficient. My ultimate goal for this project is to get an OS that is completely different from the other OSes I built.


Top
 Profile  
 
 Post subject: Re: A new design
PostPosted: Sat May 21, 2016 8:54 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4591
Location: Chichester, UK
Personally I wouldn't pursue novelty just for its own sake. But it's your time, your OS, so you do what you like. If you want to produce an OS which avoids using the "mov" instruction, or the SI and DI registers, anywhere those would be valid choices too.

The only thing that puzzles me is why you are asking here if it's a good idea. What's that got to do with anything?


Top
 Profile  
 
 Post subject: Re: A new design
PostPosted: Sat May 21, 2016 6:09 pm 
Offline
Member
Member
User avatar

Joined: Fri Oct 27, 2006 9:42 am
Posts: 1925
Location: Athens, GA, USA
Actually, this is less like a hypervisor than an exokernel; but since those are basically different perspectives on the same technology (where the difference amounts to whether you see each VM running a client operating system, or just a single process with shared libraries for services), it comes down to how you look at it, I guess. It's the sort of thing that could get you arguing over definitions for weeks without resolution.

_________________
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.


Top
 Profile  
 
 Post subject: Re: A new design
PostPosted: Fri Jun 10, 2016 6:01 pm 
Offline
User avatar

Joined: Sun Oct 02, 2011 9:32 am
Posts: 9
snasim2002 wrote:
Am I doing the right thing, or this is simply a waste of time ?? Suggestions are welcome. :D :D

This very generic description sounds fine in general (well, except dropping paging). A lot depends on the design of VM and the language/command set it executes. Maybe you can tell a bit more about them?

For performance reasons, you may want to use JIT- or AOT-compilation and actually execute native machine code, but limiting it to the code generated by the kernel from the verified VM code.

_________________
How many DSLs are needed to make a compiler?


Top
 Profile  
 
 Post subject: Re: A new design
PostPosted: Mon Jun 13, 2016 12:18 am 
Offline
Member
Member

Joined: Sat Nov 07, 2015 3:12 pm
Posts: 145
In 64bits , you will be forced to use paging.
having a single address space will not protect you against TLB misses, provided that you will end up having many virtual addresses active at the same time , and the fact that the TLB is small.
If you stay in 32 bits with a single address space, you will have to implement software pagination, because you will want to swap out " not recently used" ( but reachable ) objects .

What kind of benefits no pagination will give you ?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 28 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group