|
|
Miraculix operating system
Introduction
Project goal. Create multitask and multi-user real time operating system that can be installed on any carrier (hard drive, diskette, CD, flash). System that can be expended as much as desired, but still compact. Major part of OS: initial loader, core, scheduler, basic drivers and applications will easily fit onto diskette. Therefore basis – microkernel. System is intended for the computers on the PC base. At the moment basic tool - FASM, in future there might be other compilers created C/C++, Basic, Pascal.
System architecture.
Kernel.
Miraculix Operations System’s microkernel next best to monolithic kernels. Jus microkernel’s code is executed in a 0 ring. The only exception is TRAP.SYS module, whish carries out all exceptions when errors appear in the kernel (In case when code is executed in 0 ring - SYSTEM FAILURE). The basic element of API is the process of interruption of 0x90. Kernel function: virtual memory management (The page model of memory is used in the system), function of process integrity, process management and synchronization function.
Multi-tasking. Program multitasking is used in the system. Only one “physical” TSS is signed out for all processes. It’s value changes as another task is switched to. Value of I/O and INT cards (only for V86-tasks) do not change. This allows to hold any number of processes and streams in the system, it would have been impossible if each process and stream had it’s own TSS. Number of system descriptors is limited: 8192. Synchronization functions: sleep_procsess (PID), get_state (PID), wakeup_process(PID).
Memory Organization. Entire address space is divided into two sectors: the applications sector and system sector (kernel, drivers/modules). When 32-bit applications are run, all system registers (DS, ES, GS, FS, CS), sketch down entire 4GB of memory. Memory model - page based, each process has it’s own table of pages, it’s size depends on application’s needs. Memory is assigned dynamically (while executed) in the page. Stream inherits entire address space of the process it was created by. When V86 task is created, BIOS table of cut outs is copied in to new task memory, there is an option of A20. Memory function manager: Get_Memory (pages), Free_Memory (pages), Map_Memory (physical_address, pages). In the physical memory address may be just addresses: 0xA0000...0xFFFFF and addresses detected with PCI.
Loading. At the given moment system load is realized through 3.5"diskettes. Load stages:
1) Boot- sector loads primary charger from diskettes.
2) Primary loader (AXE.COM) checks diskette for kernel, if kernel can not be found, menu window showing all files and folders on the diskette, in this regime DOS programs, 32-bit binaries can be loaded. If "KERNEL.SYS" is found, primary loader loads entire head catalog of the disk in to the memory, creates RAM-Disk. There are now functions of working with diskette, file systems in the kernel. Kernel must load secondary loader, therefore primary loader creates RAM-Disk at 0x300000 address. Note: primary loader is not illuminated from the memory after process completion, it remains residential. Also gets management in cases fatal errors appear.
3) As soon as kernel access management function it loads secondary loader (It is the first process in the system, in microkernel L4 is called sigma0) from RAM-Disk and loads registry of TR processes.
4) Secondary loader loads all drivers and modules mentioned in "AUTOEXEC.INI". No strict consequences is required, drivers and modules can be loaded in any sequence, because the system is multitask. However it is required that FDC driver be loaded in the first meg of physical memory. This is because while working with diskette, 16-bit DMA controller is used in FDC driver … On the second place by importance is TRAP.SYS module (It can be also placed the last, but when errors arrear in modules or drivers loading prior …). You can also set loading of GUI, alternate consol or some shell of Norton Commander type.
DOS and 16 bit applications support. It is currently possible to load 16-bit applications. However interruption system in V86 is not straight. There have to be support in normal OC V86. At least to call 16-bit BIOS. Some things are non standard, ex.: GFX, SMBus, DDC, APM.
Inside Miraculix [12.02.2005]
All right reserved. Copyright © 2003-2005
Kreoton
|

|