v0.8.0-alpha
Pre-releaseWelcome to release v0.8.0-alpha of Serena OS.
Major areas of focus of this release are:
- First beta version of the Serena SDK
- Many new APIs to control processes and vcpus
- New APIs to get various bits of information and statistics of processes, vcpus and the system (host) itself
- Significantly faster user space synchronization primitives (mutex, semaphore and condition variables)
- Support for shebang (#!) files
- A number of new shell built-ins and tools
- Significant improvements to the scheduler and context switcher to make it more robust and efficient
- Better 68060 support
Serena OS is now entering the last stretch towards version 1.0. The next version will likely be the first official beta release which means that the focus will shift more towards testing and bug fixing.
Also be sure to check out the updated Wiki. The following sections list the most significant bug fixes, feature additions and other enhancements for each major component.
Serena SDK
This is the first beta release of the Serena SDK. The majority of the API design and implementation is now in place. No big changes are expected for the final 1.0 release. However some small things may still change between this and the final release. You can find a simple tutorial describing how to set up your development environment and how to build a sample app for Serena OS using the SDK here.
The Serena OS API design is somewhat similar to POSIX (systems like Linux, macOS, FreeBSD, etc) and OSF Mach. However there are significant differences in how the system and its components work compared to POSIX. See the various Wiki articles for more details: .
The API is designed around the idea of type/namespace prefixes to reduce the potential for name clashes between OS functions and functions defined in your code base. Major prefixes are:
- 'proc' which is the prefix used by all process related APIs
- 'vcpu' which is the prefix of all vcpu related APIs
- 'fd' marks all APIs that deal with a descriptor to an open file or device
- 'fs' is the common prefix of all functions that operate on the global filesystem tree
- 'sig' and 'sigset are the set of functions that operate on signals and signal sets
- 'excpt' are the functions that allow you to catch and raise CPU exceptions in a process
- 'clock' APIs allow you to get the current time and wait for a specified duration
Demos & Command Line Tools
- snake's screen layout is now compatible with NTSC Amigas
- The shell should no longer show bogus sprites/graphical artifacts when running on a NTSC Amiga
- The 'status' tool has been greatly extended and is now interactive. It shows the running processes, their current state, memory consumption, etc. and it shows you the amount of RAM available and the global CPU usage
- A new tool 'cpu' has been added that shows which type of CPU and FPU is installed in the system
- A new shell built-in 'proc' has been added that allows you to get various properties and pieces of information about a running process in the shell environment. I.e. 'proc cmdline 4' will show you the command line parameters with which the process with ID 4 was started
- A new shell built-in 'file' has been added which returns various attributes of a file. I.e. 'file size foo' returns the size of the file foo
- The 'id', 'uptime' and 'wait' tools are now shell built-ins
Libc
- Libc now implements many new host, process, vcpu, signal, file descriptor and filesystem APIs
- Changed how libc internally interacts with the kernel to make the library APIs stable and future proof
- User space mutex, semaphore and condition variables are now based on kernel provided wait-on-address primitives. This means that these synchronization primitives come with considerably less overhead since it is no longer necessary to enter the kernel if the synchronization primitive is uncontested.
- Fixed some bugs in the atomic integer primitives
- Added support for converting 64bit integers to and from 64bit float values (double)
Libdispatch
- Dispatchers now support two different ways of sending a signal to a dispatcher instance: signaling and broadcasting. Signaling means that a concurrent dispatcher will wake up exactly one vcpu to handle the signal while broadcasting means that the dispatcher will wake up all vcpus to process the signal.
Kernel
- The kernel now supports wait-on-address style high-performance wait and wake primitives. These are known as 'futex' in Linux land. These primitives are used by Libc to implement highly efficient user space mutex, semaphore and condition variables
- Considerably streamlined, unified and simplified the basic kernel wait primitives for waiting on signals and addresses. Entering and exiting waits is now faster and less specialized code is necessary to support signals and wait-on-address style waits
- The kernel now records various per-host, per-process and per-vcpu usage statistics. This data is available via
host_info(),proc_info()andvcpu_info()calls - The kernel now supports shebang executable files. These are files where the first two bytes are the character sequence '#!' followed by an absolute or relative path to another shebang file or a binary executable file. You can now invoke shell scripts with a shebang line as if they would be executable files, provided that the shell script has the executable permission bit set
- The kernel now supports spawn actions when spawning a new process. These actions allow you to pass an open file descriptor to a child process when you spawn it. Keep in mind that contrary to POSIX, files are not inherited by child process by default. You need to explicitly pass file descriptors to a child. Use a spawn action to do this
- Spawning a new process and doing a
proc_exec()in an existing process is now more robust and the kernel is now able to detect and report more erroneous situations - Restructured the way the kernel handles executable files to make it easier to add support for ELF executable files in a future version
Theproc_wait()API is now able to report process suspension and resumption in addition to process termination. It now also allows you to explicitly specify which kind of process state change you want to wait for - Scheduling is now more robust and the scheduler now penalizes uncooperative processes that try to starve other processes out from using the CPU
- The scheduler will now apply a temporary scheduling boost to some vcpus when they wake up. The boost decays over time
- The scheduler now makes a more precise distinction between dynamic priorities and fixed priorities based on the vcpu quality-of-service assignment
- The scheduler is now significantly faster at selecting a new vcpu to run because it's now taking advantage of the 68020+ population count instruction
- Processes are now able to configure scheduling parameters like quantum boost and voluntary priority reduction (aka nice)
- The kernel now supports process-level CPU exception handlers in addition to vcpu-level handlers. It will first look for a vcpu-level handler and invoke it if it exists; otherwise it will look for a process-level handler and invoke. The process is terminated with a exception termination status if no handler is found
68060 Support
- All relevant erratas are now implemented in the kernel
- The kernel will no longer try to use the 68060 specific lpstop instruction since the Amiga hardware doesn't fully support it