linux context switching

From: ¹ßµü¼¼¿ì±â (sslim_at_core.kaist.ac.kr)
Date: 02/09/04

  • Next message: Tauno Voipio: "Re: Getting hostname from /proc/dev/tcp"
    Date: Mon, 9 Feb 2004 14:14:23 +0900
    
    

    In linux, is there kernel context?
    Assume following sistuation,
    1. a user process is having CPU
    2. the process calls systems calls such as ioctl()
    3. the process is excuted in a kernel mode, at this momnet is there context
    switching?
    4. H/W interrupt occurs
    5. save contexts of the process in a kernel mode
    6. interrupt handler is excuted
    7. the handler gets finished
    8. RET is called
    9. at this moment, without preemption, the interrupted process in a kernel
    mode will be selected again.
    If the steps I mentioned above is right, I think there is no pure kernel
    context to be saved.
    All contexts have corresponding user processes. Am I right?
    Who owns Task number 0? kernel?

    I have analyzed source codes. But it's very hard to understand them and
    figure out my questions.

    Your sincere advices will be appreciated :-)


  • Next message: Tauno Voipio: "Re: Getting hostname from /proc/dev/tcp"

    Relevant Pages

    • Re: Questions regarding Synchronisation in Windows (Spinlocks)
      ... Vista/Longhorn now only ship multiprocessor kernel. ... Interrupts are handled in context of ISR. ... Since Spinlocks execute at DPC/Dispatch level, there is no way for the ... But an interrupt occurs which has an IRQL> DPC Dispatch level OR the ...
      (microsoft.public.win32.programmer.kernel)
    • Re: Why cant we sleep in an ISR?
      ... interrupt is not associated with any context in the first place. ... includes the kernel and userspace stack pointers, the register set, ... this, an interrupt, depending on the version of your kernel and arch, ...
      (Linux-Kernel)
    • Re: [patch 00/11] ANNOUNCE: "Syslets", generic asynchronous system call support
      ... properly separating the user execution context from the kernel execution ... What about TLS related kernel ...
      (Linux-Kernel)
    • Re: linux context switching
      ... the process is excuted in a kernel mode, at this momnet is there context ... all registers are saved on the stack. ... interrupt handler is excuted ...
      (comp.os.linux.development.system)
    • Re: [PATCH 0 of 4] Generic AIO by scheduling stacks
      ... thought we couldn't do native kernel threads for "normal" threading ... disciplines in question: i hacked on scheduling, 1:1 threading, on Tux, ... the programmer from the risks and complexities of thread programming, ... Having a 1:1 relationship between user-space and kernel-space context is ...
      (Linux-Kernel)