Amiga.org

Amiga News and Community Announcements => Amiga News and Community Announcements => Amiga Magazines => Topic started by: Daff on October 24, 2011, 05:22:43 PM

Title: Interview with Pavel Fedin
Post by: Daff on October 24, 2011, 05:22:43 PM
The magazine Obligement publish today an interview with Pavel Fedin, a russian developer who work on AROS and MorphOS. He works, among other, on the ACPI implementation on AROS.

Interview in english : http://obligement.free.fr/articles_traduction/itwfedin_en.php
Interview in french : http://obligement.free.fr/articles/itwfedin.php
Title: Re: Interview with Pavel Fedin
Post by: Piru on October 24, 2011, 06:25:17 PM
His MP ideas would only work if you'd heavily restrict the way allocated memory can be used. You'd need to have a flag that would indicate private memory. This memory could only be used locally. Even then it'd mean that each task would need to have a private memory pool to AllocMem from (since of course you cannot share allocations between tasks, thus it isn't as simple as "AllocMem() with memory protection active is supposed to be just AllocPooled() from system default pool.").

However, for many things to work the memory would need to be global, this includes Messages and any other structures that are being passed to the OS or are being included in some resource that might be accessible by other tasks.

Such MP would be limited: It'd still be extremely trivial to take down the whole OS. As such I don't quite see the point of such MP.

The only way to get true MP is to totally scratch all of the AmigaOS API legacy.
Title: Re: Interview with Pavel Fedin
Post by: SamuraiCrow on October 24, 2011, 06:39:16 PM
...and switch to something based on Linux or Haiku or Unix.
Title: Re: Interview with Pavel Fedin
Post by: Ezrec on October 24, 2011, 07:11:23 PM
Quote from: Piru;664898
However, for many things to work the memory would need to be global, this includes Messages and any other structures that are being passed to the OS or are being included in some resource that might be accessible by other tasks.


If I recall correctly, wasn't this why MEMF_PUBLIC was introduced, way back in the 2.x series?
Title: Re: Interview with Pavel Fedin
Post by: Fats on October 24, 2011, 08:35:08 PM
Quote from: Piru;664898

Such MP would be limited: It'd still be extremely trivial to take down the whole OS. As such I don't quite see the point of such MP.

The only way to get true MP is to totally scratch all of the AmigaOS API legacy.


You could attach a pool to a message port so that sender can allocate memory that is also accessible by receiver but not by other memory spaces. It is true that programs not using these features won't be protected and can bring down themselves and all non-protected programs. I do think it should be possible to have programs using the MP protected and not be brought down by other programs by implementing proper exception handling when they receive wrong data.

greets,
Staf.
Title: Re: Interview with Pavel Fedin
Post by: itix on October 24, 2011, 08:45:00 PM
MEMF_PUBLIC has been there since 1.0 but Commodore never documented where or how it must be used.

In the 2.x release Commodore finally screwed it up and unintentionally (?) rendered MEMF_PUBLIC obsolete.
Title: Re: Interview with Pavel Fedin
Post by: itix on October 24, 2011, 08:52:08 PM
Quote from: Fats;664928
You could attach a pool to a message port so that sender can allocate memory that is also accessible by receiver but not by other memory spaces. It is true that programs not using these features won't be protected and can bring down themselves and all non-protected programs. I do think it should be possible to have programs using the MP protected and not be brought down by other programs by implementing proper exception handling when they receive wrong data.


I dont know how AROS implements dos.library in current version but does it work if I try to save private memory block using Write()? If I try to Open("ram:foobar", MODE_OLDFILE) is it making sure filename is passed properly to fs? And does it guarantee my ExAll() hook is working?

After all there are many issues you can run into.

Of course you can always workaround those issues but I dont see it being trivial in a system that is built using shared memory concept. Ideally all memory should be protected and app writers should not care about stupid memory flags.
Title: Re: Interview with Pavel Fedin
Post by: Georg on October 25, 2011, 08:20:05 AM
Quote from: Piru;664898

The only way to get true MP is to totally scratch all of the AmigaOS API legacy.


I don't think so. AROS hosted/Linux runs in a single Linux process. You can run multiple instances of it. Even hundreds. Thanks to Linux MP a crash of one instance doesn't affect the others. Of course you would want to add things like GUI (and other) "sharing" so it all looks like one thing.

Something like that. It might be a bit less of a standalone OS then and you might call it AOS environment or framework, but I think it would still not be hugely different to how apps in other OSes "live" where the OS gives the illusion/impression to them that they are the only thing running.
Title: Re: Interview with Pavel Fedin
Post by: itix on October 25, 2011, 08:45:27 AM
@Georg

In this case MP is not implemented in AmigaOS API but in the system hosting AmigaOS sandbox.

(OTOH, side effect is it allows transparent memory paging to AmigaOS.)