Qualcomm Interview Question for Software Engineer / Developers






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

A little change in my question..Explain the difference between a semaphore and a mutex?

- MostUnlucky February 15, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

What do you mean by virtual destructor? How do you design an ISR? what do you mean by priority inversion? Explain the difference between a semaphore and a ISR?

OK, to start with.
Virtual Dest: It has significance only when you are using a base class pointer to create a new derived class pointer. Now when you delete the derived object, it will get deleted only when the destructor for its class is declared as virtual.

Sample code:
<base-class> *bp = new <derived-class>
delete bp;

How do you design an ISR: If you mean interrupt service rotuines: i would say use callback functions (make use of function pointers, register your functions by passing their corresponding fps as arguments and facilitate the function so that it can catch the interrupt signals.


what do you mean by priority inversion: Not very sure about this.

Distinction: between semaphore and ISR they are totally independent concepts.
Yes, semaphore Vs mutex makes sense. Not sure but it should have something to with the degree of programming. Mutex need cond var to increase the degree whereas semaphore alone acheive this. (not very sure though)

- hary February 15, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Priority Inversion:

Its an issue with priority scheduler. Lets say there are three processes with high, medium and low priority - say H, M and L respectively. If H has to wait for L (for instance, for a lock held by L), and M is on the ready list, then H will never get the CPU because L (the low priority thread) will never get any CPU time. To solve this problem, H donates its priority to L, till L is holding the lock. And then L recall the donation once L releases (and thus H acquires) the lock.

- spsneo February 15, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

For Solving Priority Inversion,there is no perfect method.
However we can use the existing methods like

1. Priority Ceiling
2. Disabling Interrupts
3. Priority Inheritance

Source : en.wikipedia.org/wiki/Priority_inversion

- Deepak March 28, 2011 | 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