RISC-OS: What a curious and unique OS
As mentioned in my previous post, my next will be a post mostly targeted to someone who may not have used RISC-OS, but is really curious on trying it out. At first some of the rather interesting features of this operating system might put people off from even trying it, or to keep using it. For one, it really does require that the user use all three buttons on their mouse, really putting that that mouse to work at it's fullest. How often do you normally press that middle mouse button? Did you even know that your mouse's scroll wheel can be pressed in like a button? Personally, I've been a loyal user of the middle mouse button for the past two decades on Linux, namely in the X Window System, where I use it almost daily as a way to effortless paste text between programs and into my terminal without needing to use my keyboard. This feature on the X Window System is called the X Selection for those who might not be familiar with it. However, this post isn't about the X Window System, but rather RISC-OS.
A New Way to Use Your Mouse
In RISC-OS, it is wise to keep in mind that to open a context menu as you would on most other operating systems with your right mouse button, this is now a middle click on RISC-OS. At first it might be a bit confusing, but after awhile you do get used to it. And don't worry, the left mouse button still functions as you'd expect, where you can select and of course double-click to open up various icons and push buttons.
So, now you might be asking, what the heck does the right mouse button do? A few things, I actually just found out the other day, regardless of using RISC-OS for a bit that it can select individual icons in a directory, but unlike the left button, which will actually unselect all the other icons, it can be used much like if you'd say hold down the CTRL key while pressing your left mouse button. This means, that you can easily select multiple icons in RISC-OS without needing to hold down an annoying key on your keyboard. Neat! Another cool feature, although I still need to find a more practical use for is by dragging a window's title bar with the right mouse button it will not bring that window above the others, and instead, you can drag it from it's current position in the stack, if that makes any sense. Otherwise, the right button is very context sensitive, and may do almost anything in some cases. For example, if you open the NetSurf browser, it will create a task icon in the bottom right of your Icon Bar on the bottom of the screen. If you click on it with your left button, it will open a new browser window, if you press the middle button, it will show you a menu, but if you click it with your right button, it will bring up the Hotlist, which are just it's name for bookmarks or favourites. There is an interactive help system which can be used and will tell you with a bubble message what each mouse button will do. I highly recommend using this program at first, as it can really help with understanding what each button will do at first.
The Icon Bar
With the mouse button actions out of the way, let's move on to the next must know feature for anyone new to RISC-OS, the Icon Bar! It looks like a Dock from macOS, or the Taskbar in Windows 7+, but it functions a bit differently than that. Let me first explain the concept of the left side and the right side.
The left side of the Icon Bar is usually dedicated to storage devices, or in the case of RISC-OS, filing systems. I will go deeper into the amazing transparency of the RISC-OS filing systems in another post. Although, an application can technically place it's icon onto either side with the API, it is generally accepted that filing system related icons be placed onto the left side, and almost every RISC-OS application respects this design choice, but it is up to the developer to choose themselves when creating an icon down there which side it will go on. Examples of what you'll see on the left are, if you are on a Raspberry Pi, will be your SD Card, and an Apps icon. The SD Card when clicked once will show you a file browser of the contents on your SD Card. The Apps icon when clicked once will also bring up a file browser, but to a special location which will display a list of apps. I mention this specifically, because this location isn't generated based on all the applications you might have installed, instead, during the system boot process, there is actually a script which will scan some common locations for applications and add it's icon to this location. This is very important to know, as not all apps you might install will show here unless they are placed into a certain directory. In my next post about the boot process, I will go more in-depth on how this all works under the hood. However, for those who want to just add a new directory to this, it can be done using a nice user interface, which I will talk about a bit later.
Next up, the right side. This side can hold a lot of different types of icons, and even has a larger widget from the Organizer on some installations which will also show you the typical clock you might see on a Windows Taskbar. Almost every icon on the right side, except for the one on the very far right is customizable. So, if you don't fancy yourself having a clock ticking there, you don't need to have it. The other icon which is usually on every RISC-OS installation is one to adjust the monitor resolution. The next set of icons to appear will usually be open tasks, not necessarily active tasks. I will be going into these icons more in-depth very shortly.
Co-operative Multitasking in the 21st Century!
Just when you thought the last co-operative multitasking operating system you'd ever have to use was older pre-NT versions of Windows...
Yes, you heard that right. RISC-OS uses co-operative multitasking under the hood, but to great effect, and doesn't seem to suffer like the systems of yore once did. If you don't know what this means, let me explain it in as easy as terms as I can conjure up here.
Most modern operating systems these days use a multitasking system called pre-emptive multitasking. This works with a timer of sorts, usually an interrupt which the operating system kernel handles, and this timer shoots off at an incredible speed. As you are reading this, your operating system has already given CPU time to so many sub-processes and tasks running in your operating system. In this method of multi-tasking, it is the responsibility of the operating system kernel to quickly swap CPU cycles between all the running processes in the system, the applications have zero say in when this happens, and just needs to accept the operating system doing on their behalf. In almost every case, this works perfectly.
With co-operative multitasking it is the duty of the running application to bequeath the processor back to the system's kernel, so that the operating system can give CPU time to the next task on it's list. This sort of multitasking was done on every non-NT version of Windows, and macOS before OS X. This is what usually led to those system's horrible instability issues and constant crashing. So, you might now be asking yourself, so does RISC-OS crash as much as these older systems? The answer is a bit mixed here. I haven't experienced any total system freezes or crashes in times where I was using the system normally, or where the system wasn't trying to do something too intensive. Modern RISC-OS 5 seems to be more stable in this regard, where say a file copy can no longer cause the system to be unresponsive for a bit. As long as the applications properly co-operate, the system works really well. It also has a few interesting advantages...
With this sort of multitasking system, it can allow some applications to actually run entirely as a single task. From what I can tell, this is done in some full-screen applications, as the desktop doesn't need any CPU time, so why give it any CPU time? This can led to some performance improvements to certain programs and games that run full-screen, as all the other tasks in the system are now entirely dormant. This can also cause some other issues, such as with some networking applications, namely server applications. I would never run a full-screen application while running a network server of any sort, as I've noticed, at least with the NFS server, that it can cause some problems. So, the system isn't without it's problems, but if you are aware and mindful of those problems, then you'll be fine. Most casual users won't be running network servers like NFS, and will be completely fine. However, this also enforces me to only run a network server like NFS when I require it, so it's not always running. It's really simple to start and stop such services on RISC-OS too, unlike other operating systems.
The main reason that RISC-OS uses co-operative multitasking from what I can see is to properly support legacy applications, and to also enable real-time applications that do require the CPUs full attention. A really interesting side-effect of this is that since the application knows when it will be swapped out by the kernel, it can allow for the same memory space to be used by multiple applications. For example, a more technical note, is that the Absolute file type will always load into address 0x8000 in memory. I believe this is actually a possible relic from the BBC Micro, where as this exact memory address was used for the paged ROM system, and the operating system there also swapped out which ROM was located there on-demand depending on what was needed. It allows for a system which doesn't need to rely on relocatable code, as programs written like this can expect to always be loaded and executed from this address. Okay, so enough of these low-level technicalities, this article is meant to be more of a first steps guide to RISC-OS, but rest assured, if these small low-level technical details do excite you, as they do me, then there will be a lot of really fun posts to come in the future.
Task Handling
So, with the explanation of how the multitasking works under the hood, which you could of very well skipped if you just want an end-user guide. Let's get back to how you as a user can manage tasks in this system. The far-right icon in the Icon Bar is the OS/System icon, and might look a bit different depending on which release of RISC-OS you might be using, but it all functions the same in each release. If you click either the left or right mouse button here, it will open a Tasks window. This is somewhat similar to what you'd see in say your Windows Task Manager, but might look a bit more complicated at first. Thankfully, you rarely, if ever need to open this window. However, it is nice to know how it works and what is going on here.
The first section of this window should be fairly straightforward, and will show all the current active tasks in the system. Only the middle mouse button has any real effect on the actual tasks here. As expected, it will open up a context menu with an assortment of options, most of which can also be accessed by just middle clicking on the OS/System icon in the far right, the same one which opened the Tasks window. The only exception of course is the Task '....' which will open a submenu with usually a single option to Quit that task. Simple enough. The part just below will show two other bars which might look a bit foreign to people of other operating systems, this is Next and Free. The Free should be obvious enough, it's how much memory is actually free for new tasks. The Next isn't really something a casual user needs to fret about. This is automatically set by each task you launch, and even if you did move this bar, which you can, it really won't affect any tasks, new or current. It is mostly of concern to someone who is developing an application for RISC-OS to easily tinker with memory allocations before adding the needed option into their launch code.
The section is even less useful to casual users, Module Tasks. These are tasks which have been started by various modules in the system, which I'll get to at a later date. Like Application Tasks, there is also a menu to Quit them, but you probably shouldn't.
The next section Dynamic areas cannot be manipulated, nothing here can be Quit. These areas just show how much extra workspace memory each task is using. For those more technically minded, I do believe this is the heap, where tasks can dynamically request additional memory from the operating system. The most common use of this would be a web browser, which cannot predict upon start how much memory a website will require to be downloaded and rendered, so it needs to request this memory as it runs on-demand.
The final section System memory allocation is the most interesting, as you can actually adjust many of the bars here. Again, most casual users should never need to manually adjust any of these, but if you find yourself needing to, as say an application module is too big to fit into the currently allocated space, then this is where you'd have to adjust the memory for your module space. Every bar which is shown in red is adjustable. Some of the bars which are normally set to 0KB are also adjustable, such as the System Sprites and the RAM disc. The System Sprites are only useful if you are a programmer, as most applications should not be allocating their sprite data here, it is mostly useful for testing applications with sprites and you don't want to go through the OS_SpriteOp API call, as System Sprites are instead controlled using the much easier to use star-commands. The RAM disc should really explain itself, if you add memory to this, you'll add a temporary RAM disc to your system, rather than a persistent one. This can be useful if you just need a bit of temporary space to place some files, but don't really want to have a RAM disc appear on each boot.
The next part about tasks can be a bit confusing to some new users, as opening an application doesn't always display it's window immediately. A lot of traditionally created RISC-OS application will instead just load up a task icon into the Icon Bar and expects the user to just know it's there to access the application's functionality. This can differ between applications. So, if you open an application and don't immediately see a window appear on your screen, check down in your Icon Bar. If you left click on a task icon, it will do it's default action. For a text editor that would be to start a new document, for a Web Browser it will open a new browser window to your home page. Once you understand how it works, it's very useful. It should also be noted that if you close all the application windows from your desktop, just like in macOS, the task will actually remain in the Icon Bar and to that extent in memory. As a lot of macOS users know, this can be extremely useful, as it can drastically cut down on expensive application launches. It also makes the system much better with memory overall. Consider a typical office application, which can consume a whole lot of memory. On systems which do not use this sort of system, each time you open a new document, a new instance of the entire application is loaded into memory, and after awhile this can build up and consume a lot of memory. With systems such as this and on macOS, only a single instance of the actual application is loaded into memory, and even if you close all the application windows, you are still able to call up the application without needing to relaunch the entire thing again. If you have a decent amount of memory on your RISC-OS system, then you'll find yourself keeping very common programs always opened in your Icon Bar, such a text editor, and other tools and programs that you might frequently use.
Application Management
Okay, so I've covered quite a lot here mostly targeted to someone new and casual to RISC-OS, and I did make mention of the Apps directory from the left side of the Icon Bar. So, how do you add more apps to this? This is handled via the Configuration application. This can be opened in a variety of ways. The most common and easiest is to middle click on the OS/System icon in the far-right on Icon Bar. A menu of options will appear, select Configure....
The Configure application is essentially your typical Control Panel from other popular operating systems. This is where you can go to configure various aspects of RISC-OS. Most of it is very self-explainable, so I won't go into much details with most of them in this post. The one we are most interested in, is also the least obvious to contain what we are looking for, Boot. As I mentioned above, the Apps directory is generated via the boot process, which I will be going through in complete depth in tomorrow's post. You only need to click on these icons in the Configuration window once to open them. Clicking on Boot will open a window titled Boot sequence, and here you will find the icon you need, Add to Apps. I will explain what these other icons do in the next post, so don't be too concerned with them just yet. Again, single left click on Add to Apps to open the Add to the Apps folder window. Here you will see a list, here is the default which I see on the default installation:
- Boot:^.Apps
- Boot:RO520Hook.Apps
- Boot:^.Printing.!Printers
These items are also greyed out and cannot be removed using this window. Let me first explain how these actually work, as they might look odd and foreign to someone with zero RISC-OS experience.
The Boot: part is at first confusing, but as mentioned before, RISC-OS has a very transparent filing system. This section of each of the items above is actually a reference to the !Boot folder you'll see if you open up the root of your disc from the Icon Bar. This is configured during the boot process. The ^ character you see on two of those lines is actually what RISC-OS considers as .. or the parent directory. If you look in the root of your disc, you'll most likely see a directory Apps there, and sure enough, each of those apps are also in the Apps directory generated by the system. A lot of people might just want to place all their apps into this directory and call it a day, which is fine, and more-so aligns with how macOS works. However, you are free to place apps into any directory on your disc, or even a network share and have it appear in the Apps directory on your Icon Bar.
So now, you might be asking yourself, "There's not button in this dialog for adding anything."
This is where RISC-OS is a bit different, it has the concept of drag-n-drop to a whole new level. To add a new directory into this list, just find it in your filer, and drag it's directory icon into this list, and it's added. This takes away from the tedium of having to search through an awkward file or directory select box, that I'm sure everyone absolutely loves. Personally, I love this approach, it's simple and easy. This is also used for when you save a file as well, so do keep that in mind. It's always good to have a filer window opened with your documents visible, or have a link to that directory placed onto your desktop for quick and easy access. To recap, if you create a document, and use the typical save option, it will actually show a small window with an icon representing the document, and a text box for it's name below it. If the file has been saved before, there will be a button to save it back to where it is located, some applications even have a default so pressing save will store the settings for example where it should be, but this also allows you to easily make a copy of specific settings by simply dragging that icon into a directory window to save it anywhere you please. It's quite a nice system once you understand and become used to it.
RISC-OS did it before Apple
Just like with the RISC-OS Icon Bar which is widely similar to the Dock introduced in OS X. Remember, the original RISC-OS with these exact same features as Apple were released back in the late 80s, so if anything Apple copied RISC-OS in this regard. Apple may have also copied RISC-OS in another way as well, enter the Application Folder.
Most macOS users might know that each actual App on their system is actually a folder which contains various resources and binaries that the application needs to execute. This same concept also exists in RISC-OS, also introduced in the late 80s with RISC-OS 2, much before OS X was released, or even NextStep. Rather than using extensions like .app as in both NextStep and macOS, the . character is actually the directory separator in RISC-OS, so file extensions aren't even possible in RISC-OS. Instead RISC-OS uses what it calls a Pling, seen as a ! in front of each application. At first, most users won't even know that these are actually directories, but they are. Just like in macOS, you can open them using a special method. In RISC-OS, you need to shift double left click on one, and it will open a new directory window with the contents of that application's data inside. It should also note at this point that shift double left click can be performed on any icon in the filer, and is used to tell the operating system that I want to edit this, rather than open or launch it. It can be used on scripts for example to open the script up in an editor instead of running it. This is incredibly convenient, and I don't think any other operating system is this productive in this these terms.
Inside a RISC-OS application directory you will find a few very common files which I will explain here for those curious, and will dive deeper into these in a later post:
- !Boot
- Run when the application is seen.
- !Run
- Run when user double-clicks on the application.
- !Help
- Can be read by middle clicking the application and selecting Help.
- !Sprites
- Most applications contain multiples of these, they store the application's icon for various resolutions and display modes.
- !RunImage
- Not every application has one, but is usually the main application program, either a binary or sometimes even a BBC BASIC program.
I won't go through each of them, as most should be easy to understand, but one which might sound a bit confusing at first is the !Boot script. This is run when you first open a directory window which contains this application. It's duty is to configure file types for launching it's documents, and also to let RISC-OS know of it's !Sprites so that it can render an application icon for it. The application can also be seen by RISC-OS during the boot process, or if you add the directory the application is in to your Apps icon as mentioned above.
Future posts to look forward to
As mentioned in the previous post and here, the next post will be all about the boot process and a very in-depth look on how a RISC-OS system boots up. Another future post I will also be making separate from the boot process will be a look into the command-line system and the various star-commands.
Happy RISCing!