Operating system interview questions and answers for freshers pdf

Monday, March 25, 2019 admin Comments(0)

India's No.1 Job Portal for freshers - . Kernel is the core and essential part of computer operating system that provides basic services for all parts of OS. Semaphore is a variable, whose status reports common resource, . + Operating System Interview Questions and Answers, Question1: Explain the main purpose of an operating system? Question2: What is demand paging?. Operating system, OS interview questions and answers - Here are all possible Operating System interview questions with answers that might be asked during.

Language: English, Spanish, Hindi
Country: Bangladesh
Genre: Academic & Education
Pages: 279
Published (Last): 10.03.2016
ISBN: 468-4-31557-715-1
ePub File Size: 25.88 MB
PDF File Size: 11.37 MB
Distribution: Free* [*Regsitration Required]
Downloads: 37313
Uploaded by: DUSTI

1) Explain the main purpose of an operating system? Operating Top 50 Operating System Interview Questions & Answers .. Download PDF. Contains Important Operating system Interview Questions with Answers and For Freshers/Experienced | Operating System Questions For Interview | Online and Answers PDF | Interview Questions in Operating System | Operating System . Operating Systems Interview Questions. 1 soundofheaven.infoumar, mail: Ans: An operating system is a program that acts as an intermediary between the user and the computer .. common variables, updating tables, writing a file and so on. Only one.

Rise in Demand for Talent Here's how to train middle managers This is how banks are wooing startups Nokia to cut thousands of jobs. They are used to implement mutual exclusion and synchronize concurrent processes. ActiveX Interview Questions. Interview Questions says: What is thrashing? The running state means that the process has all the resources it need for execution and it has been given permission by the operating system to use the processor.

In a real operating system, the waiting and ready states are implemented as queues which hold the processes in these states. The animation below shows a simple representation of the life cycle of a process Source: What is a Thread? What are the differences between process and thread? A thread is a single sequence stream within in a process. Because threads have some of the properties of processes, they are sometimes called lightweight processes.

Threads are popular way to improve application through parallelism. For example, in a browser, multiple tabs can be different threads. MS word uses multiple threads, one thread to format the text, other thread to process inputs, etc.

A thread has its own program counter PC , a register set, and a stack space. Threads are not independent of one other like processes as a result threads shares with other threads their code section, data section and OS resources like open files and signals.

See http: What is deadlock? Deadlock is a situation when two or more processes wait for each other to finish and none of them ever finish. Consider an example when two trains are coming toward each other on same track and there is only one track, none of the trains can move once they are in front of each other.

Similar situation occurs in operating systems when there are two or more processes hold some resources and wait for resources held by other s. What are the necessary conditions for deadlock?

Operating Systems - Interview Questions and Answers

Mutual Exclusion: There is a resource that cannot be shared. Hold and Wait: A process is holding at least one resource and waiting for another resource which is with some other process. No Preemption: The operating system is not allowed to take a resource back from a process until process gives it back.

Circular Wait: A set of processes are waiting for each other in circular form. What is Virtual Memory? How is it implemented? Virtual memory creates an illusion that each user has one or more contiguous address spaces, each beginning at address zero. In these systems, functions are divided among the different processors. Is it possible to have a deadlock involving only one process? Explain your answer. Deadlock with one process is not possible.

Interview for system answers pdf freshers and operating questions

Here is the explanation. A deadlock situation can arise if the following four conditions hold simultaneously in a system. It is not possible to have circular wait with only one process, thus failing a necessary condition for Circular wait. There is no second process to form a circle with the first one.

So it is not possible to have a deadlock involving only one process. What is an operating system? An operating system is a collection of software programs which control the allocation and usage of various hardware resources in the system. It is the first program to be loaded in the computer and it runs in the memory till the system is shut down.

What are its main functions? The main functions of an OS are: Process Management b. Memory Management c. What is a Kernel? What are the main functions of a Kernel? The main functions of a Kernel are: What are the different types of Kernel? Kernels are basically of two types: Monolithic Kernels - In this architecture of kernel, all the system services were packaged into a single system module which lead to poor maintainability and huge size of kernel.

System and operating freshers for pdf questions answers interview

Microkernels - They follow the modular approach of architecture. Maintainability became easier with this model as only the concerned module is to be altered and loaded for every function. This model also keeps a tab on the ever growing code size of the kernel. What are the disadvantages of Microkernels? Following are the main disadvantages of Microkernels. Usually these disadvantages are situation based.

Larger running memory footprint b. Performance loss due to the requirement of more software for interfacing.

Difficulty in fixing the messaging bugs. Complicated process management. What is a command interpreter? It is a program that interprets the command input through keyboard or command batch file.

It helps the user to interact with the OS and trigger the required system programs or execute some user application. Command interpreter is also referred to as: Explain Process. A process is a program that is running and under execution. On batch systems, it is called as a "job" while on time sharing systems, it is called as a "task".

Explain the basic functions of process management. Important functions of process management are: What do you know about interrupt? What is a daemon? They usually start at the booting time and terminate when the system is shut down.

How would you identify daemons in Unix? What do you mean by a zombie process? This child process now stays as a zombie. What do you know about a Pipe? When is it used? It is used when two process wish to communicate one-way. What is a named pipe? If unrelated processes are required to communicate - named pipes are required.

When this file is opened for reading, a process is granted access to the reading end of the pipe. Similarly, when the file is opened for writing, the process is granted access to writing end of the pipe.

What are the various IPC mechanisms? Various IPC mechanisms are: Sockets b.

Questions pdf system interview for operating answers and freshers

Pipes c. Shared memory d. Signals e. Message Queues. What is a semaphore? A process which needs the resource will check the semaphore to determine the status of the resource followed by the decision for proceeding. What kind of operations are possible on a semaphore? Two kind of operations are possible on a semaphore - 'wait' and 'signal'.

What is context switching? Tell us something about Mutex. It is unlocked after exiting the critical region. If any thread tries to lock the mutex during this time, it can't do so. What is a critical section? It is a section of code which can be executed only by one process at a time.

What is synchronization? What are the different synchronization mechanisms? Synchronization means controlling access to a resource that is available to two or more threads or process.

Different synchronization mechanisms are: What is the basic difference between pre-emptive and non-pre-emptive scheduling. Pre-emptive scheduling allows interruption of a process while it is executing and taking the CPU to another process while non-pre-emptive scheduling ensures that a process keeps the CPU under control until it has completed execution. Is non-pre-emptive scheduling frequently used in a computer?

Commonly Asked Operating Systems Interview Questions | Set 1

No, it is rarely used for the reasons mentioned below: Explain condition variable. What are read-write locks?

They are especially useful in protecting the data that is not frequently written but read simultaneously by many threads. What is a deadlock? What are the necessary conditions for deadlock to occur? At least one resource should be occupied in a non-sharable condition. A process holding at least one resource is waiting for more resources currently in use by other processes. It is not possible to pre-empt the resource. There exists a circular wait for processes.

Freshers pdf system and interview operating answers questions for

Name the functions constituting the OS's memory management. Name the different types of memory? Main memory also called primary memory or RAM b. Secondary memory or backing storage c.

Cache d. Internal process memory. Throw some light on Internal Process Memory. They work as temporary storage for instructions and data. Explain compaction. During the process of loading and removal of process into and out of the memory, the free memory gets broken into smaller pieces.

These pieces lie scattered in the memory. Compaction means movement of these pieces close to each other to form a larger chunk of memory which works as a resource to run larger processes. What are page frames? Page frames are the fixed size contiguous areas into which the main memory is divided by the virtual memory. What are pages?

Usually they range from 4 KB to 8 KB depending on the addressing hardware of the machine. Differentiate between logical and physical address. During process loading, they are converted by the loader into physical address. When does page fault error occur? Explain thrashing. It occurs due to under-allocation of pages required by a process. What are the basic functions of file management in OS? Explain thread. What are the advantage of using threads? The main advantages of using threads are: No special communication mechanism is required.

Readability and simplicity of program structure increases with threads. System becomes more efficient with less requirement of system resources. What are the disadvantages of using threads? The main disadvantages of using threads are: What is a compiler? A compiler is a program that takes a source code as an input and converts it into an object code.

During the compilation process the source code goes through lexical analysis, parsing and intermediate code generation which is then optimized to give final output as an object code. What is a library? It is a file which contains object code for subroutines and data to be used by the other program.

What are the advantages of distributed system? Advantages of distributed system are: What are the different types of scheduling algorithms? The scheduling algorithms decide which processes in the ready queue are to be allocated to the CPU for execution. Scheduling algorithms can be broadly classified on the basis of: In this type of scheduling once a CPU has been allocated to a process it would not release the CPU till a request for termination or switching to waiting state occurs.

Preemptive algorithms: In this type of scheduling a process maybe interrupted during execution and the CPU maybe allocated to another process. Why is round robin algorithm considered better than first come first served algorithm? The first come first served algorithm is the simplest scheduling algorithm known. The processes are assigned to the CPU on the basis of their arrival time in the ready queue.

Since, it is non-preemptive once a process is assigned to the CPU, it will run till completion. Since a process takes the CPU till it is executed it is not very good in providing good response times. It can make other important processes wait un-necessarily. On the other hand, the round robin algorithm works on the concept of time slice or also known as quantum. In this algorithm, every process is given a predefined amount of time to complete the process.

In case, a process is not completed in its predefined time then it is assigned to the next process waiting in queue. In this way, a continuous execution of processes is maintained which would not have been possible in case of FCFS algorithm. Explain how a copying garbage collector works.

How can it be implemented using semispaces? The copying garbage collector basically works by going through live objects and copying them into a specific region in the memory. This collector traces through all the live objects one by one. This entire process is performed in a single pass.

Any object that is not copied in memory is garbage. The copying garbage collector can be implemented using semispaces by splitting the heap into two halves.

OS Interview Questions

Each half is a contiguous memory region. All the allocations are made from a single half of the heap only. When the specified heap is half full, the collector is immediately invoked and it copies the live objects into the other half of the heap. In this way, the first half of the heap then only contains garbage and eventually is overwritten in the next pass. How does reference counting manage memory allocated objects? When can it fail to reclaim objects?

Reference counting augments every object with a count of the number of times an object has been referenced. This count is incremented every time a reference to that object is made. Also every time a reference is destroyed the reference is decremented. This process is repeated till the reference count becomes zero. Once the reference count of an object reaches zero the object can be reclaimed. In this way, reference counting systems can perform automatic memory management by keeping a count in every object.

Any object that does not have a reference count can be considered to be dead and that memory can be reclaimed.