Flat binary,does it fly??
Flat binary,does it fly??
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??
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Flat binary,does it fly??
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.i mean windows can run multiple com files at once??
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.
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).meaning do you have to reallocate according to symbols inside executables or can you just switch code and data values in the gdt?
Re:Flat binary,does it fly??
Yes but paging 's already provide a powerful enough mechanism.Why not use it?