From: "pradeep singh" <2500.pradeep@gmail.com>
To: rohit hooda <rohit13hooda@rediffmail.com>
Cc: Learning Linux <learninglinux4@gmail.com>,
kernelnewbies@nl.linux.org, linux-newbie@vger.kernel.org,
linux-kernel@vger.kernel.org,
Bahadir Balban <bahadir.balban@gmail.com>
Subject: Re: Why can't we sleep in an ISR?
Date: Tue, 15 May 2007 15:16:47 +0530 [thread overview]
Message-ID: <366312910705150246r356fa97cv96ccbf51779309cd@mail.gmail.com> (raw)
In-Reply-To: <20070515093423.1150.qmail@webmail81.rediffmail.com>
[-- Attachment #1: Type: text/plain, Size: 2128 bytes --]
On 15 May 2007 09:34:23 -0000, rohit hooda <rohit13hooda@rediffmail.com>
wrote:
>
>
>
>
> On Tue, 15 May 2007 pradeep singh wrote :
> >On 5/14/07, Bahadir Balban <bahadir.balban@gmail.com> wrote:
> >>
> >>On 5/14/07, Learning Linux <learninglinux4@gmail.com> wrote:
> >> > Ok, but how about an ISR, that does not take any locks? Why can't we
> >> > sleep in SUCH an ISR?
> >> > LL
> >> > -
> >>
> >>The killer reason why you can't sleep in an interrupt is because an
> >>interrupt is not associated with any context in the first place.
> >
> >
> >good enough, but i have a query regarding this then.
> >On a 8K kernel stack system, doesn't interrupts share the stack
> associated
> >with the current process which was interrupted?
> Yes, you are right.
> >Doesn't interrupt steals the CPU slice time allocated to the running
> process
> >to run?
> Yes
> >Doesn't it run in current process's context ?
> You got it worng here. It runs on behalf of the process, but in the
> current process's context.
> For interrupts we have a dirrerent context altogether.
>
Ok, that explains a bit.
how will you define an interrupt context?
Thanks
~psr
>
> >What am i missing here?
> There are two different contexts of execution
> Process context
> Interrupt context
> >
> >Thanks
> >~psr
> >
> Thanks,
> -Rohit
> >What
> >>is a context, then? It is the state information for a process. This
> >>includes the kernel and userspace stack pointers, the register set,
> >>and the page tables for that process. The scheduler has access to all
> >>this information, to preempt one process and run another. Contrary to
> >>this, an interrupt, depending on the version of your kernel and arch,
> >>uses a separate irq stack or the kernel stack of the interrupted
> >>process. An irq is not a context but merely a temporary execution to
> >>be concluded asap.
> >>
> >>Hope this helps,
> >>Bahadir
> >>
> >
> >
> >
> >-- play the game
>
>
> [image: Peanuts]<http://adworks.rediff.com/cgi-bin/AdWorks/click.cgi/www.rediff.com/signature-home.htm/1050715198@Middle5/1177315_1171298/1176420/1?PARTNER=3&OAS_QUERY=null+target=new+>
--
play the game
[-- Attachment #2: Type: text/html, Size: 3982 bytes --]
next prev parent reply other threads:[~2007-05-15 9:46 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-15 9:34 Why can't we sleep in an ISR? rohit hooda
2007-05-15 9:46 ` pradeep singh [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-05-14 15:22 linux
2007-05-14 15:55 ` Rik van Riel
2007-05-14 6:37 Learning Linux
2007-05-14 7:10 ` pradeep singh
2007-05-14 7:16 ` Learning Linux
2007-05-14 15:24 ` Bahadir Balban
2007-05-14 15:56 ` Dong Feng
2007-05-15 5:17 ` pradeep singh
2007-05-15 6:45 ` Dong Feng
2007-05-15 7:10 ` pradeep singh
2007-05-15 7:28 ` Dong Feng
2007-05-15 8:12 ` pradeep singh
2007-05-15 8:40 ` Learning Linux
2007-05-15 8:58 ` Dong Feng
2007-05-15 16:57 ` Phillip Susi
2007-05-15 22:49 ` Dong Feng
2007-05-16 15:20 ` Phillip Susi
2007-05-16 23:17 ` Dong Feng
2007-05-17 16:07 ` Phillip Susi
2007-05-17 23:50 ` Dong Feng
2007-05-14 12:25 ` Helge Hafting
2007-05-14 12:52 ` pradeep singh
2007-05-14 13:36 ` Dong Feng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=366312910705150246r356fa97cv96ccbf51779309cd@mail.gmail.com \
--to=2500.pradeep@gmail.com \
--cc=bahadir.balban@gmail.com \
--cc=kernelnewbies@nl.linux.org \
--cc=learninglinux4@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-newbie@vger.kernel.org \
--cc=rohit13hooda@rediffmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox