Linux Kernel Engineering Interview Questions | Glassdoor

Find jobs for Linux Kernel Engineering

Linux Kernel Engineering Interview Questions

9

Linux kernel engineering interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

You have 25 horses, what is the minimum number of races you can find the top 3. In one race you can race 5 horses, and you don't have a timer.

31 Answers

I don't know, but Google it, you'll find the answer. Once you know it, it's obvious.

12

Probably 8. First answer: at least 5 (you have to look at every horse). Second answer: 11. You can race five horses, replace 4th and 5th place horse by two horses from pool of horses that haven't raced, and continue doing this until all horses have raced. Since there are 25 horses, you need 1 race for the first five horses and 10 to go through the remaining 20. Third answer: 8. Round 1 (5 heats) : Race horses in heats of five. Eliminate all 4th and 5th place horses. (15 horses left) Round 2 (1 heat): Race winning horses from every heat. Eliminate 2nd and third place horses that lost to horses in round 2 that came third or worse. (7 horses left). Round 3 (1 heat): Pick any five horses. Race them. Eliminate bottom two and replace with remaining two horses. (5 horses left) Round 4 (1 heat): Eliminate bottom two. Note: after round 2 it may be possible to use some interesting decision tree mechanism to determine the three fastest horses using fewer horses per heat but you still need two heats to do that. This problem assumes horses don't get tired, no ties are possible and a horse's speed is deterministic race after race after race. Good assumptions for brain teasers, but not for real life.

Write an algorithm to sort an array of integers in O(n) time?

3 Answers

Write a shortest string copy function.

3 Answers

Describe what happens when you press a key

1 Answer

Whats is Stack overflow attack??...then he gave me a scenario where there was a open source code at a server and you have your piece of code at that server. You as a client are allowed to invoke a method which takes in a array as a parameter which is not checked for overflow validation. I had to induce a buffer overflow attack and make the method to pass control to my piece of code in the server.

1 Answer

When does the control passes from user mode to kernel mode in a Linux System?

1 Answer

will you make sure in C to not include a header file which you have already included??

1 Answer

What kind of experience have you had in the past working with linux What is an inline function/ volatile/static keywords (basic C functions to gauge your competency)

19 of 9 Interview Questions