Quark (kernel)

Last updated

In computing, Quark is an operating system kernel used in MorphOS. It is a microkernel designed to run totally virtualized computers, called "boxes" (see sandbox). Currently only one "Box" is available, the ABox, that lets users run existing AmigaOS software compiled for MC680x0 and PowerPC processors.

Computing Activity that uses computers

Computing is any activity that uses computers. It includes developing hardware and software, and using computers to manage, process, and communicate information for various purposes. Computing is a critically important, integral component of modern industrial technology. Major computing disciplines include computer engineering, software engineering, computer science, information systems, and information technology.

Operating system collection of software that manages computer hardware resources

An operating system (OS) is system software that manages computer hardware and software resources and provides common services for computer programs.

MorphOS is an AmigaOS-like computer operating system. It is a mixed proprietary and open source OS produced for the Pegasos PowerPC processor based computer, PowerUP accelerator equipped Amiga computers, and a series of Freescale development boards that use the Genesi firmware, including the Efika and mobileGT. Since MorphOS 2.4, Apple's Mac Mini G4 is supported as well, and with the release of MorphOS 2.5 and MorphOS 2.6 the eMac and PowerMac G4 models are respectively supported. The release of MorphOS 3.2 added limited support for PowerMac G5. The core, based on the Quark microkernel, is proprietary, although several libraries and other parts are open source, such as Ambient desktop.

Contents

Design goals

The Quark microkernel borrows concepts from the L4 microkernel family but is not an L4 implementation itself. For example the clan, ID concept and recursive address mapping comes from L4. Quark also has an asynchronous/synchronous message interface similar to Amiga's Exec kernel but adapted to the memory protected environment.

L4 is a family of second-generation microkernels, generally used to implement Unix-like operating systems, but also used in a variety of other systems.

Amiga family of personal computers sold by Commodore

The Amiga is a family of personal computers introduced by Commodore in 1985. The original model was part of a wave of 16- and 32-bit computers that featured 256 KB or more of RAM, mouse-based GUIs, and significantly improved graphics and audio over 8-bit systems. This wave included the Atari ST—released the same year—Apple's Macintosh, and later the Apple IIGS. Based on the Motorola 68000 microprocessor, the Amiga differed from its contemporaries through the inclusion of custom hardware to accelerate graphics and sound, including sprites and a blitter, and a pre-emptive multitasking operating system called AmigaOS.

Exec is the kernel of AmigaOS. It is a 13 KB multitasking microkernel which enabled pre-emptive multitasking in as little as 256 KB of memory. Exec provided functions for multitasking, memory management, and handling of interrupts and dynamic shared libraries.

Other Quark features include:

In computer programming, a p-code machine, or portable code machine is a virtual machine designed to execute p-code. This term is applied both generically to all such machines, and to specific implementations, the most famous being the p-Machine of the Pascal-P system, particularly the UCSD Pascal implementation.

Symmetric multiprocessing multiprocessor architecture where two or more identical processors are connected to a single, shared main memory, have full access to all input and output devices, and are controlled by a single OS that treats all processors equally

Symmetric multiprocessing (SMP) involves a multiprocessor computer hardware and software architecture where two or more identical processors are connected to a single, shared main memory, have full access to all input and output devices, and are controlled by a single operating system instance that treats all processors equally, reserving none for special purposes. Most multiprocessor systems today use an SMP architecture. In the case of multi-core processors, the SMP architecture applies to the cores, treating them as separate processors.

Virtual memory Operating System level memory management technique

In computing, virtual memory is a memory management technique that provides an "idealized abstraction of the storage resources that are actually available on a given machine" which "creates the illusion to users of a very large (main) memory."

For this new kernel a hardware abstraction layer is used which provides the necessary hardware resource information like scanning all zorro boards, PCI boards and local hardware resources. [1] [2]

Zorro II is the general purpose expansion bus used by the Amiga 2000 computer. The bus is mainly a buffered extension of the Motorola 68000 bus, with support for bus mastering DMA. The expansion slots use a 100-pin connector and the card form factor is the same as the IBM PC. Zorro II cards implement the Autoconfig protocol for automatic address space assignment.

Conventional PCI local computer bus for attaching hardware devices

Conventional PCI, often shortened to PCI, is a local computer bus for attaching hardware devices in a computer. PCI is an abbreviation for Peripheral Component Interconnect and is part of the PCI Local Bus standard. The PCI bus supports the functions found on a processor bus but in a standardized format that is independent of any particular processor's native bus. Devices connected to the PCI bus appear to a bus master to be connected directly to its own bus and are assigned addresses in the processor's address space. It is a parallel bus, synchronous to a single bus clock.

Functions

Trance JIT

Trance JIT is a MorphOS JIT compiler, or code translator, for running 68k applications within the MorphOS environment. It has been part of the MorphOS operating system since MorphOS 1.4. [3]

In computing, just-in-time (JIT) compilation is a way of executing computer code that involves compilation during execution of a program – at run time – rather than prior to execution. Most often, this consists of source code or more commonly bytecode translation to machine code, which is then executed directly. A system implementing a JIT compiler typically continuously analyses the code being executed and identifies parts of the code where the speedup gained from compilation or recompilation would outweigh the overhead of compiling that code.

A compiler is a computer program that translates computer code written in one programming language into another programming language. The name compiler is primarily used for programs that translate source code from a high-level programming language to a lower level language to create an executable program.

MorphOS itself has a fully integrated 68k emulator for running many Amiga applications, which were almost exclusively compiled for the 68k processor, while MorphOS itself is PowerPC. Trance supplements this functionality by adding JIT compilation, increasing the speed of the emulation. It does not interfere with the full integration of 68k and PowerPC tasks MorphOS provides. [4]

PowerPC RISC instruction set architecture by AIM alliance

PowerPC is a reduced instruction set computing (RISC) instruction set architecture (ISA) created by the 1991 Apple–IBM–Motorola alliance, known as AIM. PowerPC, as an evolving instruction set, has since 2006 been named Power ISA, while the old name lives on as a trademark for some implementations of Power Architecture-based processors.

Trance exists in the form of an executable, run during boot, and a shared library. Although it is not technically part of the kernel, and MorphOS can be run without it, Trance is considered a fundamental part of MorphOS and one of its most powerful features.

Compatibility of Trance is considered to be very high and there are few to no 68k instruction sequences or applications which cause it any problems. It is also considered to be very fast, with users noticing few differences between 68k programs and native PowerPC code. [5] [6] [7]

Trance was developed by Ralph Schmidt and Teemu Suikki, with minor support from other MorphOS team members, Mark Olsen, Sigbjørn Skjæret and Harry Sintonen.

ABox

Under the Quark kernel a PowerPC native reimplementation of the OS known from the Commodore A1000, A500(+), A600, A2000, A1200, A3000(T) and A4000(T) systems runs as a mixture of a virtual emulation and a driver. This OS driver is called as ABox.

The 68k emulation is written in C and uses gcc assembler macros where necessary to speed up certain complex instructions.

A JIT (Just In Time) engine called Trance for MorphOS to speed up old 68k programs beyond the current state of the traditional emulation is also available.

The PPC native Exec supports the PowerPC register model which means there's no difference for this Exec if it runs 68k or PowerPC code. PowerPC code does not block multitasking inside the OS box like in emulations where the 68k code is just emulated in some host system's task (then every access outside this environment would stop the multitasking in the emulated environment).

For applications running under this new PowerPC ABox kernel 68k code runs as subroutines inside PowerPC tasks. For 68k or PowerPC applications it's completely transparent if some library, hook, interrupt is still 68k or already using PowerPC code. [8]

Related Research Articles

Mach is a kernel developed at Carnegie Mellon University to support operating system research, primarily distributed and parallel computing. Mach is often mentioned as one of the earliest examples of a microkernel. However, not all versions of Mach are microkernels. Mach's derivatives are the basis of the modern operating system kernels in GNU Hurd and Apple's operating systems macOS, iOS, tvOS, and watchOS.

OS-9 is a family of real-time, process-based, multitasking, multi-user operating systems, developed in the 1980s, originally by Microware Systems Corporation for the Motorola 6809 microprocessor. It was purchased by Radisys Corp in 2001, and was purchased again in 2013 by its current owner Microware LP.

QNX Unix-like, real-time, embedded operating system

QNX is a commercial Unix-like real-time operating system, aimed primarily at the embedded systems market. The product was originally developed in the early 1980s by Canadian company Quantum Software Systems, later renamed QNX Software Systems and ultimately acquired by BlackBerry in 2010. QNX was one of the first commercially successful microkernel operating systems and is used in a variety of devices including cars and mobile phones.

UAE (emulator) computer emulator which emulates the hardware of Commodore Internationals Amiga range of computers

UAE is a computer emulator which emulates the hardware of Commodore International's Amiga range of computers. Released under the GNU General Public License, UAE is free software.

XNU computer operating system kernel

XNU is the computer operating system kernel developed at Apple Inc. since December 1996 for use in the macOS operating system and released as free and open-source software as part of the Darwin operating system. It is also used as the kernel for the Apple TV Software, iOS, watchOS, tvOS, and audioOS operating systems. XNU is an abbreviation of X is Not Unix.

Singularity (operating system) experimental operating system from Microsoft Research

Singularity is an experimental operating system (OS) which was built by Microsoft Research between 2003 and 2010. It was designed as a high dependability OS in which the kernel, device drivers, and application software were all written in managed code. Internal security uses type safety instead of hardware memory protection.

Phase5

Phase5 Digital Products is a defunct German computer hardware manufacturer that developed third-party hardware primarily for the Amiga platform. Their most popular products included CPU upgrade boards, SCSI controllers and graphics cards.

HelenOS multiserver, microkernel-based operating system from Charles University in Prague

HelenOS is an operating system based on a multiserver microkernel design. The source code of HelenOS is written in C and published under a BSD License.

The Amiga computer can be used to emulate several other computer platforms, including legacy platforms such as the Commodore 64, and its contemporary rivals such as the IBM PC and the Macintosh.

A hybrid kernel is an operating system kernel architecture that attempts to combine aspects and benefits of microkernel and monolithic kernel architectures used in computer operating systems.

AROS Research Operating System operating system

AROS Research Operating System is a free and open-source multi media centric implementation of the AmigaOS 3.1 APIs. Designed to be portable and flexible, ports are currently available for x86-based and PowerPC-based PCs in native and hosted flavors, with other architectures in development. AROS, in a show of full circle, was also ported to the m68k-based Amiga 1200, and there's also an ARM port for the Raspberry Pi series.

The Mac OS nanokernel is an extremely simple operating system kernel serving as the basis of most PowerPC based system software versions 7 through 9 of the classic Mac OS, predating Mac OS X.

TI-RTOS is an embedded tools ecosystem created and offered by Texas Instruments (TI) for use in a wide range of their embedded processors. It includes a real time operating system component called "TI-RTOS Kernel" along with additional components that support device drivers, networking connectivity stacks, power management, file systems, instrumentation, and inter-processor communications like DSP/BIOS Link.

WarpOS is a multi-tasking kernel for the PowerPC architecture developed by Haage & Partner for the Amiga computer platform in the late 1990s and early 2000s. It runs on PowerUP accelerator boards developed by phase5 which contains both a Motorola 68000 family CPU and a PowerPC CPU with shared address space. WarpOS runs alongside the 68k-based AmigaOS, which can use the PowerPC as a coprocessor. Despite its name, it is not an operating system (OS), but a kernel; it supplies a limited set of functions similar to those in AmigaOS for using the PowerPC. When released its original name was WarpUP, but was changed to reflect its greater feature set, and possibly to avoid comparison with its competitor, PowerUP.

AmigaOS native operating system of the Amiga personal computer

AmigaOS is a family of proprietary native operating systems of the Amiga and AmigaOne personal computers. It was developed first by Commodore International and introduced with the launch of the first Amiga, the Amiga 1000, in 1985. Early versions of AmigaOS required the Motorola 68000 series of 16-bit and 32-bit microprocessors. Later versions were developed by Haage & Partner and then Hyperion Entertainment. A PowerPC microprocessor is required for the most recent release, AmigaOS 4.

PowerUP (accelerator)

PowerUP boards were dual-processor 68k–PowerPC accelerator boards designed by Phase5 Digital Products for Amiga computers. They had two different processors working in parallel, sharing the complete address space of the Amiga computer system.

AmigaOS 4 version history

A new version of AmigaOS was released on December 24, 2006 after five years of development by Hyperion Entertainment (Belgium) under license from Amiga, Inc. for AmigaOne registered users.

References

  1. "MorphOS? What's that, then?", AmigActive, pp. 14–17, July 2000
  2. David Gerber (2002). "MorphOS Full Features List" (PDF). Retrieved 2010-07-28.
  3. "MorphOS 1.4 available". 9 August 2003. Retrieved 2010-07-28.
  4. "MorphOS? What's that, then?", AmigActive, pp. 14–17, July 2000
  5. "How fast is MorphOS?". 8 February 2003. Retrieved 2010-07-28.
  6. "MorphOS 68k speed". 3 November 2002. Retrieved 2010-07-28.
  7. "Comparatif : performances entre AmigaOS 4.1 et MorphOS 2.3 sur Pegasos II (French)". September 2009. Retrieved 2010-07-28.
  8. "MorphOS Full Features List". 11 December 2002. Retrieved 2010-07-28.