Address Space and Process
地址空间与进程
Programs in Symbian OS consist of a number of processes, each of which contains one or more conceptually concurrent threads of execution.
Symbian OS 的程序可以包含若干进程,每个进程包含若干在概念上并发执行的线程。
Each
user process has its own private address space, i.e. a collection of
memory regions which that process can access. A user process cannot
directly address 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
Kernel server (内核服务器)线程:是一个初始的进程,在系统启动时就已经存在。它可以在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.
null (空)线程:当系统中没有其他可运行的线程时这个线程就开始运行,null 线程使处理器处于空闲状态,减少耗电。
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:
线程的地址空间包括若干chunk。在刚创建的时候,进程只有一个线程(主线程)和1到3个chunk。它们是:
The stack/heap chunk containing the the stack and the heap used by the main thread of the process; this chunk always exists
stack/heap chunk:这里包括了进程的主线程所要使用的stack 和 heap。所以这个chunk 通常是进程所必须的。
The code chunk; this exists only if the process is loaded into RAM (i.e. it is not ROM resident).
code chunk:这个chunk 只有当进程被加载到RAM时才出现,也就是说,线程并没有寄居在ROM中。
The data chunk; this exists only if the process has static data.
data chunk:只有当进程拥有静态数据的时候才会有这个chunk
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.
浙公网安备 33010602011771号