- 博客(11)
- 资源 (6)
- 收藏
- 关注
原创 启动进程所需要的基本条件
进程是现代计算机系统运行的最小单位,所以没有进程也不能称之为操作系统。 当系统启动后,设置了GDT, IDT进入了保护模式后,需要哪些东西才能让进程跑起来呢?其实简单说来进程产生的目的并不是要让程序跑起来,而是要让一个系统上有多个进程一起跑。因为如果一个系统上只有一个所谓的“进程”在跑,那就没有必要保存再恢复进程的运行环境了。 好,来看看都要加哪些东西才
2008-12-25 20:37:00 2792
原创 IA32保护模式所包含的内容
进入保护模式是现代操作系统的基础,那保护模式都包含哪些内容呢?在这里列举一些,虽然不全面,但也基本够用了。 1. GDT 因为进入保护模式后传统的寻址方式发生了变化,所以使用GDT是CPU进入保护模式运行的最小条件。2. LDT 3. 页式存储4. 中断和异常5. 特权级变换 最简单来说,只要cr0寄存器的0位置1,CPU就进入了保护模式。但是此时的CPU的功能还是
2008-12-25 08:37:00 1361
转载 汇编和 c同步使用
一共有三个文件 makefile foo.asm bar.c函数调用遵循的是c调用约定,后面的参数先入栈,并由调用者清理堆栈 makefile ------------------- .PHONY: all cleanall: foobarfoobar: foo.o bar.o ld -s -o foobar foo.o bar.ofoo.o: foo.asm
2008-12-17 21:39:00 979
原创 Makefile example
==========================================#!/usr/bin/makevpath %.cpp srcvpath %.c srcvpath %.h includeCC := g++#SOURCES := socket.cpp UDPSocket.cpp address.cppSOURCES := $(notdir $(wil
2008-12-17 20:55:00 1057
转载 Converting 32-bit Applications Into 64-bit Applications: Things to Consider
source is fromhttp://developers.sun.com/solaris/articles/ILP32toLP64Issues.html and http://www.unix.org/whitepapers/64bit.html there are several kind of data type mode Data Ty
2008-12-16 11:12:00 799
转载 mq_notify usage
Forget where find the source code. #include #include #include #include #include #include #include #define handle_error(msg) / do { perror(msg); exit(EXIT_FAILURE); } while (0)static void
2008-12-12 15:54:00 1721
转载 POSIX message queues brief usage
Code from http://mij.oltrelinux.com/devel/unixprg/// a little error in the original version, changed a little More information on POSIX message queue http://www.linuxhowtos.org/manpages/7/mq_o
2008-12-12 15:31:00 1547
转载 getopt function usage 获取命令行参数
the original code is fromhttp://www.gnu.org/software/libtool/manual/libc/Example-of-Getopt.htmlI changed a little. #include #include #include #include int main(int argc, char *argv[]
2008-12-11 17:54:00 1066
原创 Concept clearification of Transaction, dialog and call
A single SIP request and all its responses form a SIP transaction. Different types oftransaction are used for different protocol functions. For example, an INVITE starts atelephone call, and a MESSAGE
2008-12-08 14:30:00 935
原创 SIP related RFC
QoS RFC 3312, Integration of Resource Management and SIP, defines an extension to SIPthat enables media reservation before the phone rings. This ensures that, when the phoneis picked up, the me
2008-12-08 14:28:00 780
原创 计算余数
#include int naive_mod(const char* m, const int n){ int remainder = 0; int num = 0; while (*m) { num = num*10 + *m-0; remainder = (remainder * 10 + (*m++ - 0)) % n;
2008-12-01 18:24:00 1027
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人