Microsoft

  www.microsoft.com
Work in HR? Unlock Free Profile

Microsoft Software Development Engineer II Interview Question

I interviewed in Redmond, WA and was asked:
"Design a scheduler to run many functions at different times. It needs to (obviously) be thread-safe. Each task which is scheduled to run will have a time stamp, containing a desired execution time, a function pointer (containing the desired function). Also, find a way to supply the arguments to each function. Implement the mechanisms for scheduling/removing work to be done. How would you handle functions that must be serialized as opposed to ones that didn't need to be?"
Tags: data structures algorithms operating systems
Add Tags [?]
Answer

Part of a Software Development Engineer II Interview Review - one of 3,363 Microsoft Interview Reviews

Answers & Comments

0
of 0
votes
Too much to write in this box, but open your operating systems 101 book. If you know how to dispatch threads, use a mutex and a condition variable, you're good to go. Also, know how to implement a min-heap or perhaps a circular queue. You'll need one. Make quite sure it's thread safe!
- Interview Candidate on Jan 27, 2013

To comment on this question, Sign In with Facebook or Sign Up

Tags are like keywords that help categorize interview questions that have something in common.