Bloomberg LP Interview Question for Software Engineer / Developers






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

I think it is not related to Kernel..

they may be asking at user space side only

- Anonymous January 19, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

do a kill -6 to get a core dump and debug the core

- Anonymous March 14, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

It may be a kernel question. There might be a way to get into the kernel and pause the process, attach a debugger to the paused process. It is very likely that you would have pause in the offending piece of code. In any case, you can then set breakpoints etc.

- Linux Torvaldx March 14, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

kill -6 is one solution as one user mentioned

Set conditional breakpoints by having counters at multiple places in the suspected process. Based on one counters hitting a certain count you can break and look into the possible buggy code area

You can have throttled printf mechanism based on the above counter logic

- Ocean April 05, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

A normal process executing in user mode cannot consume 90% of CPU as the process will get switched out after it consumes its time share slot.

If the process is a Real Time process and has a bug in its code, inspite of getting preempted after its timeshare, it could get the cpu right back if it is the highest priority process. So, it may show 90% accumulated cpu usage over time, but cannot consume 90% in one continuous grab of cpu time.

The only way for the cpu to be 90% consumed by one process is some sort of kernel problem. Usually, there is some sort of an infinite loop OR a very long running process that is not preempting and giving up the CPU.

One way to debug such problems is to use kernel tracers. For example, refer to ktracer on HPUX. This tool traces kernel procedure calls, arguments and timing. So, if there is a loop and a particular stack trace is being repeatedly executed leading to a loop, we can see it in ktracer output.

A similar tool is Solaris Dtrace.

- sk_seeker April 24, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

execute command 'top'
find the offending process "id"
then read this:
http://dirac.org/linux/gdb/06-Debugging_A_Running_Process.php

- nick shin June 05, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Use different machine and connect it to sluggish machine using firewire to debug kernel.

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

Use pstack to see the stack of all the threads.

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

I liked the core dump and pstack methods. gcov and gprof would also be of great help

- Abhishek Misra August 04, 2010 | 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