易截截图软件、单文件、免安装、纯绿色、仅160KB

Linux执行以及虚拟内存之用

Linux Execution and Virtual Memory Utilization 
Linux执行以及虚拟内存之用
When Linux boots, it starts with the MMU disabled, so initially it deals only with physical 
memory. The kernel image is copied to physical address 0x8000 in DRAM and executed. First a master page table is created and placed just before the kernel, which describes all available DRAM. The MMU is then switched on, mapping all of DRAM to virtual address 0xC0000000. The kernel reserves 64K of virtual memory for the interrupt handler code (usually at the very top of virtual memory), and sets up all the mappings for the hardware registers (UART, USB, LCD, GPIO, etc). Once kernel space is established and all drivers are initialized, the linux kernel moves on to establishing user space. This involves reading in the file system and actually executing processes. 
当Linux启动时,是以MMU禁用来开启它的旅途的,因此,它起初只关注物理内存。内核映像(kernel image)被拷贝到DRAM的物理地址 0x8000处,并得到执行权。第一个主页表( master page table)从而诞生,并紧挨着内核映像存放,这个页表是对全部可用DRAM的描述。此后,MMU被启用,从而把全部DRAM映射到从0xC0000000开始的虚地址。内核为中断处理程序保留64K虚拟内存(通常在虚拟内存的顶端),然后为所有的硬件寄存器(UART, USB, LCD, GPIO, etc)建立映射。一旦内核空间建立起来,并且所有的驱动程序都被初始化,则Linux内核转向建立用户空间。这涉及到在文件系统中读取并实际执行进程。
Each process that runs on the system does so in its own memory “context”. Each context 
has its virtual memory space established and maintained by the kernel using a separate page table. So each process can “see” the entire user space, but its underlying physical memory is different from the other processes. Multiple processes and their contexts are run in time slices. This means that each process executes for a time, then is halted, and execution is passed to the next process in a rotating queue. The act of passing execution is called “context switching&r


相关文档:

Linux signal函数解析

    以下在centos5.3上实验。在linux中signal函数是通过调用sigaction来实现的,由此它不存在信号丢失以及每次信号处理后会把信号处理改成默认处理方式。但对于系统调用函数被信号打断时,系统调用是否会自动启动好像没怎么说明。不过可以自己动手看一下:
    signal(SIGTERM, term_handle ......

使用Gnu gprof进行Linux平台下的程序分析

O.S 使用Gnu gprof进行Linux平台下的程序分析
关 键 词:gprof callgraph 函数消耗的时间 Linux应用分析
阅读提示:本文介绍了如何使用Gnu gprof 对Linux平台下的现有程序进行优化分析和生成程序调用图。主要偏重于对生成和使用流程图作介绍。
Gprof 简介:
    Gprof功能:打印出程序运行中各个函数消耗 ......

Linux——NFS网络文件系统

NFS网络文件系统是通过文件系统实现资源共享的一种最重要的方式。
c/s 客户机   服务器
B/S 浏览器   服务器
NFS服务端配置:
编辑/etc/exports文件以配置开放路径。/home/share      192.168.0.123(ro)/(rw).
/etc/init.d/portmap  restart
/etc/init.d/nfs&nb ......

linux 系统源码安装 mysql 、fedora10 mysql5

操作系统 Fedora 10
mysql安装包 mysql-5.0.85.tar.gz
1、创建mysql用户组和用户名
# groupadd mysqlGroup
  (创建组)
# useradd -g mysqlGroup mysqlUser 
(创建一帐号)
2、解压安装包 ,当前目录为 /home/hust/down/mysql/
# tar -xvzf mysql-5.0.85.tar.gz 
      ......

linux getopts命令,处理shell脚本参数

#!/bin/bash
while getopts "ab:cd:" Option
# b and d take arguments
#
do
case $Option in
a) echo -e "a = $OPTIND";;
b) echo -e "b = $OPTIND $OPTARG";;
c) echo -e "c = $OPTIND";;
d) echo -e "d = $OPTIND $OPTARG";;
esac
done
shift $(($OPTIND - 1)) ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号