Wednesday, May 30, 2007

So what is it that you're doing Jorge?


Well, sometimes Images have more words than bytes (joke?), anyhow it's called MPSched, a multi personality scheduler.

Problems breathing?, get some Doxygen

Well, I found this project which really can give some Oxygen

http://www.stack.nl/~dimitri/doxygen/

It helps people around the globe on documenting code.

Friday, May 25, 2007

ICONTEC up my ASS!!


Well, AFTER HARD WORKING ON IT, I STILL CAN'T MAKE MY DOCUMENT LOOK AS UGLY AS ICONTEC WANTS ME TO!: Story begins yesterday when I lost all my day working on something I couldn't avoid to do; unfortunately any UPB's undergrad project documentat should be properly delivered in compliance with ICONTEC norms for documents, thing is, I'm using LATEX and as you can imagine there is not a single LATEX class for ICONTEC on the searchable planet (google), meaning that I have two options: redo on M$ word, or .cls DOITYOURSELF, since such animal was climbing my leg directly to my ass, I decided to put an end to it yesterday. Well, after a complete day of tweaking the standard neat book class; I STILL CAN'T DEFEAT IT PROPERLY INTO ICONTEC, IT STILL LOOKS SOMEHOW NICE!!!!!!!!!!!!!, once I get it done, I'll sure share such .cls file to the world.

Wednesday, May 16, 2007

Dresden's TUDOS


It seems that not everything in Dresden is about neonazis, people at UT Dresden, have been working hard for the last years on L4 fiasco, among of which I will want to have in record:

Three thumbs up for UT-Dresden!!!,
too bad I still feel scared about the idea of visiting some day.

Thursday, April 26, 2007

evolving to OKL4

Well, I was out of town for almost one week, now that I'm back, I've been informed that OKL4 has been released at Open Kernel Labs, and now getting it up and running seems much more simplier, than old iguana-devel:

wget http://portal.ok-labs.com/_assets/downloads/okl4_release_1.4.1.1.tar.gz
tar xvfz
okl4_release_1.4.1.1.tar.gz
./tools/build.py machine=ia32_pc99 project=iguana wombat=True simulate

I've noted some changes:

there is no lua script and init for iguana, therefore, I have a few questions:

What is the l4 to wombat init sequence, and where can I customize it?

The other thing: I'm trying to understand the iguana/server/src/main.c

but I can't find the server_loop() function code.

Here is some output:
jetorres@dolce:~/cool/okl4_release_1.4.1.1/iguana$ grep -r server_loop * ../libs/*
naming/src/naming_server.c: server_loop();
serial/src/main.c: server_loop();
server/src/main.c:extern void server_loop(void);
server/src/main.c: server_loop();
timer/src/main.c: server_loop();

Wednesday, April 11, 2007

Genesis II

Various processes running in the same computer implies a risk of having one process corrupting some other process memory, because of that; memory protection concept evolved into the allocation of distinct pages of memory for each process into segments, its limitations are defined by two hardware registers, hence, if a process tries to access memory outside the defined segment a protection mechanism is used, such as Intel's general protection faults. Having that; the concept of memory management unit (MMU) appeared as the set of components responsible for handling memory access from the CPU.

Time-sharing has also had a very interesting evolution into what we know as multitasking, which defines scheduling policies that decide which task runs at any given time, and establishes a mechanism known as context switching that reassigns CPU from one process to another. Concept began at computing early days, where peripherals (devices hooked up to the CPU) became much more slower than processing units, so when a process needed access to a peripheral, the CPU had to stop executing instructions while such peripherals were busy. Thus, multiprogramming idea came to scene by context switching every time a process was waiting, but that gave no guarantee of process to be run at proper times, since one could run for very long periods of time without triggering a context switch. That was absolutely not suitable for interactive computing needs, therefore cooperative multitasking was designed; there, processes ceded time to each other in a voluntary manner, however multitasking dangerously relied on each process to efficiently give time to the others, consequently the preemptive multitasking idea was born about assigning operating time slices to each process. Only then; processes were cataloged into two different groups; CPU-bounded ones as those who were fully utilizing CPU, and I/O bound processes as those waiting for input or output from peripherals. A perfect Martini came out of blending preemptive multitasking with hardware interrupts, which would rather than inefficient I/O bound process to constantly check for resource availability. It gives a call to subroutines handling the interrupt event of resource availability, changing I/O bound processes state from on hold or blocked to unblocked as it may correspond, meaning that blocked processes would properly return to execution.

At that point processes were so handy, that programmers started use them by assigning different tasks to different processes, which then was generally understud as a set of cooperating processes that people started to reffer as applications, the main issue behind it, was finding appropriate ways to exchange information between application's processes. As a result of that search; Threads were proposed as cooperating lightweight processes coexisting in a shared memory space or context, thus, another advantage was found in their favor, and it was that memory context switching was not necessary when context switching between threads.

Friday, March 30, 2007

בראשית-Bərêšîth-Genesis

I decided to start from the beginning, and here it goes my first undergrad chapter:

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.....