NVIDIA Interview Question for Development Support Engineers






Comment hidden because of low score. Click to expand.
0
of 0 vote

wake_up - wakes exactly one exclusive sleeping process in TASK_INTERRUPTIBLE or TASK_UNINTERRUPTIBLE state from the wait queue
wake_up_interruptible - wakes only one exclusive sleeping process in TASK_INTERRUPTIBLE from the wait queue

Wake_up_interruptible might be used in semaphore which wakes up only one process waiting for the signal from the wait queue. If you need to wake up only processes which are waiting on an event, then wake_up_interruptible must be used.
To generally wake up all the processes to some activity such as device I/O then wake_up has to be used.
I might be wrong, but this what I understand.

- Channa August 03, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

wake_up_interruptible() can wake only those processes which are put to sleep using wait_event_interruptible(), i.e. the processes which are put to sleep with its state as TASK_INTERRUPTIBLE.

wake_up() wakes up all the processes which is waiting for that event.

- Anonymous November 22, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

wake_up only wakes up one process in the wait_queue (no matter whether sleep is called by wait_event_interruptible() or wait_event) WHEREAS wake_up_all() wakes up all the processes in the wait_queue.

- Yo November 28, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Pay attention to the fact that comment by Yo is wrong. Citing from LDD3, "The end result (of wake_up, ed.) is that processes performing exclusive waits are awakened one at a time, in an orderly manner, and do not create thundering herds. The kernel still wakes up all nonexclusive waiters every time, however."

- D May 21, 2014 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More