Apple Interview Question
Developer Program EngineersCountry: United States
is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.
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.
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.
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.
This question has not been posted clearly. What kind of scheduling policy is used? How is priority computed - statically or dynamically? What are the functions of T1,T2? Are they io bound or cpu bound?
- Noobie October 06, 2012In case of non preemptive scheduler with static priority scheme this should not e too difficult to achieve. the starting priority is assigned such that T2 > T1. All is well.
But in other case it can only be fixed by avoiding all scenarios that can cause such a condition. For example if the scheduler calculates priority dynamically, after T2 uses the CPU it will be penalised and its priority will go down. Other condition is that if T1 is starving the scheduler will raise T1;s priority such that it gets a chance. At this point priority will be T1 > T2.