Kernel (software engineering)
The kernel isfundamental partan operating system. It ispiecesoftware responsibleproviding secure multiplexingarbitration ofmachine's hardware. Kernels usually also implementsethardware abstractions that provideclean interface tounderlying hardware.
Therethree broad categorieskernels :
- Monolithic kernels provide richpowerful abstractions ofunderlying hardware.
- Microkernels providesmall setsimple hardware abstractionsuse applications called serversprovide more functionality.
- Exokernels provide no abstractions but allowuselibrariesprovide more functionality via direct or nearly direct accesshardware.
| Tablecontents |
|
2 Microkernels 3 Monolithic kernels vs. microkernels 4 Exokernels 5 See also 6 External links |
Monolithic kernels
The monolithic approach defineshigh-level virtual interface overhardware, withsetprimitives or system callsimplement operating system services such as process management, concurrency,memory managementseveral modules that runsupervisor mode.
Even if every module servicing these operationsseparate fromwhole,code integrationvery tightdifficultdo correctly, and, as allmodules run insame space,bugonethem can bring downwhole system. However, whenimplementationcompletetrustworthy,tight internal integrationcomponents allowslow-level features ofunderlying systembe effectively exploited, makinggood monolithic kernel highly efficient. Proponents ofmonolithic kernel approach makecase that if codenot correct,does not belong inkernel,ifis, therelittle advantage inmicrokernel approach.
A hybrid monolithic kernelone that can load modules at runtime.
Examplesmonolithic kernels:
- Traditional UNIX kernels, such askernels ofBSDs
- The Linux kernel
Microkernels
The microkernel approach consistsdefiningvery simple virtual machine overhardware, withsetprimitives or system callsimplement minimal OS services such as thread management, address spacesinterprocess communication.
The main objective isseparationbasic service implementations fromoperation policy ofsystem. For example,process I/O locking could be implemented byuser server running on top ofmicrokernel. These user servers, usedcarry onsystem high level parts,very modularsimplifystructuredesign ofkernel. A service server that fails doesn't bringentire system down; this simpler module can be restarted independently ofrest.
Examplesmicrokernels:
Monolithic kernels vs. microkernels
Monolithic kernelstypically preferred over microkernels due tolower levelcomplexitydealingall system control codeone address space. For example, XNU,Mac OS X kernel,based on Mach 3.0 + BSD insame address spaceordercut down onlatency incurred bytraditional microkernel design.Inearly 1990s, monolithic kernels were considered obsolete. The designLinux asmonolithic kernel rather thanmicrokernel wastopic offamous flame war between Linus TorvaldsAndrew Tanenbaum; a summaryavailable online.
Therecorrectnessboth sides ofarguments presented inTanenbaum/Torvalds debate.
Monolithic kernels tendbe easierdesign correctlytherefore may grow more quickly thanmicrokernel based system. Theresuccess storiesboth camps.
Contrarypopular belief, Machnotend-all, be-allmicrokernel techonology. L3 was createddebunkmyth that microkernelsslow. L4 issuccessorL3 andpopular implementation called Fiascoablerun Linux nextother L4 processesseparate address spaces. Therescreenshots available on freshmeat.net showing this feat.
QNXan operating system that has been around sinceearly 1980shasvery minimalistic microkernel design. This system has been far more successful than Machachievinggoals ofmicrokernel paradigm. Itusedsituations where softwarenot allowedfail. This includesrobotic arms onspace shuttlemachines that grind glass wheretiny mistake may cost hundredsthousandsdollars.
Many believe that since Mach basically failedaddresssum ofissues that microkernels were meantsolve that all microkernel technologyuseless. Mach enthusiasts state that this isclosed minded attitude which has become popular enough that people just acceptas truth.
Exokernels
Exokernels, also known as vertically structured operating systems, arerather radical approachOS design. The central linethought is, "separate protection from management".The idea behind this is, nobody knows better howmake efficient useavailable hardware butapplication developer, so enable himmakedecisions. Exokernelsextremely small, sincearbitrarily limit their functionality toprotectionmultiplexingresources.
"Classic" kernel designs (both monolithicmicrokernels) abstracthardware, hiding resources underhardware abstraction layer (HAL), or behind "trusted" servers (i.e.,serversextensionskernel functionality,thereno way around them).
In these "classic" systems, if you allocate memory, you have no sayingwhich physical page you will be returned byOS. If you write tofile, you have no saying on file system or physical block allocation.
Itthis abstraction layer that an exokernel triesavoid. It allows an applicationrequestspecific piecememory,specific disk block etc.,merely ensures thatrequested resourcefree, andapplicationallowedaccess it.
Since an exokerneltherefore only providingvery low-level interface tohardware, lacking any ofhigher-level functionalitiesother operating systems, itaugmented by"library operating system". SuchlibOS interfaces toexokernel below,provides application writers withfamiliar functionalities ofcomplete OS.
This has several implications:
Itpossiblehave several different libOSes insystem. If,example, you havelibOS that exportsUnix APIone exportingWindows API, nothing keeps you from running an application linkingWindows libOSone linkingUnix libOS, simultaneously. libOS developmentdoneuser space -- no reboots, no terminal debugging, fully memory-protected. Application designersfreereplace parts, or all, oflibOSabstractionstheir ownincrease performance.
Currently, exokernel designstill very muchresearch effortitnot usedany major commercial operating systems. One concept operating systemNemesis, written by UniversityCambridge, UniversityGlasgow, Citrix Systems andSwedish InstituteComputer Science. MIT has also built several exokernel based systems.
