NVIDIA Interview Question for Interns


Team: System Software
Country: United States
Interview Type: Phone Interview




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

blocking of the entire process happens in ULT(user level thread) where the kernel is unaware about the process being split into two or more threads.

- Anonymous May 10, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Depends on how the thread is implemented.

- Anonymous March 18, 2013 | Flag
Comment hidden because of low score. Click to expand.
8
of 10 vote

I think the answer will depend on the fact that which threading model the system is implementing
1> if it is many to one model -- then it will block entire process.
2> or if it is one to one model -- then other thread will continue their execution

- M@X August 02, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
7
of 9 vote

It WILL be blocked if the thread is implemented as a user level thread and will NOT be blocked if it is implemented as a kernel level thread.

- Kiran Kumar May 10, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Even if the thread is implemented as a user level thread, if the processing of the threads is not serialized,the processor can be assigned to the other thread.

- Aashish July 04, 2012 | Flag
Comment hidden because of low score. Click to expand.
4
of 4 vote

depends whether the other threads is waiting on an input from the previously blocked thread. then the other thread will also block. If all the threads are independent in their work, then they wont block

- dvyas May 16, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

blocking of the entire process happens in ULT(user level thread) where the kernel is unaware about the process being split into two or more threads.

- Anonymous May 10, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 6 vote

again stupid question.. what means "blocking entire process ?"

process consists of one or more threads. If, for example, a thread which processes the user input is busy on I/O then it would appear to the user that the process is "blocked".

It depends on your program logic if other threads should wait for the thread doing I/O operations at the moment..

- ? May 10, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

"If, for example, a thread which processes the user input is busy on I/O then it would appear to the user that the process is blocked" -- The question is not about how the user "sees" it, but about what happens to the workload assigned to the rest of the threads, do they wait (by virtue of OS or something else) for this thread to finish, or do they carry on with their own business (assuming programmer has allowed them to do so).

- chandan.jc September 26, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Which one is the right and best answer. multiple answers are confusing me.

- Rakesh July 18, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

The one by M@X above, "depends on which model of threads is used" is the right answer, as far as I know.

- chandan.jc September 26, 2012 | Flag
Comment hidden because of low score. Click to expand.
1
of 1 vote

cs.stackexchange.com/questions/1065/what-is-the-difference-between-user-level-threads-and-kernel-level-threads

- BJ October 27, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Kirans answer is the correct one.

- saheer February 04, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Uniprocessor :
--> User level thread : entire process blocks but could be controlled at times using jacketing
--> Kernel level thread : no blocking

Multiprocessor :
No blocking

- kartmuhil February 19, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

In linux no thread will be blocked because internal implementation of thread in linux is like a process,each process gets there own time slice for execution

- Anonymous February 12, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

There are two types of threads-
1.user level threads ULT
they run in user mode

2.kernel level thread KLT
they run in kernel mode

Now if a ULT executes a blocking system call,all the threads of process are blocked.
However there is a technique 'jacketing' that can be used to convert a blocking system call to a non blocking system call.

In a KLT , blocking a thread does not block the whole process.

- neerajlakhotia08 May 16, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 votes

@siva.sai.2020 : It has nothing to do with the number of processors. If a thread or a process moves to a blocked state, then some other thread or process which is ready to run will be using the processor. It depends entirely the implementation of the threads, whether it is kernel level, user level or hybrid.

- Kiran Kumar May 12, 2012 | Flag


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