Page 1 of 1
Flat binary,does it fly??
Posted: Wed Jan 25, 2006 9:06 pm
by Nemo
HI I was wondering. Is it possible to multitask if your entire system is compiled as flat binary..meaning do you have to reallocate according to symbols inside executables or can you just switch code and data values in the gdt? i mean windows can run multiple com files at once??
Re:Flat binary,does it fly??
Posted: Thu Jan 26, 2006 3:23 am
by Pype.Clicker
i mean windows can run multiple com files at once??
MS ".COM" files are usually small enough to fit one real-mode
segment, meaning that, even if they're a flat binary, they can just work nicely in CS:0000 .. CS:FFFF regardless of the value of CS.
That makes DOS able to load and run them anywhere, but for the purpose of running 3 COM files at the same time, Windows uses
virtual addresses: each COM file runs in its own copy of DOS, completely ignoring the other running programs, and believing that 0xB8000..0xBFFFF is video memory while it's just an area of memory MS Windows reads back to render the "console" window.
meaning do you have to reallocate according to symbols inside executables or can you just switch code and data values in the gdt?
The problem is not to multitask (e.g. switching tasks): the problem is about sharing the memory. Indeed, you could ignore paging, have segments defined in the LDT that describe what each program has access to, or you could give each program its own virtual address space (which is the case in linux, windows, and virtually all "major" OSes i know).
Re:Flat binary,does it fly??
Posted: Fri Jan 27, 2006 3:09 am
by hendric
Yes but paging 's already provide a powerful enough mechanism.Why not use it?