×ðÁú¿­Ê±¹ÙÍøµÇ¼

²éÕÒLinuxÄÚºËÔ´´úÂëµÄ×î¼Ñ;¾¶

ÎÊÌ⣺²éÕÒLinuxÄÚºËÔ´´úÂëµÄ×î¼Ñ;¾¶ £¬ÐèÒªÏêϸ´úÂëʾÀý

ÔÚѧϰLinuxÄں˿ª·¢»òÕß¾ÙÐÐϵͳµ÷ÓÅʱ £¬²éÕÒLinuxÄÚºËÔ´´úÂëÊǺÜÊÇÖ÷ÒªµÄÒ»ÏîÊÂÇé¡£ÏàʶLinuxÄÚºËÔ´´úÂë½á¹¹¡¢º¯Êý½ç˵¼°ÊµÏÖϸ½Ú¿ÉÒÔ×ÊÖú¿ª·¢Õ߸üÉîÈëµØÃ÷È·²Ù×÷ϵͳµÄÊÂÇéÔ­Àí £¬½ø¶øÌá¸ß¿ª·¢Ð§ÂÊÏ¢Õù¾öÎÊÌâµÄÄÜÁ¦¡£

ÄÇô £¬ÔÚ²éÕÒLinuxÄÚºËÔ´´úÂëʱ £¬ÓÐÄÄЩ×î¼Ñ;¾¶ÄØ£¿ÏÂÃ潫ÍŽáÏêϸµÄ´úÂëʾÀýÀ´ÏÈÈÝһЩҪÁì¡£

1. ÔÚÏßä¯ÀÀLinuxÄÚºËÔ´´úÂë

×î¼òÆӵķ½·¨ÊÇͨ¹ýÔÚÏßä¯ÀÀÆ÷À´Éó²éLinuxÄÚºËÔ´´úÂë £¬ÕâÑùÄܹ»¿ìËٵزéÕÒµ½ËùÐèµÄ´úÂë¡£¿ÉÒÔʹÓÃÍøÕ¾ºÃ±È[lxr.linux.no](http://lxr.linux.no/)µÈÔÚÏßÔĶÁÆ÷À´ä¯ÀÀLinuxÄÚºËÔ´´úÂë¡£

ÀýÈç £¬¼ÙÉèÎÒÃÇÒª²éÕÒsys_exitº¯ÊýµÄʵÏÖ´úÂë £¬¿ÉÒÔÔÚÔÚÏßä¯ÀÀÆ÷ÖÐËÑË÷¸Ãº¯ÊýµÄÒªº¦×Ö £¬ÕÒµ½¶ÔÓ¦µÄ´úÂëÎļþ¡£Ïêϸ´úÂëʾÀýÈçÏ£º

/*
 * Free all assets associated with a process,
 * and notify "group_stop" of its death.
 */
void do_exit(long code)
{
    struct task_struct *tsk = current;
    struct mm_struct *mm = tsk->mm;
    struct exit_call_struct *p;

    WARN_ON(atomic_read(&tsk->fs_excl));
    tracehook_finish_exit(tsk);

    if (vtime_accounting_enabled() && !do_task_stat(tsk))
        vtime_exit(tsk);
    cgroup_exit(tsk);

    if (!tsk->io_context)
        tsk->io_context = &noop_ioc;

    /* sync mm's RSS info back to its owner when required */
    if (mm)
        sync_mm_rss(mm);
    /*
     * Make sure we are holding no locks:
     */
    DEBUG_LOCKS_WARN_ON(!rwsem_is_locked(&current->mm->mmap_sem) &&
                        !rwsem_is_locked(&current->mm->page_table_lock));

    BUG_ON(tsk->journal_info != NULL);
    do_memory_accounting(tsk);
    security_ops->task_free(tsk);

    thread_group_exit(code);
}

µÇ¼ºó¸´ÖÆ

¹ØÓÚ³õѧÕß»òÕßÖ»ÊDzéÔÄÉÙÁ¿´úÂëµÄ¿ª·¢ÕßÀ´Ëµ £¬Ê¹ÓÃÔÚÏßä¯ÀÀÆ÷¿ÉÒÔ¼òÆÓ¿ì½ÝµØ»ñÈ¡ËùÐèµÄÄÚºËÔ´´úÂëÐÅÏ¢¡£

2. ʹÓÃgit¹¤¾ßÉó²éLinuxÄÚºËÔ´´úÂë

ÁíÒ»¸öÒªÁìÊÇͨ¹ýgit¹¤¾ßÖ±½Ó¿Ë¡LinuxÄÚºËÔ´´úÂë¿ÍÕ» £¬ÕâÑù¿ÉÒÔÔÚÍâµØ¾ÙÐвéÔĺÍÐ޸ġ£Ê×ÏÈÐèҪװÖÃgit¹¤¾ß £¬È»ºóʹÓÃÒÔÏÂÏÂÁîÀ´¿Ë¡Linux¿ÍÕ»£º

git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

µÇ¼ºó¸´ÖÆ

¿Ë¡Íê³Éºó £¬ÔÚÍâµØÎļþϵͳÖоÍÄܹ»ÕÒµ½ËùÓеÄLinuxÄÚºËÔ´´úÂ롣Ȼºó¿ÉÒÔʹÓÃÎı¾±à¼­Æ÷»òÕß´úÂëÔĶÁ¹¤¾ßÀ´Éó²éºÍÐ޸ĴúÂë¡£Ïêϸ´úÂëʾÀýÈçÏ£º

/*
 * Main exit path for a task. Do some of the accounting and invoke
 * the relevant process signal handler.
 */
void do_exit(long code)
{
    struct task_struct *tsk = current;
    
    /* Free all assets associated with the process */
    exit_task_struct(tsk);
    
    /* Notify group_stop of the process's death */
    exit_notify(code);
    
    /* Call the scheduler to switch to a new process */
    schedule();
}

µÇ¼ºó¸´ÖÆ

ͨ¹ýgit¹¤¾ßÉó²éLinuxÄÚºËÔ´´úÂëµÄ·½·¨¸üÊʺ϶ÔÄں˿ª·¢ÓÐÐèÇóµÄ¿ª·¢Õß £¬¿ÉÒÔÔÚÍâµØ¾ÙÐдúÂëµÄÉó²é¡¢µ÷ÊÔºÍÐ޸ġ£

½áÓï

ͨ¹ýÔÚÏßä¯ÀÀÆ÷ºÍgit¹¤¾ßÉó²éLinuxÄÚºËÔ´´úÂëÊÇѧϰÄں˿ª·¢ºÍϵͳµ÷ÓŵÄÖ÷Ҫ·¾¶Ö®Ò»¡£ÔÚ²éÕÒÄÚºËÔ´´úÂëʱ £¬¿ÉÒÔƾ֤ÏêϸµÄÐèÇóÑ¡ÔñºÏÊʵķ½·¨ £¬²¢Í¨¹ýÏêϸµÄ´úÂëʾÀýÀ´¸üºÃµØÃ÷È·ºÍÔËÓÃÄÚºËÔ´´úÂ롣ϣÍû±¾ÎĶԸ÷ÈËÔÚ²éÕÒLinuxÄÚºËÔ´´úÂëʱÓÐËù×ÊÖú¡£

ÒÔÉϾÍÊDzéÕÒLinuxÄÚºËÔ´´úÂëµÄ×î¼Ñ;¾¶µÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí £¬°æȨÕùÒéÓë±¾Õ¾ÎÞ¹Ø £¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í×ðÁú¿­Ê±¹ÙÍøµÇ¼ÂËÓÍ»úÍø¹Ù·½Ì¬¶È £¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ £¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢ £¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢ £¬ÇëÄúÁ¬Ã¦ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎå £¬9:30-18:30 £¬½ÚãåÈÕÐÝÏ¢

QR code
ÍøÕ¾µØͼ