linux¸ùÎļþϵͳ¹ÒÔØ
ÓÉbootload½øÈëlinuxºóÓÉhead.s½øÈëÁËstart_kernelÁË.
asmlinkage void __init start_kernel(void)
{
char * command_line;
extern struct kernel_param __start___param[], __stop___param[];
………………..
setup_arch(&command_line);
………….
………..
vfs_caches_init(num_physpages); ………….
…………...
rest_init();
}
ÖØÒªº¯Êý½âÊÍ
1.Setup_archÊǽâÊÍbootloader´«¹ýÀ´µÄ²ÎÊý£¬²¢¸½Ïà¹Ø²ÎÊý¡£
void __init setup_arch(char **cmdline_p)
{
struct tag *tags = (struct tag *)&init_tags;
struct machine_desc *mdesc;
char *from = default_command_line;
setup_processor();
mdesc = setup_machine(machine_arch_type);
machine_name = mdesc->name;
if (mdesc->soft_reboot)
reboot_setup("s");
if (mdesc->boot_params)
tags = phys_to_virt(mdesc->boot_params);
/*
* If we have the old style parameters, convert them to
* a tag list.
*/
&nb
Ïà¹ØÎĵµ£º
//
ͬ²½ÎÊÌ⣺
¶Ô¹²ÏíÊý¾ÝµÄ·ÃÎÊ£¬ÐèҪͬ²½£¬»¥³â¡£
ÔÚÖжϣ¬ÇÀÕ¼£¬¶àCPU£¬¶àÏß³Ì »·¾³ÏÂÓÈÆäÖØÒª¡£
ͬ²½·ÖΪ: ×èÈûͬ²½£¬·Ç×èÈûͬ²½
×èÈûͬ²½ÓÐÐí¶àʵÏÖ·½Ê½ÁË£ºmutex, semaphore. ×èÈûͬ²½Ê¹Óò»µ±¾Í¿ÉÄÜÔì³ÉËÀËø£¬»îËø£¬ÓÅÏȼ¶·´×ª¡£
·Ç×èÈûͬ²½£º£¨ÏÖÔÚÁ÷ÐÐÈýÖÖ£©
wait free ºÜÄÑʵÏÖ£¬Ë¼ÏëÊDZ¾Ïß³ÌÓÐÏÞ²½¾Í ......
/*
* ¸ÃÎļþÖеÄÁ½¸öº¯Êýread_pipeºÍwrite_pipeÊÇÉϲ㺯Êý
* readºÍwriteµÄµ×²ãʵÏÖ
*/
/*
* linux/fs/pipe.c
*
* (C) 1991 Linus Torvalds
*/
#include <signal.h>
#include <linux/sched.h>
// ÄÚ´æ¹ÜÀíÍ·Îļþ¡£º¬ÓÐÒ³Ãæ´óС¶¨Òåº ......
/*
* linux/fs/file_dev.c
*
* (C) 1991 Linus Torvalds
*/
#include <errno.h>
#include <fcntl.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <asm/segment.h>
#define MIN(a,b) (((a)<(b))?(a):(b))
#defi ......
1£¬ÍøÂçÕûÌåÁ÷Á¿²é¿´
ifconfig -s
cat /proc/net/dev
sar -n DEV/EDEV interval(ʱ¼ä¸ô) count(´ÎÊý)
nload -m [-d interface]
2£¬Ïêϸ²é¿´ÍøÂçÁ÷Á¿£¬±ÈÈç²é¿´Ä³Ò»¸öip/port£¬Ä³Ò»¸öÐÒé
iptraf£¬Îı¾´°¿Ú½çÃæ
ntop£¬webÍøÒ³½çÃæ ......
ÔÚlinuxÉÏ£¬jprofiler¿ÉÒÔ·ÖÎöjavaµÄÈí¼þϵͳ£¬oprofile¿ÉÒÔ·ÖÎöCµÄÈí¼þϵͳ¡£
oprofile¿ÉÒÔ˵ÊÇÒ»¸ö¹¤¾ß¼¯£¬°üº¬£º
ophelp£¬
opcontrol£¬
agent libraries£¬
opreport£¬
opannotate£¬
opgprof£¬
oparchive£¬
opimport¡£
³ ......