McAfee Interview Question for Software Engineer / Developers






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

upper half and lower half are the terms related to interrupt handler and hardware devices only via drivers raise interrupts in this context , they asked u in form of device driver. Each device has to register its interrupt handler (which is the part of device driver. Now for devices which raise interrupt frequently or in case when same interrupt handler is used via devices so to increase the service performance driver designers design the handlers in such a way that whenever an interrupt occurs the OS does the most important part of handler "upper half" to respond to interrupt,create a data structure containing device specific data called "lower half" for later processing when CPU becomes available. This way interrupt handlers can be used in case when the interrupt raise frequency is high.

- mrn July 13, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

These are called top halves and bottom halves. When a device raises an interrupt the isr should be executed fastly as the other processes are stopped while the isr is being executed, that means interrupt latency should be very less. When an interrupt is raised you just check the Interrupt status register to find what the interrupt is for(read/write/error) and differ the work of reading the data, taking actions on based on interrupts to be done later. In Linux this is done a technique called bottom halves, like softirqs, tasklets.

- www.rulingminds.com July 18, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Excellent :)

- abhi.jais.86 December 15, 2012 | Flag
Comment hidden because of low score. Click to expand.
1
of 1 vote

In real time most of work is done in upperhalf for deterministic behaviour and in gpos this was dome in bottom half . upperhalf are written in ISR and bottom half is via tasklets or kernel thread, workques ...etc.

- rito October 15, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Top halves are softirq (request_irq) and bottom halves are tasklets (do_tasklet)

- Srinivas February 21, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

I guess both softirq and tasklets are bottom halves. Ans ISR may be the top half. ( Correct me otherwise)

- Sun April 27, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Correct sun. Both are bottom halves.

- abhi.jais.86 December 15, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Yes
Bottom Half: Tasklet ,soft_irq & workQ

- hari October 10, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

hardware devices interact with kernel through sending signals to kernel.this is called interrupt.after receiving interrupt kernel must do corresponding actions by interrupt handlers called interrupt service routines.(ISR).
if ISR not preemtable and interrupts on the current processor or on all processors are disabled. now if ISR takes longer time to finish its work,system's interactive response will be degraded.
So to improve this ,total work is divided into two parts/halves.
1.top half-interrupt handler
2.bottom half-softirq,tasklet,workqueue.

In the top half , ISR will do most important time critical work like receiving data from network device or sending data to network device .
In the bottom half ,remaining data processing work like passing data to upper layers of newnetwork protocols by one of these like softirqs or tasklets or workqueues.
for most device drivers tasklets are good choice.
for very very time critical works, like network data or blocl data softirqs are used.
in the process context workqueues are used.

- jk November 28, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

it is correct only

- narasimha February 12, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

then u dont about device drivers

- Anonymous March 20, 2013 | Flag
Comment hidden because of low score. Click to expand.
-2
of 2 vote

i never heard of such terms in developing device drivers.

my guess-

lower half is the harware(device)
upper half is the process requesting the status of the the device

- bibhay.vishesh July 11, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

I wonder if you ever developed a linux driver.

- abhi.jais.86 December 15, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

I wonder if you ever developed a linux driver.

- abhi.jais.86 December 15, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

I wonder if you ever developed a linux driver.

- abhi.jais.86 December 15, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

i think u dont about device drivers..

- Anonymous March 20, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Me too never heard of upper half and lower half.
I think he is referring to top half and bottom half.

- SHIV January 14, 2015 | 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