Qualcomm Interview Question for Software Engineer / Developers






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

intitially, a flag is unset before turning on interrupts.

iinterrupt happens, ISR invoked.

now don't disable interrupts.

set a flag at beginning of ISR. check if flag is set during ISR. perform ISR task. unset the flag.

if the flag is set when ISR is executing, it means ISR runs > 20s.

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

well, check the flag in ISR first , then set if needed

- Anonymous September 03, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

How can you set the flag the the beginning of ISR?

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

I am not sure whether I sound right here...But, here is my solution..

Given, the timer interrupts the system every 20ms..
Before going into this problem I say whats needed here..
We need system clk(which might be the one mentioned here, or there is a system clk in every system) and two global volatile variables(gv1 and gv2).
Whenever the timer interrupts the system, and before ISR starts, I will take the current value of clk(store it in gv1) and compare with the gv2(will have the updated value of clk (everytime when the clock is running))...This comparison will be performed in ISR, once the difference > 20ms, we found out that 20ms exceeded. Now after exiting ISR I will reset gv1 and gv2.

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

make global volatile variable " flag "shared by both ISR and fun;

fun(){
time_t beg // read time ISR called
while( flag); // wait ISR to finish;
time_t end; //read time ISR exist
check end-beg>20;
}
plz correct it if wrong...

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

Implement through some sort of a watchDog mechanism. Have a task that monitors the state of all the interrupts installed in the system. The monitoring variable has 3 enum states { Intr_None, Intr_Progress, Intr_Done}

System will have the above flags for each of the interrupts installed. The monitoring task will initialize the flags as "Intr_None" and will be running in the background at regular intervals. As soon as the interrupt occurs, the interrupt will marks its flag as "Intr_Progress. Interrupt will also have to mark the flag to "Intr_Done" after it is done with the interrupts.

The monitoring tasks, on discovering "Intr_Progress", will start the timer to monitor that flag. If the flag is not set to "Intr_Done" even after the 20ms, Monitor will have reset the system. If the flag changes to "Intr_Done" before 20ms, monitor will set the flag to "Intr_none".

- Guruji May 11, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

At the beginning of ISR Start_Time = jiffies and at the end of ISR if (jiffies - Start_Time) > 20 * HZ/ 1000 than ISR exceeded more than 20 ms.

- Anonymous August 30, 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