Page 1 of 1
Sparrow OS (was: spread everywhere)
Posted: Mon Nov 19, 2012 11:32 am
by SparrowOS
I use 2 Meg pages (in long mode it's 2Meg, not 4Meg). However, the first 2 Meg, I use 4096 byte pages because I need 0xA0000-0xBFFFF as write-through.
I identity map 128 Gig, but only mark what BIOS E820 says is present.
My operating system is for recreational programming and maybe the kids will want to play with page tables. I made a routine to return the page table address of a virtual address (identity-mapped). Because the first 2 Meg is 4096 byte pages, it is special.
Sparrow OS (was:The place of virtualization in OSs)
Posted: Mon Nov 19, 2012 12:49 pm
by SparrowOS
AbstractYouShudNow wrote:Sorry, I didn't know LLVM in that depth. But I'm pretty sure one can take LLVM architecture as a basis and develop a clone with all the additionnal features we need, such as platform-independant bytecode, or a real VM.
Also, if every process runs in a VM, won't that definitively kill any hope of efficience ? I know Android systems already do that without losing much speed, but applications for PCs are much more complex than ones for phones. I was actually thinking of a system having a VM for each type of program, and starting the appropriate VM, as a layer. My design is obviously much more complex than that, since I just love difficulty (that's why I'm using GAS instead of NASM
) and it's just theory for the moment. Since the design is very complicated, I need to provide megabytes of code to make even one step. But the cool thing is that when built the heavy foundation, everything goes by itself. That's a design form I use very much and proves to be very productive, though requiring a strong mind. It is just like building complicated electrical components, and then connecting them with wires. Then, it allows anyone to plug in new components through new wires to extend the functionnality.
On the other hand, LLVM is a quite big piece of code, and its analysis may be a hard time, but I'm sure we can finally get a good basis from it. Don't you ?
VMWare, VirtualBox or QEMU will run Linux or Windows or SparrowOS. They are not byte-code virtualization -- something entirely different, like bochs, more or less.
I wrote a compiler that takes a dialect of C/C++ I invented and generates a flat x86_64 binary file or places code into memory JIT ready to run. It is compiled, not interpreted and is not a virtual machine and does not have byte code, but real x86_64 machine code.
My boss Denny wrote our PASCAL compiler when I worked on Ticketmaster's VAX operating system. It took him a year. Troy wrote our Assembler and Linker. I wrote my C/C++ compiler and everything else over the past 9 years, full-time. At age 20 in 1990, I was hired as a professional operating system VAX asm programmer.
Re: The place of virtualization in Operating Systems
Posted: Mon Nov 19, 2012 1:41 pm
by SparrowOS
gerryg400 wrote: But I'm pretty sure one can take LLVM architecture as a basis and develop a clone with all the additionnal features we need, such as platform-independant bytecode, or a real VM.
I'm pretty sure you can't. LLVM does not manage code and is not a virtual machine. It is the IR for a compiler and thus is simply the original source code in another form. It will not provide the basis for virtualisation any more than the original C code or its GCC-compiled code would.
My compiler is 22,000 lines of code and I wrote it all from scratch.
You can download it from when it was written in TASM -- 2004 Internet Archive:
http://web.archive.org/web/200406062127 ... com/OS.htm
You can verify it is currently 22,000 LOC:
http://www.sparrowos.com/Wb/Accts/TS/Wb ... .html#l395
Re: The place of virtualization in Operating Systems
Posted: Mon Nov 19, 2012 2:30 pm
by SparrowOS
You can download my operating system including my compiler with all 136,000 LOC and run it in a virtual machine:
http://www.sparrowos.com
Echo(ON); shows text going into my compiler.
LTrace(ON); shows the tokens coming out of my lexical analyser
PTrace(ON); shows Intermediate Code coming out of parse stage
OTrace(ON); shows code as it is being optimized through the 11 passes
CTrace(ON); shows the disassembled machine code
If you want to see a 220 line arithmetic-expression to x86_64-machine-code compiler look here:
http://www.sparrowos.com/Wb/Demo/Lectur ... piler.html
Re: The place of virtualization in Operating Systems
Posted: Mon Nov 19, 2012 3:08 pm
by SparrowOS
Does anyone else have a hard time convincing people your kernel is not Linux? It's really frustrating. Mine is ring-0-only and 100% all the time all memory identity-mapped. There is surely nothing I could have stolen from Linux even if I wanted to. My compiler is the same way. Get these retards who don't know countless other people have made a compiler in a year or two. I have to name famous people like Dennis Richie and remind them he did a compiler in a year or two.