amiga.org
     
iconAll times are GMT -6. The time now is 09:58 PM. | Welcome to Forum, please register to access all of our features.

Amiga.org Amiga computer related discussion Amiga community support ideas How to move AROS forward

Amiga community support ideas This forum is for the open discussion of new thoughts and ideas intended to help the Amiga community. What do we need? What do we want?

Reply
 
Thread Tools Display Modes
Old 07-25-2008, 08:09 PM   #31
SamuraiCrow
Premium Member
Points: 14,084, Level: 77 Points: 14,084, Level: 77 Points: 14,084, Level: 77
Activity: 11% Activity: 11% Activity: 11%
 
SamuraiCrow's Avatar
 
Join Date: Feb 2002
Location: Colorado, USA
Posts: 2,065
Blog Entries: 2
Send a message via Yahoo to SamuraiCrow Send a message via Skype™ to SamuraiCrow
Default Re: How to move AROS forward

Regarding memory protection:
Quote:
1. Can it be done?
2. Can it be done elegantly?
3. Should it be done?
1. It can only be done part way and it requires an MMU.
2. No, managed code is much more elegant even if it is sometimes a bit slow.
3. No. If we are going to support the Natami and MiniMig as a starting place, we're going to have to realize that the fact that the 68070 on the production Natami and 68000 on the MiniMig will not have an MMU is going to prevent a memory-protected AROS from running at all!

There are so many things that should be done first:

1. Standard Template Library for C++ code. This can be implemented using STLPort.
2. Expand the runtime library to do STL functions in a memory-efficient manner. This can be implemented through template specialization.
3. Minimal bytecode as a distribution medium for code across all of the supported hardware platforms. (Possibly even portable to all of the OSs that support AmigaOS 3.1 APIs.) Tough one but but I favor LLVM to implement this.
4. Compiler to generate code in that bytecode. LLVM-GCC does this but is difficult to build. The upcoming Clang project on the Mac might someday be a better choice though.
5. Entry level programming languages. Another tough one but I'm already working on this one. Hollywood also works for this one.
SamuraiCrow is offline   Reply With Quote
Old 07-26-2008, 05:12 AM   #32
HenryCase
Cult Member
Points: 5,872, Level: 49 Points: 5,872, Level: 49 Points: 5,872, Level: 49
Activity: 1% Activity: 1% Activity: 1%
 
Join Date: Oct 2007
Posts: 800
Default Re: How to move AROS forward

Quote:
SamuraiCrow wrote:
Regarding memory protection:
Quote:
1. Can it be done?
2. Can it be done elegantly?
3. Should it be done?
1. It can only be done part way and it requires an MMU.
2. No, managed code is much more elegant even if it is sometimes a bit slow.
3. No. If we are going to support the Natami and MiniMig as a starting place, we're going to have to realize that the fact that the 68070 on the production Natami and 68000 on the MiniMig will not have an MMU is going to prevent a memory-protected AROS from running at all!
SamuraiCrow thanks for your reply, but you're jumping ahead in the discussions here. As I said before I see no point discussing questions 2 and 3 until we come to an agreement on the answer to question 1. The only way you're going to convince me that MP can only be done partially is to find flaws in the MP solution I outlined earlier in this thread. Please do so. Thanks in advance.
__________________
"OS5 is so fast that only Chuck Norris can use it." AeroMan
HenryCase is offline   Reply With Quote
Old 07-26-2008, 05:46 AM   #33
itix
Kindred of Babble-on
Points: 12,777, Level: 73 Points: 12,777, Level: 73 Points: 12,777, Level: 73
Activity: 30% Activity: 30% Activity: 30%
 
itix's Avatar
 
Join Date: Oct 2002
Posts: 2,025
Default Re: How to move AROS forward

@HenryCase

One problem in memory protection is that applications and the operating system are sharing system structures. For example when you call OpenWindow() the system returns struct Window which is globally shared. If your application trashes this structure it may lead to crash of operating system.

The design of Amiga is unfortunately flawed for memory protection. One could say that on Amiga there is no user space and kernel space -- there is only kernel space where all applications are running.
__________________
Only MorphOS makes it possible \o_
itix is offline   Reply With Quote
Old 07-26-2008, 06:25 AM   #34
paolone
Technoid
Points: 7,424, Level: 57 Points: 7,424, Level: 57 Points: 7,424, Level: 57
Activity: 5% Activity: 5% Activity: 5%
 
paolone's Avatar
 
Join Date: Dec 2007
Posts: 348
Default Re: How to move AROS forward

Oh no! Another "how should other people work" topic about AROS.

And another fork/split proposal. It seems the Amiga community can't live without splitting things in thousands pieces.

Well, for people that aren't aware of it, AROS has its own mission and definition, which is being "a lightweight, efficient and flexible desktop operating system, designed to help you make the most of your computer. It's an independent, portable and free project, aiming at being compatible with AmigaOS 3.1 at the API level (like Wine, unlike UAE), while improving on it in many areas".

Isn't it enough? Well, there are the ending lines too, "The source code is available under an open source license, which allows anyone to freely improve upon it" which formally and actually allow anyone willing to do his/her "better AROS" to take the code, modify it and reach the goal he/she likes.

So, having clear in mind that all in all AROS is a *hobbystic* project, the community can do different things with it:

1. just whining and claiming their opinion would be the best way to improve AROS

2. contribute with code to reach the common goal stated above.

3. take the existing code and improve upon it the way they like, just to become the new ruler of the world.

The direction is already here for the people that want to see it. The others may disagree, but please don't claim AROS is pointless or directionless anymore, as it is completely untrue.
paolone is offline   Reply With Quote
Old 07-26-2008, 07:04 AM   #35
HenryCase
Cult Member
Points: 5,872, Level: 49 Points: 5,872, Level: 49 Points: 5,872, Level: 49
Activity: 1% Activity: 1% Activity: 1%
 
Join Date: Oct 2007
Posts: 800
Default Re: How to move AROS forward

Quote:
itix wrote:
@HenryCase
One problem in memory protection is that applications and the operating system are sharing system structures. For example when you call OpenWindow() the system returns struct Window which is globally shared. If your application trashes this structure it may lead to crash of operating system.
Thanks for your reply itix. I looked into the OpenWindow() API call and I can't see anything that would prevent changing it from a global variable to a more local one.

Quote:
itix wrote:
The design of Amiga is unfortunately flawed for memory protection. One could say that on Amiga there is no user space and kernel space -- there is only kernel space where all applications are running.
This is the case now, but we're looking at ways to create a user space-kernel space separation whilst keeping OS3.1 API compatibility. This is not your daddy's exec if you catch my drift. If it is possible to implement a new kernel with MP that supports the OS3.1 API calls then we can have MP in an Amiga based OS.

So a good question is this: are there any global variables that cannot be contained more locally?
__________________
"OS5 is so fast that only Chuck Norris can use it." AeroMan
HenryCase is offline   Reply With Quote
Old 07-26-2008, 07:20 AM   #36
HenryCase
Cult Member
Points: 5,872, Level: 49 Points: 5,872, Level: 49 Points: 5,872, Level: 49
Activity: 1% Activity: 1% Activity: 1%
 
Join Date: Oct 2007
Posts: 800
Default Re: How to move AROS forward

Quote:
paolone wrote:
The direction is already here for the people that want to see it. The others may disagree, but please don't claim AROS is pointless or directionless anymore, as it is completely untrue.
Paolone, I don't know if I was meant to be one of the targets of your 'all talk no action' rant or not, but I wanted to tell you that I really believe VmwAROS is a great asset to the AROS (and Amiga) community, and is helping to bring some structure back to AROS application development. Thank you for your continued work on it.
__________________
"OS5 is so fast that only Chuck Norris can use it." AeroMan
HenryCase is offline   Reply With Quote
Old 07-26-2008, 07:39 AM   #37
itix
Kindred of Babble-on
Points: 12,777, Level: 73 Points: 12,777, Level: 73 Points: 12,777, Level: 73
Activity: 30% Activity: 30% Activity: 30%
 
itix's Avatar
 
Join Date: Oct 2002
Posts: 2,025
Default Re: How to move AROS forward

@HenryCase

Quote:
Thanks for your reply itix. I looked into the OpenWindow() API call and I can't see anything that would prevent changing it from a global variable to a more local one.
Local in which way? Intuition reads and writes to this structure and application reads and writes to this structure. There is no way you could make it "local" and retain API compatibility.

Quote:
If it is possible to implement a new kernel with MP that supports the OS3.1 API calls then we can have MP in an Amiga based OS.
If it was possible AROS would have implemented it already.
__________________
Only MorphOS makes it possible \o_
itix is offline   Reply With Quote
Old 07-26-2008, 07:47 AM   #38
bloodline
Master Sock Abuser
Points: 38,946, Level: 100 Points: 38,946, Level: 100 Points: 38,946, Level: 100
Activity: 28% Activity: 28% Activity: 28%
 
bloodline's Avatar
 
Join Date: Mar 2002
Location: London, UK
Posts: 11,890
Blog Entries: 3
Default Re: How to move AROS forward

Henry...

There is only one small conceptual point that you are missing. I have been racking my brains to try and find a good metaphor for the problem... bur I can't really find one.

I want to address your conceptual error as you raised it before... That is this strange idea of your that a program requests data from memory. It doesn't.

What we have is a big flat area of memory, and a CPU.
The CPU does not know or care where it is reading and writing, it simply follows what it is told to do by a computer program. The CPU in AmigaOS has no information regarding the status of the code at all. While AmigaOS offers contexts (where each exec task has it's own set of certain data structures etc), these contexts are all part of the same address space.

In the AmigaOS design, the designers decided that they wanted the system to be fast and use as little memory as possible. Thus AmigaOS was designed with the idea that any data structure that could be shared, would be shared... No provision was made in the design of Amiga to control the access to system wide data structures... this was a design decision, and it can't be retro fitted without totally redesigning the system, and it would no longer be AmigaOS compatible.

You are thinking high level, not machine level... Your ideas are actually an area of research called "managed code", the most famous is MicroSoft's Singularity project. There programs access memory via defined system functions thus memory access can be controlled without the need for an MMU.

But AmigaOS is not a managed code system, it was designed as an operating system to be programmed at a machine code level... in fact I can write a program in ASM that would work on AmigaOS in a matter of minutes... I certainly couldn't even begin to think about doing that on a real operating like a UNIX or Windows... where I would have to stick with C.
__________________
My iPhone Game: Puny Humans -
http://itunes.apple.com/gb/app/puny-...362230281?mt=8
bloodline is offline   Reply With Quote
Old 07-26-2008, 08:01 AM   #39
HenryCase
Cult Member
Points: 5,872, Level: 49 Points: 5,872, Level: 49 Points: 5,872, Level: 49
Activity: 1% Activity: 1% Activity: 1%
 
Join Date: Oct 2007
Posts: 800
Default Re: How to move AROS forward

Quote:
itix wrote:
Local in which way? Intuition reads and writes to this structure and application reads and writes to this structure. There is no way you could make it "local" and retain API compatibility.
Can you talk me through the way OpenWindow() is used in OS 3.1 so that I can look at creating this separation based on how it actually works and not my basic interpretation of Amiga API guides from the Internet.

Quote:
itix wrote:
Quote:
If it is possible to implement a new kernel with MP that supports the OS3.1 API calls then we can have MP in an Amiga based OS.
If it was possible AROS would have implemented it already.
I don't believe that MP was/is inevitable. There were more important tasks to complete when the AROS kernel was designed and created, like just getting it to work.
__________________
"OS5 is so fast that only Chuck Norris can use it." AeroMan
HenryCase is offline   Reply With Quote
Old 07-26-2008, 08:05 AM   #40
bloodline
Master Sock Abuser
Points: 38,946, Level: 100 Points: 38,946, Level: 100 Points: 38,946, Level: 100
Activity: 28% Activity: 28% Activity: 28%
 
bloodline's Avatar
 
Join Date: Mar 2002
Location: London, UK
Posts: 11,890
Blog Entries: 3
Default Re: How to move AROS forward

Quote:
HenryCase wrote:
Quote:
itix wrote:
@HenryCase
One problem in memory protection is that applications and the operating system are sharing system structures. For example when you call OpenWindow() the system returns struct Window which is globally shared. If your application trashes this structure it may lead to crash of operating system.
Thanks for your reply itix. I looked into the OpenWindow() API call and I can't see anything that would prevent changing it from a global variable to a more local one.
But the data structures are shared... Every program ever written for AmigaOS and the System itself expect to have access to these data structures... what do you want to do? Give each one it's own local copy of intuition? How the hell could that work? The way intuition was designed doesn't allow for that!

Quote:
Quote:
itix wrote:
The design of Amiga is unfortunately flawed for memory protection. One could say that on Amiga there is no user space and kernel space -- there is only kernel space where all applications are running.
This is the case now, but we're looking at ways to create a user space-kernel space separation whilst keeping OS3.1 API compatibility.
There is no separation in the design of the API... the actual concept of the OS is everything running in Kernel Space... This isn't a push a button and the Kernel is in a separate space problem... there is no separation in the API design!

Quote:
This is not your daddy's exec if you catch my drift.
No, you really need to spell this out because it is currently a hidden component in your theory and possibly one that is causing your confusion.

Quote:
If it is possible to implement a new kernel with MP that supports the OS3.1 API calls then we can have MP in an Amiga based OS.
But those very same API calls return pointers to shared data structures... how do you get around that?

Quote:
So a good question is this: are there any global variables that cannot be contained more locally?
That's an irrelevant question, you are thinking as if the CPU is running high level code, it is not.
__________________
My iPhone Game: Puny Humans -
http://itunes.apple.com/gb/app/puny-...362230281?mt=8
bloodline is offline   Reply With Quote
Old 07-26-2008, 08:12 AM   #41
dammy
Kindred of Babble-on
Points: 21,013, Level: 91 Points: 21,013, Level: 91 Points: 21,013, Level: 91
Activity: 2% Activity: 2% Activity: 2%
 
dammy's Avatar
 
Join Date: Nov 2002
Location: Tequesta, FL USA
Posts: 2,794
Blog Entries: 3
Default Re: How to move AROS forward

Money, lots and lots of money spread over many years. If you can hire devs and guide them with vision of a great future, you can move AROS forward.

Dammy
dammy is offline   Reply With Quote
Old 07-26-2008, 08:34 AM   #42
SamuraiCrow
Premium Member
Points: 14,084, Level: 77 Points: 14,084, Level: 77 Points: 14,084, Level: 77
Activity: 11% Activity: 11% Activity: 11%
 
SamuraiCrow's Avatar
 
Join Date: Feb 2002
Location: Colorado, USA
Posts: 2,065
Blog Entries: 2
Send a message via Yahoo to SamuraiCrow Send a message via Skype™ to SamuraiCrow
Default Re: How to move AROS forward

@HenryCase

Any time you see a structure being passed into a system function with an &structurename in C code, it is passing a pointer to an internal stucture in the application's memory to the operating system. More importantly, if the operating system allocated the memory and passed back the pointer, the operating system would be the owner of that memory and would have to "change ownership" to the application and "change ownership" back to the operating system every time a pointer was passed back to it. That would be a glacially slow operation.

I think the answer to the issues that are often associated with memory protection are generally better addressed by using "safe" programming languages like Oberon and some versions of Basic that either don't directly support pointers in general, or have tight limitations on the use of arrays and other data structures to monitor them for overruns and NULL pointer values internally.
SamuraiCrow is offline   Reply With Quote
Old 07-26-2008, 08:51 AM   #43
Hans_
Cult Member
Points: 7,279, Level: 56 Points: 7,279, Level: 56 Points: 7,279, Level: 56
Activity: 2% Activity: 2% Activity: 2%
 
Hans_'s Avatar
 
Join Date: May 2006
Posts: 684
Default Re: How to move AROS forward

@SamuraiCrow
Quote:
SamuraiCrow wrote:
@HenryCase

Any time you see a structure being passed into a system function with an &structurename in C code, it is passing a pointer to an internal stucture in the application's memory to the operating system. More importantly, if the operating system allocated the memory and passed back the pointer, the operating system would be the owner of that memory and would have to "change ownership" to the application and "change ownership" back to the operating system every time a pointer was passed back to it. That would be a glacially slow operation.
Anything running in supervisor mode should have full access to all memory in the system. Thus, the OS kernel wouldn't have to change ownership back and forth. For non-kernel OS modules that run in user mode, they could run directly in the application's task/process; this means that there still wouldn't be any ownership change.

Quote:
I think the answer to the issues that are often associated with memory protection are generally better addressed by using "safe" programming languages like Oberon and some versions of Basic that either don't directly support pointers in general, or have tight limitations on the use of arrays and other data structures to monitor them for overruns and NULL pointer values internally.
The problem with that is that it requires all software to play by the rules. Malicious code does not. Memory protection helps prevent malicious code from doing harm by restricting access to resources.

Hans
__________________
http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more. Home of the RadeonHD driver for Amiga OS 4.x project.
Hans_ is offline   Reply With Quote
Old 07-26-2008, 08:51 AM   #44
HenryCase
Cult Member
Points: 5,872, Level: 49 Points: 5,872, Level: 49 Points: 5,872, Level: 49
Activity: 1% Activity: 1% Activity: 1%
 
Join Date: Oct 2007
Posts: 800
Default Re: How to move AROS forward

@bloodline
Thanks for your response.

Quote:
bloodline wrote:
What we have is a big flat area of memory, and a CPU.
The CPU does not know or care where it is reading and writing, it simply follows what it is told to do by a computer program. The CPU in AmigaOS has no information regarding the status of the code at all. While AmigaOS offers contexts (where each exec task has it's own set of certain data structures etc), these contexts are all part of the same address space.
I agree, the CPU doesn't have to care where it is reading or writing, it just has to follows what it is told to do by a computer program, namely the new AROS memory manager I am proposing. AROS is software too. I'm taking control over memory from the applications and giving it to the OS. If a program uses an API call like AllocMem() then AROS knows about it, right?

Quote:
bloodline wrote:
In the AmigaOS design, the designers decided that they wanted the system to be fast and use as little memory as possible. Thus AmigaOS was designed with the idea that any data structure that could be shared, would be shared... No provision was made in the design of Amiga to control the access to system wide data structures... this was a design decision, and it can't be retro fitted without totally redesigning the system, and it would no longer be AmigaOS compatible.
Clearly I'm not aiming to clone every design decision made by the AmigaOS designers. I'm trying to focus on how we keeping OS 3.1 API compatibility in a MP system, we can discuss if the resultant OS is Amiga-like later.

Quote:
bloodline wrote:
You are thinking high level, not machine level... Your ideas are actually an area of research called "managed code", the most famous is MicroSoft's Singularity project. There programs access memory via defined system functions thus memory access can be controlled without the need for an MMU.
Interesting. Can you give me an overview of how Microsoft's Singularity achieves this feat?

Quote:
bloodline wrote:
But AmigaOS is not a managed code system, it was designed as an operating system to be programmed at a machine code level... in fact I can write a program in ASM that would work on AmigaOS in a matter of minutes... I certainly couldn't even begin to think about doing that on a real operating like a UNIX or Windows... where I would have to stick with C.
AmigaOS may not have been a managed code system historically, but we're not looking at what it was but rather what we can make it without breaking compatibility. You'd still be able to code in ASM with my MP system. The programs making AmigaOS API calls see the 'virtual' memory layout, but the users of the OS can see the 'virtual' memory layout and the 'real' memory layout. I hope you can see that gives us options to allow ASM code to run alongside other code.

One option is to add a new API call(s) especially for ASM code. When the ASM program is executed it first makes an API call that says something like 'I will need memory from XXXX to XXXX to run'. If this memory is free then it is assigned to the ASM program. If it is not free you can either:

1. Close the programs using that memory.
2. Move the programs using the memory to another memory space (the programs are paused during this move, but can carry on afterwards as normal due to the 'virtual' memory addresses not moving.
3. A copy of the ASM program is made, and this copy is amended with available memory address locations before being run (the application doing this works like a find and replace function in a word processor).

However, ASM by its nature does not allow MP(AFAIK), unless you sandbox it, so yes you could crash AmigaOS with a badly coded ASM app, but the same is true of any operating system. If you code ASM apps so that they stay out of the way of the area where the OS is running from you should be okay.
__________________
"OS5 is so fast that only Chuck Norris can use it." AeroMan
HenryCase is offline   Reply With Quote
Old 07-26-2008, 09:04 AM   #45
HenryCase
Cult Member
Points: 5,872, Level: 49 Points: 5,872, Level: 49 Points: 5,872, Level: 49
Activity: 1% Activity: 1% Activity: 1%
 
Join Date: Oct 2007
Posts: 800
Default Re: How to move AROS forward

@bloodline
I'll reply to your last post shortly, outlining my ideas for the new exec will take a little time.

@Hans
Quote:
Hans_ wrote:
Anything running in supervisor mode should have full access to all memory in the system. Thus, the OS kernel wouldn't have to change ownership back and forth. For non-kernel OS modules that run in user mode, they could run directly in the application's task/process; this means that there still wouldn't be any ownership change.
Correct. The memory in use would be jointly owned by the kernel and the applications permitted to run in that space. This allocation only changes when you close an application or give a new application rights to use that space.
__________________
"OS5 is so fast that only Chuck Norris can use it." AeroMan
HenryCase is offline   Reply With Quote
Reply

Bookmarks

Tags
aros , move , forward

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Of FPGAs and the way forward SamuraiCrow General chat about Amiga topics 33 08-13-2008 09:01 PM
Looking Forward to 1993 scuzzb494 General chat about Amiga topics 4 04-07-2008 11:51 PM
Linux: The way forward? stefcep2 Alternative Operating Systems 2 02-02-2008 03:08 AM
Look forward to any new Amy news Reactioned General chat about Amiga topics 12 08-21-2006 05:15 PM
Fast Forward to Jail FluffyMcDeath CH / Entertainment 14 11-26-2004 05:56 PM