- 博客(10)
- 收藏
- 关注
原创 慢慢欣赏linux 进程调度之用户权限管理
用户的权限存在什么地方呢?dentry还是inode? struct inode ...... uid_t i_uid; gid_t i_gid; ...... linux的用户及权限管理 https://blog.csdn.net/czlan91/article/details/72465730 li...
2018-07-27 06:48:43 150
原创 linux内存管理之高端内存
linux内核只能访问1G的内存空间,对于超出1G的内存,需要借助于page管理 linux 用户空间与内核空间——高端内存详解 https://blog.csdn.net/Tommy_wxie/article/details/17122923...
2018-07-25 07:10:30 161
原创 中断学习之外部中断 powerpc实现
PPC中断处理函数的入口地址 IVPR[32-47] | IVORn[48-59] | 0b'0000其中IPVR定义虚拟基址interrupt_base,描述如下: interrupt_base: //head_fsl_booke.S (c:\linux\linux-2.6.23\arch\powerpc\kernel) 26851 2007/10/10 /* Cri...
2018-07-15 21:00:23 1770 1
原创 中断学习之timer_interrupt x86实现
以2.6.23为例 irqreturn_t timer_interrupt(int irq, void *dev_id) =>do_timer_interrupt_hook(); =>global_clock_event->event_handler(global_clock_event);//dev->event_handler = tick_handle...
2018-07-14 07:54:57 2127
原创 进程调度之time_init
2.6.23的内核void __init time_init(void) =>tsc_init(); =>cpu_khz = calculate_cpu_khz(); tsc_khz = cpu_khz; =>clocksource_register(&clocksource_tsc); =>late_time_init = choose_time_...
2018-07-13 07:30:18 1511
原创 进程调度之tick_init
clocksource 时钟源对象,一个例子是 static struct clocksource clocksource_hpet = { .name = "hpet", .rating = 250, .read = read_hpet, .mask =...
2018-07-13 07:23:19 705
原创 进程调度之schedule
屏蔽了具体的调度算法,具体的调度算法在冰山之下 schedule =>preempt_disable(); =>cpu = smp_processor_id(); rq = cpu_rq(cpu); rcu_sched_qs(cpu); prev = rq->curr; switch_count = &prev->nivcsw; =>i...
2018-07-11 07:18:30 296
原创 进程调度之入队列
wake_up_new_task =>int cpu __maybe_unused = get_cpu(); =>#define get_cpu() ({ preempt_disable(); smp_processor_id(); }) =>cpu = select_task_rq(p, SD_BALANCE_FORK, 0);//根据负载选择一个合适的CPU...
2018-07-10 07:23:55 546
原创 进程调度之wait
核心思想:回收子进程描述符//wait_task_zombie和wait_task_continued回收子进程描述符(注销身份证),子进程彻底消失do_wait =>add_wait_queue(¤t->signal->wait_chldexit,&wait); =>repeat: current->state = TASK_INTERRUPTIBL...
2018-07-08 22:49:45 281
原创 进程调度之exit
有两个点:从RUNNING到ZOMBIE到DEAD的状态转换;另外一个就是通知父进程届时删除进程描述符. sys_exit =>do_exit((error_code&0xff)<<8); =>tsk->flags |= PF_EXITING; =>tsk->exit_code = code; =>exit_mm(tsk);...
2018-07-08 22:33:54 303
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人