Quark (kernel)
Encyclopedia
In computing
Computing
Computing is usually defined as the activity of using and improving computer hardware and software. It is the computer-specific part of information technology...

, Quark is an operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

 kernel used in MorphOS
MorphOS
MorphOS is an Amiga-compatible 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...

. It is a microkernel
Microkernel
In computer science, a microkernel is the near-minimum amount of software that can provide the mechanisms needed to implement an operating system . These mechanisms include low-level address space management, thread management, and inter-process communication...

 designed to run totally virtualized computers, called "boxes" (see sandbox). Currently only one "Box" is available, the ABox, that lets users run existing AmigaOS
AmigaOS
AmigaOS is the default native operating system of the Amiga personal computer. It was developed first by Commodore International, and initially introduced in 1985 with the Amiga 1000...

 software compiled for MC680x0
68k
The Motorola 680x0/m68000/68000 is a family of 32-bit CISC microprocessors. During the 1980s and early 1990s, they were popular in personal computers and workstations and were the primary competitors of Intel's x86 microprocessors...

 and PowerPC
PowerPC
PowerPC is a RISC architecture created by the 1991 Apple–IBM–Motorola alliance, known as AIM...

 processors
Central processing unit
The central processing unit is the portion of a computer system that carries out the instructions of a computer program, to perform the basic arithmetical, logical, and input/output operations of the system. The CPU plays a role somewhat analogous to the brain in the computer. The term has been in...

.

Design goals

Quark microkernel borrows concepts from L4
L4 microkernel family
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.L4 was a response to the poor performance of earlier microkernel-base operating systems...

 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
Amiga
The Amiga is a family of personal computers that was sold by Commodore in the 1980s and 1990s. The first model was launched in 1985 as a high-end home computer and became popular for its graphical, audio and multi-tasking abilities...

 Exec
Exec
Exec may refer to:* Exec, short for "executive officer"* exec , an operating system function for running a program* Exec , the OS kernel of Amiga computers...

 kernel but adapted to the memory protected
Memory protection
Memory protection is a way to control memory access rights on a computer, and is a part of most modern operating systems. The main purpose of memory protection is to prevent a process from accessing memory that has not been allocated to it. This prevents a bug within a process from affecting...

 environment.

Other Quark features include:
  • High Super/Usermode switch speed
  • Low interrupt latency
  • IntThreads and Int P-code
    P-code
    P-code can refer to:* Precompiled code, for example Java Byte code, MATLAB .p-files, etc.* p-code machine * Code used in the UCSD p-System...

     abstraction
  • Symmetrical multiprocessing (SMP)
    Symmetric multiprocessing
    In computing, symmetric multiprocessing involves a multiprocessor computer hardware architecture where two or more identical processors are connected to a single shared main memory and are controlled by a single OS instance. Most common multiprocessor systems today use an SMP architecture...

  • Task/Thread and Clan/Chief model
  • Resource tracking
  • Virtual memory
    Virtual memory
    In computing, virtual memory is a memory management technique developed for multitasking kernels. This technique virtualizes a computer architecture's various forms of computer data storage , allowing a program to be designed as though there is only one kind of memory, "virtual" memory, which...

     (optional)
  • Distributed computing
    Distributed computing
    Distributed computing is a field of computer science that studies distributed systems. A distributed system consists of multiple autonomous computers that communicate through a computer network. The computers interact with each other in order to achieve a common goal...

  • No access to kernel structures
  • Clean design with an elegant API
  • Micro/pico kernel mixture


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.

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


ABox

Under the Quark kernel a PowerPC
PowerPC
PowerPC is a RISC architecture created by the 1991 Apple–IBM–Motorola alliance, known as AIM...

 native reimplementation of the OS known from the Commodore
Commodore International
Commodore is the commonly used name for Commodore Business Machines , the U.S.-based home computer manufacturer and electronics manufacturer headquartered in West Chester, Pennsylvania, which also housed Commodore's corporate parent company, Commodore International Limited...

 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
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

 and uses gcc
GNU Compiler Collection
The GNU Compiler Collection is a compiler system produced by the GNU Project supporting various programming languages. GCC is a key component of the GNU toolchain...

 assembler macros where necessary to speed up certain complex instructions. Even though the emulation is written in C, its structure is on a level where handcoded assembler isn't significantly faster.

A JIT
Just-in-time compilation
In computing, just-in-time compilation , also known as dynamic translation, is a method to improve the runtime performance of computer programs. Historically, computer programs had two modes of runtime operation, either interpreted or static compilation...

 (Just In Time) engine called Trance
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....

 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 A-Box 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.

Early in its development, there was a relatively common misconception that the Quark Microkernel in MorphOS is related to or borrowed from the QNX
QNX
QNX is a commercial Unix-like real-time operating system, aimed primarily at the embedded systems market. The product was originally developed by Canadian company, QNX Software Systems, which was later acquired by Canadian BlackBerry-producer Research In Motion.-Description:As a microkernel-based...

operating system. This is entirely false.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK