2006-11-01 09:59:57

by gniuxiao

[permalink] [raw]
Subject: How does the kernel interrupt a user process with code while (1) {}?

As title, thanks ;-)


2006-11-01 11:03:13

by Jan Engelhardt

[permalink] [raw]
Subject: Re: How does the kernel interrupt a user process with code while (1) {}?

>
> As title, thanks ;-)

Timer interrupt.


-`J'
--

2006-11-01 15:12:32

by gniuxiao

[permalink] [raw]
Subject: Re: How does the kernel interrupt a user process with code while (1) {}?

I'm reading LKD2, after knowing how processes are managed, I'm eager
to know that question, thanks.

On 11/1/06, [email protected] <[email protected]> wrote:
> Hi pal,
>
> I think you'd better read some materials on the kernel first. say LKD2.
> Alternatively, you can ask this question elsewhere but not lkml.
>
> Regards,
>
>
>
> 2006/11/1, Xiao Niu <[email protected]>:
> > As title, thanks ;-)
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to [email protected]
> > More majordomo info at
> http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.tux.org/lkml/
> >
>
>

2006-11-01 15:12:57

by gniuxiao

[permalink] [raw]
Subject: Re: How does the kernel interrupt a user process with code while (1) {}?

Thanks.

On 11/1/06, Jan Engelhardt <[email protected]> wrote:
> >
> > As title, thanks ;-)
>
> Timer interrupt.
>
>
> -`J'
> --
>

2006-11-01 21:03:51

by David Schwartz

[permalink] [raw]
Subject: RE: How does the kernel interrupt a user process with code while (1) {}?


> Thanks.
>
> On 11/1/06, Jan Engelhardt <[email protected]> wrote:
> > >
> > > As title, thanks ;-)
> >
> > Timer interrupt.

Other interrupts too. For example, if a disk I/O operation completes (or a
network packet is received) and generates an interrupt, the kernel could use
that interrupt to switch to another process made ready-to-run by the disk
operation or data received over the network.

Any interrupt can interrupt a user process.

DS