Re: Schedule() call in driver context.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> Why would a linux driver call "schedule()" ?


Thanks to all for your kind replies.

If I summarize what I learned:

<<A driver will call "schedule()" when in an infinite loop to relinquish  the CPU.>>

>From what I know (please correct me if I'm wrong):

1. A driver executes in kernel context. An infinite loop will hang the system.

2. The driver executes on behalf an user process which asks for some device/kernel
service. The "schedule()" call will send this process in sleep mode. When  awaken
execution resumes at the next instruction after the "schedule()" call.

My questions here:

1. What event awakes the process? Has the driver any way to control it?

2. Would a timer (kernel timer) do the same? I mean instead calling "schedule()" just
setup and start a timer which will trigger the same driver function until the device
service is completed.

3. If the answer to question 2 is "yes" what are the +/- for these two methods and which
one to choose?

Thanks,
Stephan.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux