Welcome, Guest. Please login or register.

Author Topic: Reinvent the OS cont  (Read 10504 times)

Description:

0 Members and 2 Guests are viewing this topic.

Offline ElPolloDiablTopic starter

  • Hero Member
  • *****
  • Join Date: May 2009
  • Posts: 1702
    • Show only replies by ElPolloDiabl
Reinvent the OS cont
« on: June 20, 2015, 09:22:23 AM »
This is continuing from the thread where one person wanted to break all legacy compatibilty.
Firstly I thought why not just run Linux if you want something more advanced. If someone wants to do it I would be happy if there was a more 'advanced' version of Amiga OS. It would be our own Unix variant for users who want stability etc.
We could still have single core classic OS for max compatibility.
Go Go Gadget Signature!
 

Offline trekiej

Re: Reinvent the OS cont
« Reply #1 on: June 20, 2015, 04:03:33 PM »
Is Aros 68K tied to the chip-set?
edit:
I think it would be good to have a Linux Distribution that is Amiga oriented.
I have seen fdisk or cfdisk have amiga file system in a list of types.
« Last Edit: June 20, 2015, 06:05:26 PM by trekiej »
Amiga 2000 Forever :)
Welcome to the Planar System.
 

Offline Iggy

  • Hero Member
  • *****
  • Join Date: Aug 2009
  • Posts: 5348
    • Show only replies by Iggy
Re: Reinvent the OS cont
« Reply #2 on: June 20, 2015, 06:54:04 PM »
Linux is not well suited to hardware like the 68K.
And UNIX does do that well on low end hardware either.
I can't remember which, but there is a freeBSD or openBSD port for the Amiga.
But I would prefer a fresh approach.
I have used Microware's OS-9 on 68K based systems, and I have been pretty inimpressed with the open 8 bit versions of this OS.
We could start with a similar micro kernel and build out.
That, along with a lot of other advantages, would give us a much better priority based task switching system.
True real time performance could be realized.
The expansion bus is tricky.
In the 80's and 90's I used systems with ISA busses.
This is much easier to interface than PCI, but it is also a lot slower.
I have a few PCI bridge chips here that were designed to interface 68K and older PPC processors to a PCI buss, but its a complex device with a lot of software requirements.
You'd probably want to build a custom bridge chip using an FPGA.
Since its well known, an R200 video card would be a good first choice.
And sound from something simple like an SB Live audio card.

So, that would be the core I'd recommend.
'30 to '60 processor, FPGA PCI bridge chip, micro kernal based OS.
Euip that with some of the cards we are already using.
And there is your starting point.
"Not making any hard and fast rules means that the moderators can use their good judgment in moderation, and we think the results speak for themselves." - Amiga.org, terms of service

"You, got to stem the evil tide, and keep it on the the inside" - Rogers Waters

"God was never on your side" - Lemmy

Amiga! "Our appeal has become more selective"
 

Offline kolla

Re: Reinvent the OS cont
« Reply #3 on: June 20, 2015, 07:09:53 PM »
Hohum, you have much experience with Linux on m68k? It always worked well for me. There is both NetBSD and OpenBSD for Amiga too, at least old releases.
« Last Edit: June 20, 2015, 07:12:43 PM by kolla »
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
---
A3000/060CSPPC+CVPPC/128MB + 256MB BigRAM/Deneb USB
A4000/CS060/Mediator4000Di/Voodoo5/128MB
A1200/Blz1260/IndyAGA/192MB
A1200/Blz1260/64MB
A1200/Blz1230III/32MB
A1200/ACA1221
A600/V600v2/Subway USB
A600/Apollo630/32MB
A600/A6095
CD32/SX32/32MB/Plipbox
CD32/TF328
A500/V500v2
A500/MTec520
CDTV
MiSTer, MiST, FleaFPGAs and original Minimig
Peg1, SAM440 and Mac minis with MorphOS
 

Offline NorthWay

  • Full Member
  • ***
  • Join Date: Jun 2003
  • Posts: 209
    • Show only replies by NorthWay
Re: Reinvent the OS cont
« Reply #4 on: June 20, 2015, 07:50:31 PM »
http://www.osnews.com/story/28636/A_reimplementation_of_NetBSD_using_a_microkernel

That was interesting I thought.

However, for an Amiga experience I would never start with a Unix style kernel that insists on mapping each and every process in its own address space and using overlapping virtual address ranges. There are alternatives targeting 64-bit architectures, going under the label SASOS though many of those are not all that well grounded in the real world.

Personally, I think CPU evolution has not been a good match for the Amiga model: CPUs are going out of their way to separate and protect, and very few have mechanics for sharing. I have heard that the old PA-RISC did have the odd feature that was along that line.
The rise and power of FPGAs and what a single person can do on his own gives me hope that someone might force the transistors to yield to their will and make this something I'm looking for.
 

Offline Gulliver

Re: Reinvent the OS cont
« Reply #5 on: June 20, 2015, 10:22:04 PM »
I would choose a port of DragonFlyBSD with ZFS on AMD x64 hardware + FS-UAE for backwards compatibility.

I would customize its GUI interface to be more Amiga-like and would not support all hardware devices around, but just the three or four more widely available from different vendors (so no wasted resources in trying to support every piece of hardware out there).

BTW, DragonFlyBSD has some distant Amiga heritage (Matt Dillon of Dice C fame is its author). And many concepts of its design are taken from AmigaOS.
 

Offline wawrzon

Re: Reinvent the OS cont
« Reply #6 on: June 20, 2015, 11:47:59 PM »
isnt there enough linux distributions for everybody to choose? simply everyone who wants advanced amigaos may take the one he likes and call it amiga. case solved. right?
 

Offline Iggy

  • Hero Member
  • *****
  • Join Date: Aug 2009
  • Posts: 5348
    • Show only replies by Iggy
Re: Reinvent the OS cont
« Reply #7 on: June 21, 2015, 12:17:20 AM »
Quote from: kolla;791399
Hohum, you have much experience with Linux on m68k? It always worked well for me. There is both NetBSD and OpenBSD for Amiga too, at least old releases.


Yes, probably more than you, as I have been using 68000 processors since they were introduced.
And while linux may work for you, I'm not into pain.
Further, I've seen older implementations of Minix for the 68K that worked better than most Linux distros (and Minix isn't even meant to be anything other than an educational OS).
"Not making any hard and fast rules means that the moderators can use their good judgment in moderation, and we think the results speak for themselves." - Amiga.org, terms of service

"You, got to stem the evil tide, and keep it on the the inside" - Rogers Waters

"God was never on your side" - Lemmy

Amiga! "Our appeal has become more selective"
 

Offline Iggy

  • Hero Member
  • *****
  • Join Date: Aug 2009
  • Posts: 5348
    • Show only replies by Iggy
Re: Reinvent the OS cont
« Reply #8 on: June 21, 2015, 12:27:03 AM »
Quote from: NorthWay;791402
http://www.osnews.com/story/28636/A_reimplementation_of_NetBSD_using_a_microkernel

That was interesting I thought.

However, for an Amiga experience I would never start with a Unix style kernel that insists on mapping each and every process in its own address space and using overlapping virtual address ranges. There are alternatives targeting 64-bit architectures, going under the label SASOS though many of those are not all that well grounded in the real world.

Personally, I think CPU evolution has not been a good match for the Amiga model: CPUs are going out of their way to separate and protect, and very few have mechanics for sharing. I have heard that the old PA-RISC did have the odd feature that was along that line.
The rise and power of FPGAs and what a single person can do on his own gives me hope that someone might force the transistors to yield to their will and make this something I'm looking for.


One of the features I liked about OS-9 68K was the use of reentrant code. Multiple processes could call executable modules with only one copy of the program in memory.
The 68K has limited memory addressing (in most versions). The more efficiently we use memory the better.
The techniques that will benefit our processor aren't common to other platforms.
That is why a generic OS like Linux or UNIX will never maximise performance on the 68K.
"Not making any hard and fast rules means that the moderators can use their good judgment in moderation, and we think the results speak for themselves." - Amiga.org, terms of service

"You, got to stem the evil tide, and keep it on the the inside" - Rogers Waters

"God was never on your side" - Lemmy

Amiga! "Our appeal has become more selective"
 

guest11527

  • Guest
Re: Reinvent the OS cont
« Reply #9 on: June 21, 2015, 07:22:13 AM »
Quote from: Iggy;791410
One of the features I liked about OS-9 68K was the use of reentrant code. Multiple processes could call executable modules with only one copy of the program in memory. That is why a generic OS like Linux or UNIX will never maximise performance on the 68K.
Huh? First, in how far is this related to performance? It is probably related to available memory, but whether code is shared or not does not matter.

Second, Linux mmap's exectuables, which means that it only loads the parts that require execution, on demand, when needed. AmigaOs has to load the full thing to memory first. Worse, if you want to re-use executables between calls, they have to be written properly ("pure"), with no check of the Os whatsoever. Why that's an improvement I don't know.
 

Offline Iggy

  • Hero Member
  • *****
  • Join Date: Aug 2009
  • Posts: 5348
    • Show only replies by Iggy
Re: Reinvent the OS cont
« Reply #10 on: June 21, 2015, 01:33:17 PM »
Quote from: Thomas Richter;791415
Huh? First, in how far is this related to performance? It is probably related to available memory, but whether code is shared or not does not matter.

Second, Linux mmap's exectuables, which means that it only loads the parts that require execution, on demand, when needed. AmigaOs has to load the full thing to memory first. Worse, if you want to re-use executables between calls, they have to be written properly ("pure"), with no check of the Os whatsoever. Why that's an improvement I don't know.

Yes, the primary advantage IS the reduction in memory usage.
I started out using systems with limited memory resources, so I'm still focused on to tight efficient code.
"Pure", "No check of the OS at all.."?
No, the only constraint I know of is that they can't be self modifying (and any programmer that uses that trick deserves to be flogged).
And there is no constraint on OS interaction, I have no idea where you got that idea.
Ideally, there would always be a background process keeping count of they alloted timeslices that each process was allocated.
What I'm talking about does bring a few constraints to programming, but its also a lot tighter OS.

BTW - Since I have a Coldfire development platform on hand, I'm thinking about working on a kernel with that.
« Last Edit: June 21, 2015, 02:07:11 PM by Iggy »
"Not making any hard and fast rules means that the moderators can use their good judgment in moderation, and we think the results speak for themselves." - Amiga.org, terms of service

"You, got to stem the evil tide, and keep it on the the inside" - Rogers Waters

"God was never on your side" - Lemmy

Amiga! "Our appeal has become more selective"
 

guest11527

  • Guest
Re: Reinvent the OS cont
« Reply #11 on: June 21, 2015, 03:08:01 PM »
Quote from: Iggy;791417
"Pure", "No check of the OS at all.."?
No, the only constraint I know of is that they can't be self modifying (and any programmer that uses that trick deserves to be flogged).
No, not quite. Except you understand "self modifying" different from me. A program consists of three types of "memory regions", "code", "data" and "blank space" (bss). In principle, you can write to whatever region you like, but "code" usually contains the program binary, and modifying that by the program is what I would call "self modifying".

Unfortunately, that is only necessary but not sufficient for a program to be pure. It also must not write into the data or bss section, which - apparently - is not granted for your average program. Of course your average program wants to write to its data region, which typically contains C variables with program linkage (aka "global variables"), and of course, you want to write to the bss space (otherwise, it would just stay blank.).

So "pure" programs have to be a lot more careful. You essentially cannot use variables with program linkage (including library bases!), everything must be on the stack, or you must allocate from the heap yourself.

Some compilers come with startup code that create on each program start a copy of the data region on the heap, including manual relocation of the copy of the data space. Needless to say, while this makes programs pure (most of the time at least), it also causes additional overhead.  
Quote from: Iggy;791417
Ideally, there would always be a background process keeping count of they alloted timeslices that each process was allocated.
Why do you need a process for that? And keeping track of each single piece of memory a program allocated is usually too much overhead in first place. The way how Linux works is quite different. Every program gets its own heap, and can do with this memory region what it likes. The program usually includes compiler library routines that implement memory allocation from the heap. This memory allocation is not by the Os. The only exception is when the heap gets too small and requires resizing. Linux (and *ix operating systems in general) usually have a brk() or sbrk() system call to do that. But that's not a "memory allocator". It is usally several layers below malloc(), which is a C standard library function for maintaining the heap.  If the program ends, the entire heap is thrown away. If you start a new process, i.e. by the (infamous) fork(), the heap, stack and code are duplicated, and the separate copy continues execution behind fork(). (Actually, this is usually not a true copy, but rather depends on the "mad cow" trick, i.e. "copy on write").  
Quote from: Iggy;791417
What I'm talking about does bring a few constraints to programming, but its also a lot tighter OS.
Which makes it rather hard to implement any C type language on top of it, i.e. the "pureness" you seem to require. Bad idea, if you ask me.    
Quote from: Iggy;791417
BTW - Since I have a Coldfire development platform on hand, I'm thinking about working on a kernel with that.

If I may, I would probably suggest a good book on operating system design.
 

Offline kolla

Re: Reinvent the OS cont
« Reply #12 on: June 21, 2015, 08:05:18 PM »
Quote from: Iggy;791409
Yes, probably more than you, as I have been using 68000 processors since they were introduced.
And while linux may work for you, I'm not into pain.
Further, I've seen older implementations of Minix for the 68K that worked better than most Linux distros (and Minix isn't even meant to be anything other than an educational OS).

Yeah well. I have used Linux on Amiga since its birth so to speak, first kernel was 0.87 iirc, around same time NetBSD 1.0 came around too, in 1994-95. Anyways, for more than a decade I had a little park of 68k machines running Linux, which I used quite extensively for all kinds of purposes, web servers, my personal mail, file servers for my AmigaOS systems, IRC servers etc. and building packages for my private Gentoo/m68k effort (an effort I intend to reignite soon). Linux/m68k vs AmigaOS I do have quite a lot of experience with. In general, on Linux, all kinds of IO is faster. Filesystem (I use ext4, but it was aleays true) access is faster, and due to the way Linux caches filesystem, it acts much smoother than most FS under AmigaOS. Networking is not only faster, but way more reliable and feature rich on Linux. And of course online security is way better too.

That you think Minix works better on Amiga tells me two things - you have not spent much time using either.
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
---
A3000/060CSPPC+CVPPC/128MB + 256MB BigRAM/Deneb USB
A4000/CS060/Mediator4000Di/Voodoo5/128MB
A1200/Blz1260/IndyAGA/192MB
A1200/Blz1260/64MB
A1200/Blz1230III/32MB
A1200/ACA1221
A600/V600v2/Subway USB
A600/Apollo630/32MB
A600/A6095
CD32/SX32/32MB/Plipbox
CD32/TF328
A500/V500v2
A500/MTec520
CDTV
MiSTer, MiST, FleaFPGAs and original Minimig
Peg1, SAM440 and Mac minis with MorphOS
 

Offline Retrofan

  • Hero Member
  • *****
  • Join Date: Mar 2010
  • Posts: 507
    • Show only replies by Retrofan
Re: Reinvent the OS cont
« Reply #13 on: June 21, 2015, 08:15:56 PM »
There is something on the works; Delicate Linux and on May, 29 he started to port it to Amiga.
A1200, Lateral 32GB CF, internal Dvd, ACA 1230/56 with an MKII Fast ATA at 9,5Mb/s, another A1200 BPPC project in progress (more or less), and posting from my own/better C64x in my Tv using Hdmi.
 

Offline kolla

Re: Reinvent the OS cont
« Reply #14 on: June 21, 2015, 08:23:27 PM »
And in general about UNIX on 68k, a small list from the top of my head, of projects whos people thought 68k was well suited for un*x usage.
* SunOS
* Domain/OS
* NeXT
* A/UX
* Atari SRV4
* AMIX
* Linux
* NetBSD
* OpenBSD
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
---
A3000/060CSPPC+CVPPC/128MB + 256MB BigRAM/Deneb USB
A4000/CS060/Mediator4000Di/Voodoo5/128MB
A1200/Blz1260/IndyAGA/192MB
A1200/Blz1260/64MB
A1200/Blz1230III/32MB
A1200/ACA1221
A600/V600v2/Subway USB
A600/Apollo630/32MB
A600/A6095
CD32/SX32/32MB/Plipbox
CD32/TF328
A500/V500v2
A500/MTec520
CDTV
MiSTer, MiST, FleaFPGAs and original Minimig
Peg1, SAM440 and Mac minis with MorphOS