Operating System Interview Questions and Answers
Q1. What is an running device?
Ans: An running gadget is a software that acts as an middleman between the user and the pc hardware. The reason of an OS is to offer a handy environment wherein user can execute programs in a handy and efficient way.
Q2. What is kernel?
Ans: Kernel is the center and critical part of laptop operating gadget that offers primary offerings for all parts of OS.
Q3. What is distinction between micro kernel and macro kernel?
Micro kernel is a kernel which run services the ones are minimum for operating machine performance. In this kernel all other operations are accomplished by way of processor.
Macro Kernel is a mixture of micro and monolithic kernel. In monolithic kernel all running device code is in single executable photo.
Q4. What is demand paging?
Ans: Demand paging is referred whilst not all of a procedure’s pages are in the RAM, then the OS brings the lacking(and required) pages from the disk into the RAM.
Q5. What are the one of a kind working systems?
Batched operating structures
Multi-programmed working systems
timesharing working structures
Distributed operating structures
Real-time operating structures
Q6. What are the basic features of an working system?
Ans: Operating device controls and coordinates the usage of the hardware most of the various packages applications for various uses. Operating gadget acts as resource allocator and supervisor. Also running gadget is control program which controls the person applications to prevent errors and incorrect use of the laptop. It is specifically worried with the operation and control of I/O devices.
Q7. What are the advantages of a multiprocessor gadget?
Ans: With an extended range of processors, there may be huge increase in throughput. It also can keep extra money due to the fact they can percentage sources. Finally, ordinary reliability is increased as well.
Q8. What are actual-time structures?
Ans: Real-time structures are used while inflexible time requirements have been located on the operation of a processor. It has nicely defined and stuck time constraints.
Q9. What is virtual reminiscence?
Ans: Virtual memory is a memory control technique for letting techniques execute out of doors of reminiscence. This may be very beneficial specially is an executing application cannot healthy within the physical reminiscence.
Q10. What is dead lock?
Ans:Deadlock is a state of affairs or condition in which the two tactics are looking forward to each different to finish that will begin. This result both the strategies to cling.
Q11. What is a technique?
Ans: A software in execution is called a technique.
Processes are of types:
Operating machine techniques
Q12. What are the states of a procedure?
Q13. What is Throughput, Turnaround time, ready time and Response time?
Throughput range of techniques that complete their execution in line with time unit
Turnaround time amount of time to execute a specific manner
Waiting time quantity of time a manner has been waiting in the geared up queue
Response time amount of time it takes from whilst a request changed into submitted until the first reaction is produced, now not output (for time-sharing environment)
Q14. What is Memory-Management Unit (MMU)?
Ans: Hardware tool that maps virtual to physical cope with. In MMU scheme, the cost in the relocation sign in is added to each address generated through a person method at the time it's miles despatched to reminiscence.
->The user software offers with logical addresses; it never sees the actual bodily addresses
Q15. What is a trap and trapdoor?
Ans: Trapdoor is a secret undocumented entry point right into a program used to supply get right of entry to with out regular methods of access authentication. A lure is a software interrupt, commonly the result of an blunders condition.
Q16. When is a machine in safe nation?
Ans: The set of dispatchable procedures is in a secure country if there exists as a minimum one temporal order wherein all processes may be run to crowning glory without resulting in a impasse.
Q17. Explain the concept of the Distributed structures?
Ans: Distributed systems paintings in a community. They can percentage the network resources, communicate with each different.
Q18. What is semaphore?
Ans:Semaphore is a variable, whose reputation reports not unusual useful resource, Semaphore is of two types one is Binary semaphore and different is Counting semaphore.
Q19. What is context switching?
Ans:Transferring the control from one system to other manner requires saving the country of the antique manner and loading the stored country for brand spanking new method. This undertaking is called context switching.
Q20. What is a thread?
Ans:A thread is a program line below execution. Thread occasionally known as a light-weight process, is a simple unit of CPU usage; it contains a thread identity, a program counter, a check in set, and a stack
Q21. What is technique synchronization?
Ans:A scenario, wherein several strategies get entry to and manage the same records concurrently and the outcome of the execution relies upon on the specific order in which the access takes region, is referred to as race circumstance. To shield towards the race condition we want to ensure that best one process at a time can be manipulating the identical statistics. The method we use for that is referred to as technique synchronization.
Q22. What is beating?
Ans:It is a phenomenon in digital reminiscence schemes while the processor spends maximum of its time swapping pages, in preference to executing commands. This is due to an inordinate wide variety of page faults.
Q23. What is cache reminiscence?
Ans: Cache memory is random access reminiscence (RAM) that a pc microprocessor can get entry to more speedy than it may get right of entry to ordinary RAM. As the microprocessor techniques statistics, it seems first in the cache reminiscence and if it finds the statistics there (from a previous analyzing of facts), it does not should do the greater time-eating reading of statistics from larger reminiscence.
Q24. What is logical and physical addresses space?
Ans: Logical deal with area is generated from CPU; it bound to a separate bodily cope with area is vital to right reminiscence control. Physical cope with area is seen by the memory unit. Logical address area is virtual deal with area. Both those deal with area can be equal at collect time but range at execution time.
Q25. Differentiate among Complier and Interpreter?
Ans: An interpreter reads one training at a time and carries out the moves implied by that coaching. It does not perform any translation. But a compiler translates the entire commands
Q26. What is cache-coherency?
Ans: In a multiprocessor machine there exist several caches every can also containing a duplicate of equal variable A. Then a exchange in one cache have to without delay be meditated in all different caches this process of retaining the identical cost of a data in all of the caches s known as cache-coherency.
Q27. What is fragmentation? Tell approximately unique varieties of fragmentation?
Ans: When a lot of loose blocks are too small to satisfy any request then fragmentation takes place. External fragmentation and internal fragmentation are two kinds of fragmentation. External Fragmentation occurs whilst a dynamic reminiscence allocation algorithm allocates some reminiscence and a small piece is left over that cannot be successfully used. Internal fragmentation is the gap wasted interior of allotted memory blocks because of restriction at the allowed sizes of allocated blocks.
Q28. What is a long term scheduler & brief time period schedulers?
Ans: Long term schedulers are the activity schedulers that pick techniques from the activity queue and cargo them into reminiscence for execution. The quick time period schedulers are the CPU schedulers that pick a manner from the ready queue and allocate the CPU to considered one of them.
Q29. Explain the meaning of mutex.
Ans: Mutex is the fast shape for Mutual Exclusion item. A mutex allows more than one threads for sharing the same aid. The useful resource can be report. A mutex with a completely unique call is created at the time of starting a application. A mutex ought to be locked from different threads, when any thread that desires the aid. When the records is not used / needed, the mutex is about to unencumber.
Q30. What are necessary conditions for dead lock?
Mutual exclusion (where at the least one aid is non-sharable)
Hold and wait (where a method holds one useful resource and waits for other useful resource)
No preemption (wherein the assets cant be preempted)
Circular wait (wherein p[i] is waiting for p[j] to launch a aid. I= 1,2,?nj=if (i!=n) then i+1else 1 )