OS Question




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

Typical interview question from OS are -

1. What are deadlocks? Deadlock prevention, deadlock avoidance and deadlock detection.
2. What are semaphores and mutex? Difference between semaphores and mutex? Difference between semaphores and monitors?
3. What are processes? What are threads? Difference between process and thread? How threads work?
4. What is virtual memory? How is virtual memory different from RAM? What are pages? What is page fault? Different algos for page fault?
5. What is internal and external fragmentation? What is segmentation?
6. What is a kernel? What are system calls? Difference between kernel threads and user threads?
7. Use of fork() system call to create child processes.


Well a process can either be single threaded or multi threaded. By increasing the number of threads though you are increasing the parallality of the system but you are also increasing the load on the system. More number of threads means more resource utilization for the same amount of work. So until you are working on a distributed system or on a system in which you want to do a lot of parallel processing than only you shold go for multi threading. Else single thread for a process is sufficient and best.

I hope I am clear. Thank you

- Spock September 20, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Thank you! :)

- kaustubh deshmukh September 20, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

i think the above explanation is wrong please verify it once again or clear me if i am wrong creation of thread depends on ur system config and ur process functionality ,like if ur system is single processor then when u create threads that will use same processor .but if ur system is multi processor then thread can be run on diff processor so benifit and if ur process is doing some work like i/o operation then u can create one thread for it because instead of waiting for another thread can do some thing else like its depend on ur process .no limit for thread creating on a process but u need to evaluate it how thread is required and how many will not make system burden .correct me if i am wrong

- Anonymous September 26, 2012 | 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