Interrupt context...
- From: "arijit.p@xxxxxxxxx" <arijit.p@xxxxxxxxx>
- Date: 1 Dec 2005 06:10:29 -0800
This I had posted in comp.os.linux.misc, but no luck. Someone suggested
me to post it here. So in case, here, anyone gets irritated for
reposting, please undererstand that I have no intention of increasing
traffic here. I badly need help.
Hi All,
I have been tearing my hair on interrupt architecture of linux. I have
gone through most of the posts on interrupt in usenet. It helped me a
lot. But, still couple of doubts poke me every now and then.
When an interrupt comes, whatever the user is executing is saved in the
kernel stack and ISR is executed. Now my question is, what will be the
context of that interrupt? What things will be setup to execute ISR? I
mean will there be code, heap, stack allocated for this ISR? Or since
ISR is part of kernel, it will be executed on the kernel that was
loaded into RAM(meaning, that will use kernel code, heap, stack). If
so, then one more doubt - we have 4 GB AS for each process in linux and
within that 1Gb is for Kernel. So, for each process we setup a 1GB or
all process share a common 1GB kernel? Is Kernel stack (8KB) is
allocated in that 1 GB? if yes, then does it puts a upper limit on
number of process that can be run on linux (since there is only < 1GB
on which we have to allocate 8K kernel stack for each process being
run)? what is the place holder (data structure) in 1GB kernel that
maintain all the Kernel stacks for all process? How is the
architecture? Assuming kernel is a process with code, heap and stack,
so which part of that used to hold all the kernel stacks? How kernel
finds out the exact kernel stack for the process which is scheduled
now?
Also, when a switch from user to ISR happens(or a context switch
between another user process), is the previous process environment
(code, heap, stack, I mean the pages allocated in the RAM for that
process) destroyed? If not, then on what basis pages for new process
are loaded into RAM?
Can I ignore all interrupts with cli assembly command? Does all
interrupt comes through PIC? how about timer interrupt?
I know this is big, but, you will definitely help me to understand OS
better by answering this. Appreciate for any help.
I am basically an C application programmer, I want to move to serious
network protocol development, is it a good idea to understand OS
(linux) concept before I start coding protocols? I felt understanding
lower level details would help me design and write better code for a
protocol. I know i have realised that late, but, at least I have a
start now. ;)
-paul
.
- Follow-Ups:
- Re: Interrupt context...
- From: Kasper Dupont
- Re: Interrupt context...
- From: Dan Henry
- Re: Interrupt context...
- Prev by Date: Re: Block size used by the filesystem?
- Next by Date: Re: Block size used by the filesystem?
- Previous by thread: Block size used by the filesystem?
- Next by thread: Re: Interrupt context...
- Index(es):
Relevant Pages
|