71 operating system, OS interview questions and answers

          

Operating system interview questions and answers


Part 1   Part 2   Part 3   Part 4   Part 5   Part 6   Part 7   Part 8   Part 9  

QUESTION - A section of code which can be executed only by one process at a time is called:

-Code segment.
-Critical code.
-Critical section.
-Critically coded section
View Answer / Hide Answer

ANSWER - Critical section.

QUESTION - Which of the following is not a synchronization mechanism?

-Mutex.
-Critical regions
-Read/ write locks
-Context

View Answer / Hide Answer

ANSWER - Context

QUESTION - Before entering a critical region -

-the mutex is locked.
-the mutex is dissolved.
-the mutex is suspended.
-the mutex is opened.
View Answer / Hide Answer

ANSWER - the mutex is locked.

QUESTION - Read/ Write locks:

-allow simultaneous read access by many threads.
-restrict write access to only one thread at a time.
-Both i.) and ii.)
-None of the above.
View Answer / Hide Answer

ANSWER - Both i.) and ii.)

QUESTION - CPU performance is measured through ________.

-Throughput
-MHz
-Flaps
-None of the above
View Answer / Hide Answer

ANSWER - Throughput

QUESTION - If you want Unix to remember where you were and take you back to that location, which commands will you use?

-cd, ld
-pushd, popd
-intd, bkd
-pwd, ls
View Answer / Hide Answer

ANSWER - pushd, popd

QUESTION - touch command sets the modification date of the file to:

-Current time.
-Last modified time
-Creation time
-None of the above.
View Answer / Hide Answer

ANSWER - Current time.

QUESTION - What does pwd in Unix do?

-Display your password.
-Set a new password.
-Find out your current directory.
-None of the above.
View Answer / Hide Answer

ANSWER - Find out your current directory.

QUESTION - Which of the following memory allocation scheme suffers from External fragmentation?

-Segmentation
-Pure demand paging
-Swapping
-Paging
View Answer / Hide Answer

ANSWER - Segmentation

QUESTION - In ______ OS, the response time is very critical.

-Multitasking
-Batch
-Online
-Real-time

View Answer / Hide Answer

ANSWER - Real-time

QUESTION - An optimal scheduling algorithm in terms of minimizing the average waiting time of a given set of processes is ________.

-FCFS scheduling algorithm
-Round robin scheduling algorithm
-Shorest job - first scheduling algorithm
-None of the above
View Answer / Hide Answer

ANSWER - Shorest job - first scheduling algorithm

QUESTION - Which technique was introduced because a single job could not keep both the CPU and the I/O devices busy?

-Time-sharing
-SPOOLing
-Preemptive scheduling
-Multiprogramming
View Answer / Hide Answer

ANSWER - Multiprogramming

QUESTION - CPU performance is measured through ________.

-Throughput
-MHz
-Flaps
-None of the above
View Answer / Hide Answer

ANSWER - Throughput

QUESTION - PCB =

-Program Control Block
-Process Control Block
-Process Communication Block
-None of the above
View Answer / Hide Answer

ANSWER - Process Control Block

QUESTION - Multiprogramming systems ________.

-Are easier to develop than single programming systems
-Execute each job faster
-Execute more jobs in the same time
-Are used only on large main frame computers
View Answer / Hide Answer

ANSWER - Execute more jobs in the same time

QUESTION - A system program that combines the separately compiled modules of a program into a form suitable for execution assembler

-linking loader
-cross compiler
-load and go
View Answer / Hide Answer

ANSWER - linking loader

QUESTION - The Memory Buffer Register (MBR)

-is a hardware memory device which denotes the location of the current instruction being executed
-is a group of electrical circuits (hardware), that performs the intent of instructions fetched from memory
-contains the address of the memory location that is to be read from or stored into
-contains a copy of the designated memory location specified by the MAR after a "read" or the new contents of the memory prior to a "write"
View Answer / Hide Answer

ANSWER - contains a copy of the designated memory location specified by the MAR after a "read" or the new contents of the memory prior to a "write"

QUESTION - The Storage-to-Storage instructions

-have both their operands in the main store.
-which perform an operation on a register operand and an operand which is located in the main store, generally leaving the result in the register, expect in the case of store operation when it -is also written into the specified storage location
-which perform indicated operations on two fast registers of the machine and have the result in one of the registers
-all of the above
View Answer / Hide Answer

ANSWER - have both their operands in the main store.

QUESTION - Table of incomplete Instructions is used in _______assembler to avoid the problem of forward reference.

-single pass
-two pass
-multi pass
-any of these
View Answer / Hide Answer

ANSWER - single pass

QUESTION - Which of these is not a part of Synthesis phase

-Obtain machine code corresponding to the mnemonic from the Mnemonics table
-Obtain address of a memory operand from the symbol table
-Perform LC processing
-Synthesize a machine instruction or the machine form of a constant
View Answer / Hide Answer

ANSWER - Perform LC processing

QUESTION - The computational technique used to compute the disk storage address of individual records is called_____

-bubble memory
-key fielding
-dynamic reallocation
-hashing
View Answer / Hide Answer

ANSWER - hashing

QUESTION - _______is not a phase of compiler

-syntax Analysis
-lexical Analysis
-code generations
-error correction
View Answer / Hide Answer

ANSWER - error correction

OS interview questions - May 31, 2013 at 12:17 PM by Kshipra Singh

1. 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.

Some of the popular Operating Systems are DOS, Windows, Ubuntu, Solaris etc.

2. What are its main functions?

The main functions of an OS are:

a.) Process Management
b.) Memory Management
c.) Input/ Output Management
d.) Storage/ File system management

Operating system interview questions for freshers - Basic OS interview
Advanced operating system interview questions and answers

3. What is a Kernel?

- Kernel is the part of OS which handles all details of sharing resources and device handling.
- It can be considered as the core of OS which manages the core features of an OS.
- Its purpose is to handle the communication between software and hardware
- Its services are used through system calls.
- A layer of software called shell wraps around the Kernel.

4. What are the main functions of a Kernel?

The main functions of OS a Kernel are:

•Process management
•Device management
•Memory management
•Interrupt handling
•I/O communication
•File system management

5. What are the different types of Kernel?

Kernels are basically of two types:

a.) 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.
b.) 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.

6. What are the disadvantages of Microkernels?

Following are the main disadvantages of Microkernels. Usually these disadvantages are situation based.

a.) Larger running memory footprint
b.) Performance loss due to the requirement of more software for interfacing.
c.) Difficulty in fixing the messaging bugs.
d.) Complicated process management.

7. What is a command interpreter?

It is a program that interprets the command input through key board 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:
- Control card interpreter
- Command line interpreter
- Console command processor
- Shell

8. 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".

9. Explain the basic functions of process management.

Important functions of process management are:

- Creation and deletion of system processes.
- Creation and deletion of users.
- CPU scheduling.
- Process communication and synchronization.

10. What do you know about interrupt?

- Interrupt can be understood as a signal from a device causing context switch.
- To handle the interrupts, interrupt handlers or service routines are required.
- The address of each Interrupt service routine is provided in a list which is maintained in interrupt vector.

11. What is a daemon?

- Daemon - Disk and execution monitor, is a process that runs in the background without user’s interaction. They usually start at the booting time and terminate when the system is shut down.

12. How would you identify daemons in Unix?

- The name of daemons usually end with 'd' at the end in Unix.
- For e.g. httpd, named, lpd.

13. What do you mean by a zombie process?

- These are dead processes which are not yet removed from the process table.
- It happens when the parent process has terminated while the child process is still running. This child process now stays as a zombie.

14. What do you know about a Pipe? When is it used?

- It is an IPC mechanism used for one way communication between two processes which are related.
- A single process doesn't need to use pipe. It is used when two process wish to communicate one-way.

15. What is a named pipe?

- A traditional pipe is unnamed and can be used only for the communication of related process. If unrelated processes are required to communicate - named pipes are required.
- It is a pipe whose access point is a file available on the file system. 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.
- A named pipe is also referred to as a named FIFO or just FIFO.

16. What are the various IPC mechanisms?

IPC - Inter Process Communication.

Various IPC mechanisms are:

a.) Sockets
b.) Pipes
c.) Shared memory
d.) Signals
e.) Message Queues

17. What is a semaphore?

- A semaphore is a hardware or a software tag variable whose value indicates the status of a common resource.
- Its purpose is to lock the common resource being used. A process which needs the resource will check the semaphore to determine the status of the resource followed by the decision for proceeding.
- In multitasking operating systems, the activities are synchronized by using the semaphore techniques.

18. What kind of operations are possible on a semaphore?

Two kind of operations are possible on a semaphore - 'wait' and 'signal'.

19. What is context switching?

- Context is associated with each process encompassing all the information describing the current execution state of the process
- When the OS saves the context of program that is currently running and restores the context of the next ready to run process, it is called as context switching.
- It is important for multitasking OS.

20. Tell us something about Mutex.

- Mutex - ‘Mutual Exclusion Lock’ is a lock which protects access to shared data resource.
- Threads can create and initialize a mutex to be used later.
- Before entering a critical region the mutex is locked. It is unlocked after exiting the critical region. If any thread tries to lock the mutex during this time, it can nt do so.

21. What is a critical section?

It is a section of code which can be executed only by one process at a time.

22. 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:

- Mutex
- Semaphores
- Monitors
- Condition variables
- Critical regions
- Read/ Write locks

23. 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.

24. Is non-pre-emptive scheduling frequently used in a computer? Why?

No, it is rarely used for the reasons mentioned below:

- It can not ensure that each user gets a share of CPU regularly.
- The idle time with this increases reducing the efficiency and overall performance of the system.
- It allows program to run indefinitely which means that other processes have to wait for very long.

25. Explain condition variable.

- These are synchronization objects which help threads wait for particular conditions to occur.
- Without condition variable, the thread has to continuously check the condition which is very costly on the resources.
- Condition variable allows the thread to sleep and wait for the condition variable to give it a signal.

26. What are read-write locks?

- Read - write locks provide simultaneous read access to many threads while the write access stays with one thread at a time. They are especially useful in protecting the data that is not frequently written but read simultaneously by many threads.
- They are slower than mutexes.

27. What is a deadlock?

- It is a condition where a group of two or more waiting for the resources currently in use by other processes of the same group.
- In this situation every process is waiting for an event to be triggered by another process of the group.
- Since no thread can free up the resource a deadlock occurs and the application hangs.

28. What are the necessary conditions for deadlock to occur?

a.) At least one resource should be occupied in a non-sharable condition.
b.) A process holding at least one resource is waiting for more resources currently in use by other processes.
c.) It is not possible to pre-empt the resource.
d.) There exists a circular wait for processes.

29. Name the functions constituting the OS's memory management.

- Memory allocation and de-allocation
- Integrity maintenance
- Swapping
- Virtual memory

30. Name the different types of memory?

a.) Main memory also called primary memory or RAM
b.) Secondary memory or backing storage
c.) Cache
d.) Internal process memory

31. Throw some light on Internal Process Memory.

- This memory consists of a set of high-speed registers. They work as temporary storage for instructions and data.

32. 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.

33. What are page frames?

Page frames are the fixed size contiguous areas into which the main memory is divided by the virtual memory.

34. What are pages?

- Pages are same sized pieces of logical memory of a program. Usually they range from 4 KB to 8 KB depending on the addressing hardware of the machine.
- Pages improve the overall system performance and reduces requirement of physical storage as the data is read in 'page' units.

35. Differentiate between logical and physical address.

- Physical addresses are actual addresses used for fetching and storing data in main memory when the process is under execution.
- Logical addresses are generated by user programs. During process loading, they are converted by the loader into physical address.

36. When does page fault error occur?

- It occurs when a page that has not been brought into main memory is accessed.

37. Explain thrashing.

- In virtual memory system, thrashing is a high page fault scenario. It occurs due to under-allocation of pages required by a process.
- The system become extremely slow due to thrashing leading to poor performance.

38. What are the basic functions of file management in OS?

- Creation and deletion of files/ directories.
- Support of primitives for files/ directories manipulation.
- Backing up of files on storage media.
- Mapping of files onto secondary storage.

39. Explain thread.

- It is an independent flow of control within a process.
- It consists of a context and a sequence of instructions for execution.

40. What are the advantage of using threads?

The main advantages of using threads are:

a.) No special communication mechanism is required.
b.) Readability and simplicity of program structure increases with threads.
c.) System becomes more efficient with less requirement of system resources.

41. What are the disadvantages of using threads?

The main disadvantages of using threads are:
- Threads can not be re-used as they exist within a single process.
- They corrupt the address space of their process.
- They need synchronization for concurrent read-write access to memory.

42. 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.

43. What is a library?

It is a file which contains object code for subroutines and data to be used by the other program.

44. What are the advantages of distributed system?

Advantages of distributed system are:
- Resources get shared
- Load gets shared
- Reliability is improved
- Provide a support for inter-process communication

Operating system Interview questions - August 06, 2008 at 18:10 pm by Amit Satpute
1.Explain the meaning of Kernal.

The kernel is the essential center of a computer operating system, the core that........            
Read answer

2.What is a command interpreter?

The part of an Operating System that interprets commands and carries them out.........
Read answer

3.What is a daemon?

In Unix and some other operating systems, a daemon is a computer program that runs.........
Read answer

4.Explain the basic functions of process management.

The basic functions of the OS wrt the process management are :........
Read answer

5.What is a named pipe?

A connection used to transfer data between separate processes, usually on separate computers. ........
Read answer

6.What is pre-emptive and non-preemptive scheduling?

Tasks are usually assigned with priorities. At times it is necessary to run a certain.........
Read answer

7.What is a semaphore?

A semaphore is a variable. There are 2 types of semaphores:.........
Read answer

8.Explain the meaning of mutex.

A mutex and the binary semaphore are essentially the same..........
Read answer

9.What are the different types of memory?

the types of memory in a computer system are: .........
Read answer

10.Explain the meaning of virtual memory.

Virtual memory is an approach to make use of the secondary storage devices as an extension.........
Read answer

Operating system Interview questions with answers posted on May 06, 2009 at 13:10 pm by Vidya Sagar 
11.What is RTOS?

A certain capability within a specified time constraint is guaranteed by an operating system called ‘real time operating system’.......
Read answer

12.What is the difference between hard real-time and soft real-time OS?

Critical task completion on time is guaranteed by a hard real time system......
Read answer

13.What type of scheduling is there in RTOS?

The tasks of real time operating system have 3 states namely, ‘running’, ’ready’, ‘blocked’...........
Read answer

14.What is interrupt latency?

The time between a device that generates an interrupt and the servicing of the device that generated the interrupt is known as interrupt latency...........
Read answer

15.What is priority inheritance?

Priority inversion problems are eliminated by using a method called priority inheritance...........
Read answer

16.What is spin lock?

In a loop a thread waits simply (‘spins’) checks repeatedly until the lock becomes available............   
Read answer

17.What is an operating system? What are the functions of an operating system?

An operating system is an interface between hardware and software. OS is responsible for managing and co-ordinating the activities of a computer system..................
Read answer

18.What is paging? Why paging is used?

OS performs an operation for storing and retrieving data from secondary storage devices for use in main memory. Paging is one of such memory management scheme.................
Read answer

19.Difference between a process and a program

- A program is a set of instructions that are to perform a designated task, where as the process is an operation which takes the given instructions and perform the manipulations as per the code...............
Read answer

20.What is the meaning of physical memory and virtual memory?

Physical memory is the only memory that is directly accessible to the CPU. CPU reads the instructions stored in the physical memory and executes them continuously...............
Read answer

21.What is the difference between socket and pipe?

Sockets: Socket is a part of OSI layer model. Communication among different layers is performed through sockets. Application layer serves through some sockets to the presentation layer and upper application layer................
Read answer

22.What are the difference between THREAD, PROCESS and TASK?

A program in execution is known as ‘process’. A program can have any number of processes. Every process has its own address space..................
Read answer

23.Difference between NTFS and FAT32

The differences are as follows:NTFS:- Allows the access local to Windows 2000, Windows 2003, Windows NT with service pack 4 and later versions may get access for some file..................
Read answer

24.Differentiate between RAM and ROM

RAM: - Volatile memory  - Electricity needs to flow continuously - Program information is stored in RAM - RAM is read / write memory..............
Read answer

25.What is DRAM? In which form does it store data?

DRAM – Dynamic Random Access Memory. One of the read / write memory. DRAM is cheap and does the given task................
Read answer

26.What is cache memory? Explain its functions.

Cache memory is RAM. The most recently processing data is stored in cache memory. CPU can access this data more quickly than it can access data in RAM................
Read answer

27.Differentiate between Complier and Interpreter

- The program syntax is checked by the compiler; where as the keywords of the program is checked by the interpreter......................
Read answer

28.Describe different job scheduling in operating systems.

Job scheduling is an activity for deciding the time for a process to receive the resources they request.
First Come First Served: In this scheduling, the job that is waiting for a long time is served next................
Read answer

29.What is a Real-Time System?

Real-time system is the study of hardware and software, which are subject to the operational deadlines from event to the system response.................
Read answer

30.What do you mean by deadlock?

Dead lock is a situation of two or more processes waiting for each other to finish their tasks. In this situation no progress or no advancement is made...............
Read answer

31.Difference between Primary storage and secondary storage

Primary memory storages are temporary; where as the secondary storage is permanent. Primary memory is expensive and smaller, where as secondary memory is cheaper and larger................
Read answer

Next>>

Test OS Skills
Linux (27 questions)
C++ (20 questions)
Java part 1 (39 questions)

Write your comment - Share Knowledge and Experience

Discussion Board
question

Create a file using the Vi editor with the name ‘names.txt’ which contains 10 names of yours and your friends. Write a script that will sort the names in the alphabetical order and print in on the screen. Your script should also have to test whether there are 10 names in the file and if not it should print an error message.

mphee 04-15-2014 06:19 AM

Good questions

Most of us visiting this site and getting benefited. Thanks Careerride!

Neha 03-1-2014 07:46 PM

os intrvw qustn

u should provide some download link the way it is given is too bad to read.

ashish 09-15-2013 02:40 AM

difficult to copy and download

There is no question about your provided information really these are very useful for IT Exam preparation.

But it is difficult to see every question with answer in a single shot and there no download mechanism available so please make available one of these method.

vijay 02-12-2013 09:52 AM

os questions regarding

thanks.....very much useful

archana 01-16-2013 04:18 AM

operating system interview questions

nice but need more than this

Anusha 12-22-2011 02:40 AM

os

it's nice, but need much more...

sanga 11-6-2011 12:28 PM

 

 
 
Home | Want a Job? Submit Key Skills | Employer login | My key skills | About us | Sitemap | Contact us