Is it possible?
John Collis (1721) 4 posts |
Is it possible to run RISCOS on two Raspberry Pis connected via Ethernet to create a two node multiprocessor/ multitasking system? Could this then be scaled up using an Ethernet hub? Does RISCOS have an intertask message passing facility like AmigaDOS/Tripos had, or like the Transputer had with its links? Apologies for the naive question, but I am new to RISCOS ! |
Rick Murray (539) 13855 posts |
To be honest, I’m not sure I see the point. I mean, it would make some sort of sense if you were turning out an animation with a raytracer to task off each frame to a different machine to speed up the render process; but in the majority of cases you’re going to hit the brick wall that is the maximum throughput of the network. In this day and age, a RaspberryPi with either 256MiB or 512MiB onboard… surely that and a decent sized USB key would be a better solution? I guess it depends on what you plan to do and how much data transfer that involves. At the very least, you could do a little bit of sockets programming and write an application that talks to another (or multiples) via the network. If you choose this route, you might like to peruse the source code for WebJames (a RISC OS web server), it will give you an idea of how to talk to sockets for network programming. Remember – one of RISC OS’s advantages is that it will easily get out of the way. You can either “singletask” (just don’t yield to the windowmanager, carry on processing, RISC OS won’t pre-empt you) or if you really need raw power you can go deep by disabling interrupts, replacing the processor vectors with your own, and running your own code with 100% of the run of the machine (but you really have to know what you are doing here).
No idea. The only time I ever used an Amiga was my friend in Bridgwater back in ’93. He had this really cool box plugged into the size that could freeze the machine on an event, single step, change memory, display a dump of the machine status on-screen… it was meant for hacking games for infinite lives and such, but from a nerd point of view, it behaved a hell of a lot like what we nowadays call JTAG. However… A multitasking machine would be incredibly lame if it did not offer a way to pass around messages between applications. In this respect, RISC OS is quite nice. You can send a task a message, you can send a task a message that will get an acknowledgement, and you can send a message to all tasks. The message? Up to you. Many are already defined. You can request an allocation for your own. When you “send a message”, it will be delivered to the application(s) in question as part of their poll loop. 1 It is then up to the receiving application to do what needs to be done if it recognises the message. Info on inter-task messages here: https://www.riscosopen.org/wiki/documentation/show/The%20Window%20Manager%20Messages%20Overview 1 As you are new to RISC OS, I will briefly explain that the co-operative multitasking system works as follows: 01 Wimp_Initialise to register your application with the windowmanager Start here for info on how the Window Manager works … It is not my intention to be scary – however I’m sure you understand that programming for a system you are new to has a learning curve. Thankfully in RISC OS you can program in C or assembler using the official suite, or using GCC, or you can use the built-in BASIC. To that end, a good way to understand how all this works is to look at real applications and how they work. I spent a lot of my late teenage years taking apart programs for RISC OS to see what made them tick. So, take a look at !SciCalc. Supplied with RISC OS, it is a scientific calculator. The “sprites” (bitmap icons) and templates and such may be found here while the source code is here – it is a little bit complicated but it is a real working application. If you have a RISC OS machine (or the RPCEmu emulator installed), you can directly compare what the source is doing with how the application behaves. When you are a little more advanced with your knowledge of RISC OS, you can place the source code version of the program within !SciCalc and run it instead of the compressed version. Then, you can go to the next step of tweaking/modifying the program to see what effect this has. |
Andrew Flegg (1574) 28 posts |
I had planned to release Gateway which would shuffle ActiveApps messages (a lightweight IPC protocol built on top of WIMP messages) across the network. This’d allow WWBounce to bounce the ball across multiple machines rather than just between tasks, for example. Unfortunately, it never got finished nor released; but it shouldn’t be hard for someone to pick up and would mean not having to write a lightweight message communication protocol between machines. These days, looking at something like ZeroMQ might also be sensible. |
John Sandgrounder (1650) 574 posts |
I use Wget to send simple text messages between RicsoS systems. e.g. Wget —spider —quiet http://remote-system/cgi-bin/message.cgi?message=messagetext and then use WebJames (with WebJames style cgi scripts written in BBCbasic) to handle the inoming messages. Not particularly fast, but simple to implement and seems to be 100% reliable. on a mixture of RiscOS 4.02 (RiscPC or VRPC) and RiscOS 5.19 (pi). |
Steve Pampling (1551) 8173 posts |
Had you considered that that kind of protocol might be useful for internal messaging between RO instances in multiple core machines? |