In
computing
Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes, and development of both hardware and software. Computing has scientific, e ...
, Quark is an
operating system
An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs.
Time-sharing operating systems schedule tasks for efficient use of the system and may also in ...
kernel
Kernel may refer to:
Computing
* Kernel (operating system), the central component of most operating systems
* Kernel (image processing), a matrix used for image convolution
* Compute kernel, in GPGPU programming
* Kernel method, in machine learnin ...
used in
MorphOS
MorphOS is an AmigaOS-like computer operating system (OS). It is a mixed Proprietary software, proprietary and Open-source software, open source OS produced for the Pegasos PowerPC (PPC) processor based computer, PowerUP accelerator equipped Amig ...
. It is a
microkernel
In computer science, a microkernel (often abbreviated as μ-kernel) is the near-minimum amount of software that can provide the mechanisms needed to implement an operating system (OS). These mechanisms include low-level address space management, ...
designed to run fully
virtualized
In computing, virtualization or virtualisation (sometimes abbreviated v12n, a numeronym) is the act of creating a virtual (rather than actual) version of something at the same abstraction level, including virtual computer hardware platforms, stor ...
computers, called ''boxes'' (see
sandbox
A sandbox is a sandpit, a wide, shallow playground construction to hold sand, often made of wood or plastic.
Sandbox or Sand box may also refer to:
Arts, entertainment, and media
* Sandbox (band), a Canadian rock music group
* Sandbox ( ...
). , only one ''box'' is available, the ''ABox'', that lets users run extant
AmigaOS
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 version ...
software compiled for
Motorola 68000 series
The Motorola 68000 series (also known as 680x0, m68000, m68k, or 68k) is a family of 32-bit complex instruction set computer (CISC) microprocessors. During the 1980s and early 1990s, they were popular in personal computers and workstations and w ...
(MC680x0 or 68k) and
PowerPC
PowerPC (with the backronym Performance Optimization With Enhanced RISC – Performance Computing, sometimes abbreviated as PPC) is a reduced instruction set computer (RISC) instruction set architecture (ISA) created by the 1991 Apple Inc., App ...
central processing unit
A central processing unit (CPU), also called a central processor, main processor or just processor, is the electronic circuitry that executes instructions comprising a computer program. The CPU performs basic arithmetic, logic, controlling, an ...
s (CPUs).
Design goals
The Quark microkernel is not a member of the
L4 microkernel family
L4 is a family of second-generation microkernels, used to implement a variety of types of operating systems (OS), though mostly for Unix-like, ''Portable Operating System Interface'' (POSIX) compliant types.
L4, like its predecessor microkernel ...
, but borrows concepts from it, including: the ''clan'' (group of tasks), ID concept, and recursive address mapping. Quark also has an asynchronous/synchronous message interface similar to
Amiga
Amiga is a family of personal computers introduced by Commodore in 1985. The original model is one of a number of mid-1980s computers with 16- or 32-bit processors, 256 KB or more of RAM, mouse-based GUIs, and significantly improved graphi ...
's
Exec Exec or EXEC may refer to:
* Executive officer, a person responsible for running an organization
* Executive producer, provides finance and guidance for the making of a commercial entertainment product
* A family of kit helicopters produced by Rot ...
kernel but adapted to an environment with
memory protection
Memory protection is a way to control memory access rights on a computer, and is a part of most modern instruction set architectures and operating systems. The main purpose of memory protection is to prevent a process from accessing memory that ha ...
.
Other Quark features include:
* High super/usermode switch speed
* Low interrupt latency
*
Interrupt
In digital computers, an interrupt (sometimes referred to as a trap) is a request for the processor to ''interrupt'' currently executing code (when permitted), so that the event can be processed in a timely manner. If the request is accepted, ...
threads (IntThreads) and Int
P-code
Bytecode (also called portable code or p-code) is a form of instruction set designed for efficient execution by a software Interpreter (computing), interpreter. Unlike Human-readable code, human-readable source code, bytecodes are compact nume ...
abstraction
*
Symmetric multiprocessing
Symmetric multiprocessing or shared-memory 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 ...
(SMP)
* Models task/thread and clan/chief
*
Resource tracking
*
Virtual memory
In computing, virtual memory, or virtual storage 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 l ...
(optional)
*
Distributed computing
A distributed system is a system whose components are located on different computer network, networked computers, which communicate and coordinate their actions by message passing, passing messages to one another from any system. Distributed com ...
* No access to
kernel
Kernel may refer to:
Computing
* Kernel (operating system), the central component of most operating systems
* Kernel (image processing), a matrix used for image convolution
* Compute kernel, in GPGPU programming
* Kernel method, in machine learnin ...
structures
* Clean design with an elegant application programming interface (
API
An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software Interface (computing), interface, offering a service to other pieces of software. A document or standa ...
)
* Micro/pico kernel mix
For this new kernel, a
hardware abstraction layer
Hardware abstractions are sets of routines in software that provide programs with access to hardware resources through programming interfaces. The programming interface allows all devices in a particular class ''C'' of hardware devices to be acce ...
is used which provides the needed hardware resource information like scanning all
Amiga Zorro II 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 facto ...
bus boards,
Peripheral Component Interconnect
Peripheral Component Interconnect (PCI) is a local computer bus for attaching hardware devices in a computer 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 th ...
(PCI) boards, and local hardware resources.
Functions
* SYS_AddLinkMessage
* SYS_AttemptSemaphore
* SYS_AttemptSemaphoreShared
* SYS_CopyCPUHalConfig
* SYS_CreateMemList
* SYS_CreateTask
* SYS_DeletePort
* SYS_DeleteSemaphore
* SYS_DumpMemHeader
* SYS_FindFreeMemArea
* SYS_FindSkipSize
* SYS_GetLinkMessage
* SYS_GetMessageAttr
* SYS_GetNextCPU
* SYS_Init
* SYS_InsideClan
* SYS_IsClanMember
* SYS_MMUAddPage
* SYS_MMUGetEntry
* SYS_MoveRomModuleToMemoryEnd
* SYS_ObtainPort
* SYS_ObtainSemaphore
* SYS_ObtainSemaphoreShared
* SYS_ReleaseSemaphore
* SYS_ReplyMessage
* SYS_SendMessage
* SYS_SetMessageAttr
* SYS_SetupPageTable
* SYS_ShowExceptionThreads
* SYS_ShowForbidThreads
* SYS_ShowIntThreads
* SYS_ShowQuarkState
* SYS_ShowReadyThreads
* SYS_ShowRunThreads
* SYS_ShowThreads
* SYS_ShowWaitIntThreads
* SYS_ShowWaitThreads
* SYS_Start
* SYS_StartNextThread
* SYS_StartThread
* SYS_WaitPort
Trance JIT
''
Trance JIT'' is a
MorphOS
MorphOS is an AmigaOS-like computer operating system (OS). It is a mixed Proprietary software, proprietary and Open-source software, open source OS produced for the Pegasos PowerPC (PPC) processor based computer, PowerUP accelerator equipped Amig ...
just-in-time (JIT)
compiler
In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs that ...
, or code translator, for running 68k applications within the MorphOS environment. It has been part of the MorphOS operating system since MorphOS 1.4.
MorphOS has a fully integrated 68k emulator to run many Amiga applications, which were almost exclusively compiled for the 68k processor, though MorphOS runs on
PowerPC
PowerPC (with the backronym Performance Optimization With Enhanced RISC – Performance Computing, sometimes abbreviated as PPC) is a reduced instruction set computer (RISC) instruction set architecture (ISA) created by the 1991 Apple Inc., App ...
. Trance supplements this function by adding JIT compiling, increasing the speed of the emulation. It does not interfere with the full integration of 68k and PowerPC tasks MorphOS provides.
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.
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
PowerPC (with the backronym Performance Optimization With Enhanced RISC – Performance Computing, sometimes abbreviated as PPC) is a reduced instruction set computer (RISC) instruction set architecture (ISA) created by the 1991 Apple Inc., App ...
native reimplementation of the OS known from the
Commodore International
Commodore International (other names include Commodore International Limited) was an American home computer and electronics manufacturer founded by Jack Tramiel. Commodore International (CI), along with its subsidiary Commodore Business Mach ...
A1000, A500(+), A600, A2000, A1200, A3000(T), and A4000(T) systems runs as a mix of a virtual emulation and a
driver. This OS driver is called an ABox.
The 68k emulation is written in
C and uses
GNU Compiler Collection
The GNU Compiler Collection (GCC) is an optimizing compiler produced by the GNU Project supporting various programming languages, hardware architectures and operating systems. The Free Software Foundation (FSF) distributes GCC as free software ...
(GCC)
assembly language
In computer programming, assembly language (or assembler language, or symbolic machine code), often referred to simply as Assembly and commonly abbreviated as ASM or asm, is any low-level programming language with a very strong correspondence be ...
macros where needed to speed up some complex instructions.
A JIT engine named
Trance
Trance is a state of semi-consciousness in which a person is not self-aware and is either altogether unresponsive to external stimuli (but nevertheless capable of pursuing and realizing an aim) or is selectively responsive in following the dir ...
is also available for MorphOS, to speed up old 68k programs beyond the current state of the traditional emulation.
The PPC native Exec supports the PowerPC register model which means there is 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 fully transparent if some library, hook, interrupt is still 68k or already using PowerPC code.
References
{{Microkernel
Microkernels
MorphOS