- 博客(158)
- 资源 (4)
- 收藏
- 关注
原创 Linux内核设计与实现学习笔记
第一章 linux内核简介 1.1 追寻linux的足迹:linux简介 *起源于unix/minix,C,Internet + Linux Torvalds等开发者的努力 *遵循GPL的非商业化发行 *主要包括内核,C库,编译器,工具集,系统工具等 1.2 操作系统和内核简介 *内核需要实现中断处理,调度,内存管理,网络,IPC等功能 *内核空间/用户空间
2009-11-28 21:40:00 1095
原创 objdump/nm
1,objdump -h jprobe_example.ojprobe_example.o: file format elf32-i386Sections:Idx Name Size VMA LMA File off Algn 0 .text 0000002a 00000000 00000
2009-11-23 23:53:00 760
原创 kprobe
kprobe是内核提供的探测内核代码的一种机制,有助于开发人员跟踪内核代码运行状态。1,three types--Kprobes, Jprobes, Return Probes2, arch support--- i386---arm---... 3,configs--CONFIG_KPROBES --CONFIG_MODULES--CONFIG_M
2009-11-22 22:42:00 1419
转载 JSR179 LocationAPI
import javax.microedition.lcdui.*;import javax.microedition.midlet.*;import javax.microedition.location.*;import java.util.Date;import java.io.PrintStream;public class TestLocation extend
2009-10-22 17:47:00 652
原创 有用的Bash命令
拷贝所有的C文件到目录aa find . -name "*.c" | xargs -i cp {} daemon/aa/ 把所有C文件,重新命名为.c.bkfind . -name "*.c" | xargs -i mv {} {}.bk 把所有.*文件,重新命名为.suffixls | awk -F . {print "mv "$0" "$1"/.suffix"
2009-10-21 15:17:00 652
转载 daemon程序
#include #include #include #include #include void init_daemon(void){ int pid; int i; if(pid=fork()) exit(0);//是父进程,结束父进程 else if(pid< 0) exit(1);//fork失败,退出 //是
2009-10-21 11:16:00 560
原创 Makefile编写
## Makefile for src directory#PROJDIR := ../..include $(PROJDIR)/Make.properties# ---------------------------------------------------------------------------# Module
2009-10-15 11:10:00 476
转载 linux sock_raw原始套接字编程
from:http://blog.chinaunix.net/u2/62281/showart_1096746.html sock_raw原始套接字编程可以接收到本机网卡上的数据帧或者数据包,对与监听网络的流量和分析是很有作用的.一共可以有3种方式创建这种socket 1.socket(AF_INET, SOCK_RAW, IPPROTO_TCP|IPPROTO_UDP|IPPRO
2009-09-24 17:23:00 1627
原创 linux硬盘安装
1,修改boot.ini,追加一行:C:/grldr="GRUB"2,下载grub4dos,解压缩 grldr 和 grub.exe 到C盘根目录3,建立menu.lst文件,内容如下:title Install Ubunturoot (hd0,0)kernel (hd0,0)/vmlinuz boot=casper iso-scan/filename=/ubuntu-
2009-09-18 13:06:00 619
转载 .so && .a
文章选取的例子非常简单,上手容易,只是为了讲述静态与动态链接库的生成和链接过 程,还有他们之间的区别。以下例子在 gcc 4.1.1 下顺利通过。文件预览文件目录树如下,如你所见,非常简单。 1. libtest/ 2. |-- lt.c 3. |-- lt.h 4. `-- test.c 代码#
2009-09-18 13:01:00 493
转载 git使用说明
Q:You are in the middle of a conflicted mergeA:git fetch origin git reset --hard originQ:How to get linux2.6 mian tree using gitA:git clone git://git.kernel.org/pub/scm/linux/kernel/git/tor
2009-09-18 12:59:00 1688
转载 LAMP配置
Ubuntu下配置LAMP(Linux+Apache+Mysql+PHP)环境PHP服务器的架设一、安装Ubuntu8.04虽然说是配置LAMP环境,但在文章里并不会讲述如何安装Ubuntu8.04,因为关于如何Ubuntu8.04在网上已经有很多的教程了,就算是硬盘安装也是一件很简单的事了。这里我就给出一个链接好了,Ubuntu8.04硬盘安装指南,当然,上面这篇文章只是给出了安
2009-09-18 12:58:00 459
转载 arp攻击
#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #i
2009-09-18 12:54:00 714
转载 sock_mmap
//==============================================================//socket_mmap.cpp//此程序演示了如何采用内存映射的方式采集数据包//这是应用层数据库采集性能最高的方法//g++ -o socket_mmap socket_mmap.cpp -Wall -lpcap#include #i
2009-09-18 12:51:00 1786
转载 rootkit
hook系统调用函数 /*hideps.c*/#include #include #include #include #include #include #include #include #include #include #include #include //#include //#include #define C
2009-09-18 12:41:00 511
原创 J2ME开发环境配置
1,Eclipse 3.4 (Ganymede)+ 推荐Eclipse 3.5 Java EE版 http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/galileo/R/eclipse-jee-galileo-win32.zip2,JDK5+ 推荐java_ee_sdk
2009-08-21 20:56:00 1072
原创 2.6.27.7启动过程概述
arch/x86/boot/head.S:_start ->.byte 0xeb .byte start_of_setup-1f |Varch/x86/boot/head.S:start_of_setup
2009-01-06 14:18:00 912
原创 我理解i386的系统调用过程
linux系统调用函数少,陷入内核效率高,过程大概是这样的:1,初始化阶段,登录门描述符的处理:./arch/i386/kernel/traps.cvoid __init trap_init(void){...set_system_gate(SYSCALL_VECTOR,&system_call);...}2,程序中使用 int 0x80指令陷入内核,CPU切换
2008-12-26 09:42:00 798
原创 从内核调度想到的
最近重新读了《linux内核设计于实现》的进程调度章节,对于时间片的重新计算和多cpu的负载平衡,很受启发:1,分而治之。对复杂问题,把其分散到各个细小的环节去实现,降低了复杂度,性能上有所提升,也不容易出错。2,步步为营。这是从load_balance想到的,一步一步的脚踏实地的去完成一个功能。linux的2.6及其后续的内核,实现了O(1)的调度算法,这种调度算法选取可执行进程的时
2008-12-25 15:31:00 572
转载 Linux2.6内核的vivi分区及内核MTD分区
引言 与Linux2.4内核相比,Linux2.6内核在性能、模块支持、可用性、可测量性等方面有大幅度的提高。Linux2.6内核取代2.4内核是大势所趋。 ARM9 S3C2410微处理器是一款由SAMSUNG公司为手持终端设计的低价格、低功耗、高性能,基于ARM920T核的微处理器。它与Linux的结合越来越紧密,逐渐在嵌入式领域得到广阔的应用。目前,在PDA、移动通信、路由器、工
2008-11-23 16:11:00 724
转载 NAND和NOR flash的区别
NOR和NAND是现在市场上两种主要的非易失闪存技术。Intel于1988年首先开发出NOR flash技术,彻底改变了原先由EPROM和EEPROM一统天下的局面。紧接着,1989年,东芝公司发表了NAND flash结构,强调降低每比特的成本,更高的性能,并且象磁盘一样可以通过接口轻松升级。但是经过了十多年之后,仍然有相当多的硬件工程师分不清NOR和NAND闪存。 相“flash存储器”经常
2008-11-23 00:14:00 433
转载 Linux内存:内存管理的实质
转自:http://linux.chinaunix.net/bbs/thread-1003872-1-1.html1. 内核初始化: * 内核建立好内核页目录页表数据库,假设物理内存大小为len,则建立了[3G--3G+len]::[0--len]这样的虚地址vaddr和物理地址paddr的线性对应关系; * 内核建立一个page数组,page数组和物理页面系列完全是线性对
2008-11-18 21:25:00 494
原创 FC7内核编译过程
1,从www.kernel.org上取得源代码。下载后解压缩到目录,如/home/user ,command:tar -xvjf linux-2.6.24.tar.bz22,配置内核编译选项。command:make menuconfig,也可以使用make defconfig,来生成一份系统默认的配置3,编译。command:make,也可以使用make -j2,来衍生两个编译作业。编译
2008-10-17 20:16:00 573
转载 写给Linux内核新手-关于Linux内核学习的误区
转自:http://linux.chinaunix.net/bbs/viewthread.php?tid=626486&extra=page%3D5%26amp%3Bfilter%3Ddigest 先说句正经的:其实我没资格写这篇文章,因为自己也就一两个月以来才开始有所领悟的。因此,这里与其说是关于Linux内核学习的经验,不如说是自己的教训吧,希望不要扔鸡蛋砸我^_^ 常常有人问
2008-07-27 07:54:00 400
原创 8259A PIC
寄存器: IRR:Interrupt Request Register,中断请求寄存器,共8bit,对应IR0~IR7 八个中断管脚。当某个管脚的中断请求到来后,若该管脚没有被屏蔽,IRR 中对应的bit 被置一。表示PIC 已经收到设备的中断请求,但还未提交给CPU。 ISR:In Service Register,服务中寄存器,共8bit,每bit 意义同上。当IRR 中的
2008-07-27 07:29:00 820
原创 Understanding the linux kernel-ch7-Process Scheduling
7.3 Data Structures Used by the Scheduler· The runqueue Data Structure//kernel/sched.c/* * This is t
2008-07-22 20:13:00 474
原创 Understanding the linux kernel-ch7-Process Scheduling
7.1 Scheduling Policy· fulfill several conflicting objectives: fast process response timegood throughput for back
2008-07-22 20:10:00 590
原创 Understanding the linux kernel-ch6-Timing Measurements
6.3 Updating the Time and Date//kernel/timer.c/* * Called by the timer interrupt. xtime_lock must already be ta
2008-07-19 11:21:00 504
原创 Understanding the linux kernel-ch6-Timing Measurements
6.2 The Linux Timekeeping Architecture· The kernel uses two basic timekeeping functions: one to keep the current time up-to-date and
2008-07-19 11:19:00 547
原创 Understanding the linux kernel-ch6-Timing Measurements
6.1 Clock and Timer CircuitsReal Time Clock (RTC)Motorola 146818IRQ 82 Hz and 8,19
2008-07-19 11:05:00 511
转载 Linux 启动过程
首先让我们看看传统的启动流程:加载并运行Master Boot Record(MBR)主引导区内容(如lilo等)。然后扫描分区表,定位活动分区,并将活动分区上的引导扇区内容加载到内存中执行。系统引导过程主要由以下几个步骤组成(以硬盘启动为例)1、 开机;2、 BIOS加电自检(POST——Power On Self Test),内存地址为0fff:0000;3、 将硬盘第一个扇区
2008-07-09 19:19:00 560
原创 linux 2.6.11 bootsect.s解读
/* * bootsect.S Copyright (C) 1991, 1992 Linus Torvalds * * modified by Drew Eckhardt * modified by Bruce Evans (bde) * modified by Chris Noe (May 1999) (as86 -> gas) * gutted
2008-07-07 19:50:00 1242
原创 Understanding the linux kernel-ch4-Interrupt Handling
Interrupt handling depends on the type of interrupt. three main classes of interrupts:I/O interruptsAn I/O device requires attention; the corresponding i
2008-07-03 20:27:00 593
原创 Understanding the linux kernel-ch4-Exception Handling
Exception handlers have a standard structure consisting of three steps:1. Save the contents of most registers in the Kernel Mode stack (this part is coded in asse
2008-07-03 20:24:00 525
原创 Understanding the linux kernel-ch4-Initializing the Interrupt Descriptor Table
Interrupt, Trap, and System Gates
2008-07-02 19:20:00 596
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人