Address Space and Process

Programs in Symbian platform consist of a number of processes, each of which contains one or more conceptually concurrent threads of execution. Each thread has at least one chunk of memory.

Each user process has its own private address space, that is, a collection of memory regions which that process can access. A user process cannot directly access memory areas in the address space of another process. Threads belonging to a user process run at user privilege level.

There is a special process, the Kernel process, whose threads run at supervisor privilege level. This process normally contains two threads:

  • the Kernel server thread, which is the initial thread whose execution begins at the reset vector, and which is used to implement all Kernel functions requiring allocation or deallocation on the Kernel heap

  • the null thread, which runs only when no other threads are ready to run. The null thread places the processor into idle mode to save power.

The address space of a process consists of a number of chunks, where a chunk is a region of RAM mapped into contiguous virtual addresses. On creation, a user process contains one thread (the main thread) and one to three chunks; these are:

  • The stack/heap chunk containing the stack and the heap used by the main thread of the process; this chunk always exists.

  • The code chunk; this exists only if the process is loaded into RAM (it is not ROM resident).

  • The data chunk; this exists only if the process has static data.

If a process creates additional threads, then a new chunk is created for each new thread. Each chunk contains the thread's stack; if a new thread is not sharing an existing heap, then the chunk also contains a new heap.

Related information
Shared Memory Between Threads