Riverbed Interview Question for Software Engineer / Developers






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

@shahsi..wht a pathetic answer.

- Hard November 10, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

@Hard: Give a concrete answer or shut up!
@anonymous: If life is short, stop giving stupid replies
========================
Spin lock is hardly even better than mutex, since its mostly implemented as a while loop with condition check. Now two processes or threads can check the same condition together and enter, which will be a race condition. Obviously lot of waste of CPU cycles.
Mutex however puts a process which was unable to acquire a lock put to a queue and wake one up upon unlocking.

- unicorn March 16, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Spinlocks are efficient if threads are only likely to be blocked for a short period of time, as they avoid overhead from operating system process re-scheduling or context switching. For this reason, spinlocks are often used inside operating system kernels. However, spinlocks become wasteful if held for longer durations, both preventing other threads from running and requiring re-scheduling.

- helen March 17, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

from wiki

- helen March 17, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

spinlocks and mutexs shd not be compared

- mlakshmanarao July 20, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Processes may elect to share their address spaces(text,data,bss,heap) with their children by means of the CLONE_VM flag to clone().The process is then called a thread.

- unknown November 03, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

Thread is independ flow within a process and it is part of process. each process has any number of threads can create/run. But thread should share resources from the process.

spinlocks : A spinlock is a lock where the thread simply waits in a loop repeatedly checking until the lock becomes available.

spinlock is better than mutex because thread will be waiting in loop ntil the lock becomes available

- shashi September 15, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Spin locks are better only when you want that process to acquire the critical section immediately. But most of the times they are not good because they waste lot of CPU cycles. Also spin locks should be used only when the underline hardware has multiple cores otherwise you run into deadlock.

- Sandeep February 24, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

get an OS book dude. Life is short.

- Anonymous February 27, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

@Anonymous "Life is short". good one :P

- user32456 May 17, 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