Friday, March 30, 2007
בראשית-Bərêšîth-Genesis
In the beginning, the earth was without form and void, and darkness was upon the face of the deep [Torah]; many, many years later; the sons of the sons of the sons......of Noah said; let it be a CPU and there was a Central processing Unit, or simply processor, whose job was to process data and to interpret computer programs instructions, hence an important difference between processes and programs: were programs are the set of instructions which we call a process once they are being processed by the processor (makes sense doesn't it?), in other words a process is a program under execution. And Noah's grand grand... children saw that the processor was good, but for this processor to be of some real use; it had to interact with some computer resources. And as systems went larger and complex, managing computer resources and processing interactions became a development complicated issue. Thus, operating systems (OSs) were born as a set of programs developed to provide standardized solutions for managing computer software and hardware.
Having operative systems and their services; a new world of concepts such as process and memory management, device drivers, disk and file systems, networking, etc. started to have a meaning and reason for existence.
As long as the computer is a Harvard or von Neumann architecture like the one the reader certainly has at home, only one process can run per CPU core at a time. As a solution for that; the time-sharing magic appeared at early 1960's, enabling concurrent execution of many processes at once per processor core, the trick behind it is called process management; and it is simply done by quick-switching processes, therefore distributing CPU time, which will be explained in deatail.
Having many concurrent executions dramatically increases memory management complexity, since it has to coordinate how memory is used by processes. Keep in mind that now days system's memory, is divided in various types, depending on its access speed. we have registers, CPU cache, random access memory (RAM) and at last: disk storage. The memory manager deals with those various types of memory by determining how to move data between them. To help with that task, virtual memory management was invented, there, memory is divided in virtual and physical addresses, having the virtual ones as those unique to processes, and real addresses as those unique to memory manager and CPU, that provides a separation between the physical memory and addresses used by programs. It is important to understand that in memory; programs consist mainly of two things: ``Text'' where program's running instructions are stored, and ``data'' where hardwired and volatile information such as string constants and variable values are stored, but as programs become a little bigger, the use of functions or subroutines is necessary, so there is a need for storing current process state before they call a function, consequently there must be some specific place to store such information, which is called the process's stack. For security reasons some operative systems split text, data and stack sections into what is called segments. Having that clear, when a program is about to be run, a virtual memory space for its text, data and stack information is created, that means that at process point of view, virtual memory its the only memory available, which is organized , but as process's need for more memory arises, data segment can change its size dynamically, by reallocating memory from unused memory areas called heap, that method is known as heap-based memory allocation.
It is common to hear people talking about 64-Bits now days, due to AMD's successful publicity, what this number is telling us is the largest number an AMD-64 can work with at a time, called word-size; which in that specific case is 64 bits. There are many implications from it, one important comes if we think about addressable addresses in memory, for example the common 32-Bit architectures have top of 2^32-1 bits = 4GB to work with. Therefore having a virtual address space from 0x00000000 to 0xffffffff, which is divided in peaces called pages. Same thing happens to physical memory but divisions are called frames. So a program segment can be located in virtual address A found by its page and offset numbers but it really corresponds to a physical address B, located by its frame and offset numbers, and what the virtual memory manager does is to translate virtual into physical addresses, with the use of a page table containing page-frame mappings, but address translation by software rutines is time consuming, and therefore reduces system's eficiency, so they decided to fasten this by storing most recent page-frame mappings into a very fast content addressable memory, known as the translation lookaside buffer (TLB), in which the search key is the virtual address and the search result it's corresponding real address. If no match ocured then a software address translation is trigged, improving virtual memory management speed.
to be continued.....
Wednesday, March 28, 2007
Good old make times before scons
What tha f*&%k have I gotten my self into?, sent this paper signing my own death penalty, I was very wrong thinking, if I was planning to finish my undergrad project in no longer term than a month, hence I could start backpacking Latin America for as long as my wallet would've supported it. why didn't I do some stupid piece of dummy borland software, like every f**&cking else. Did I mentioned that I never liked python at all?, well surprise, I'm starting to hate scons build system, it makes it dificult for me to understand things, and I also feel frustated because of me not understanding as quick as I expected the iguana-devel sources, too late to figure out that it is not as simple as understanding the papers.
WHEREEEEEEEEEEEEE THE HELL IS THE SCHEDULE FUNCTION EXECUTED FOR THE FIRST TIME IN WOMBAT????????
Any how, just for the record: To find a function code: Must first check on the file you're reading, then if nothing is there; cd to libs dir, and grep -r "FunctionName" *.
Oh, also some useful documents I've found, for "code understanding"
L4 Development
L4-X2 Reference manual (outdated, for what I'm working on, since Im using the N series :)
also found this on the mailing list:
> Can anyone help me and describe the execute process of L4:pistachio mainly? Thanks.
See the "Teaching" section of the L4Ka web. There are some very
interesting slides like:
http://i30www.ira.uka.de/teaching/coursedocuments/80/mkc-03.pdf
template env for lua
Tuesday, March 27, 2007
Wombat memory
Hal Ashburner:
This is the size of the iguana memsection that is created and backed byphysical memory that is passed to wombat that wombat can then use forits heap.
As far as wombat is concerned this is all the memory available for its heap, it knows of no more and can't use anything else.
And what is the L4_ZONE_SIZE?,
Oh, yes and about my last e-mail, does somebody know why is it that I have to use the -nographic parameter with qemu in order to run the c.img image?
Hal Ashburner:
Because there is no vga driver enabled in the version of wombat you areusing.
Thank you very much,
Thursday, March 22, 2007
L4 embedded + Wombat Linux in 3 simple steps, Magic?
First you have to get the required software + plus some other useful things:
apt-get remove --purge gcc g++
apt-get install gcc-3.3 g++-3.3
apt-get install python
apt-get install scons
apt-get install sudo
apt-get install qemu
apt-get install qemuctl vgabios qemu-launcher kqemu-common
apt-get install kqemu-modules-
apt-get install bazaar
WARNING gcc-3.3 and g++-3.3 are required!
Now that we have what we need, we will get the last version of iguana-devel into some particular directory, check out this link for further explanation.
mkdir wombat-rep
cd wombat-rep
baz register-archive http://www.ertos.nicta.com.au/arch/public/
baz get ertos@nicta.com.au--public/iguana-project--devel
cd iguana-project--devel--1.2--version-0/
baz build-config packages
Now go get your self something to eat!!
scons machine=pc99 simulate
or
tools/scons.py machine=pc99 simulate
Results on the build folder, and if getting hands dirty is wanted, there's a doc folder with iguana framework information.
That's it!! Special thanks to the ERTOS NICTA group for making this as simple as it is!!!
Thursday, March 15, 2007
Just in case jorge sees it!
>Well and the other question, this removal of sigma0 need, happens at the L4::N1 implementation or is it a very recent l4:Pistachio improvemnet?
I think it is N1. The change is that MapControl allows the roottask to insert explicit mappings, rather than relying on the address space of sigma0.
Wednesday, March 14, 2007
close your eyes.... OPEN UP!!
A decision on releasing the framework has not been made (yet), but youIt seems that I can implemented it my self plus some other things I believe I can add to it. The question is: What do I want it for?, well I wrote long time ago at the kenge users list about me wanting to merge down the wombat scheduler into a L4 embedded thread. so that's precisely what I have in mind. one important thing is that I cannot shoot my own foot, so I have to make my goal something like this:
can read more about it in this paper
TITLE (which describes the goal): Framework for realtime Wombat Linux scheduler
Back on top of the saddle
Fist things first:
Find me an advisor: I called my friend Rafael Gonzalez, a very busy fluidsignal worker, teacher at the UPB and a very nice guy, told him it was going to be related to L4, so he accepted. Now I have to write a project description, and e-mail it, lets see how he likes it!
(ANTEPROYECTO) Project description: I have promised my self that this will be finished before Friday night!.