Skip to main content

Posts

Showing posts with the label operating system questions and answers

Operating System (OS) Interview Questions And Answers - Part XIII.

61. Multicore Systems Present Certain Challenges For Multithreaded Programming. Briefly Describe These Challenges. Multicore systems have placed more pleasure on system programmers as well as application developers to make efficient use of the multiple computing cores. These challenges include determining how to divide applications into separate tasks that can run in parallel on the different cores. These tasks must be balanced such that each task is doing an equal amount of work. Just as tasks must be separated, data must also be divided so that it can be accessed, data dependencies must be identified and where such dependencies exist, data accesses must be synchronized to ensure the safety of the data . Once all such challenges have been met, there remains considerable challenges testing and debugging such applications. 62. What Is A Thread Pool & Why Is It Used? A thread pool is a collection of threads, created at process startup, that sit and wait for work ...

Operating System (OS) Interview Questions And Answers - Part XII.

56. State The Advantages & Disadvantages Of Kernel Level Threads? Advantages Kernel can simultaneously schedule multiple threads from the same process on multiple processes. If one thread in a process is blocked, the Kernel can schedule another thread of the same process. Kernel routines themselves can multithreaded. Disadvantages Kernel threads are generally slower to create and manage than the user threads. Transfer of control from one thread to another within same process requires a mode switch to the Kernel. 57. State The Basic Differences Between Process & Thread? The differences between process and threads are: Process is heavy weight or resource intensive whereas Thread is light weight taking lesser resources than a process. Process switching needs interaction with operating system whereas Thread switching does not need to interact with operating system. In multiple processing environments each process executes the same code but has its o...

Operating System (OS) Interview Questions And Answers - Part XI.

51. What Is A Thread? Why Is It Used? Thread is a flow of execution through the process code, with its own program counter, system registers and stack. A thread is also called a light weight process. Threads provide a way to improve application performance through parallelism. Threads represent a software approach to improving performance of operating system by reducing the overhead thread is equivalent to a classical process. Each thread belongs to exactly one process and no thread can exist outside a process. Each thread represents a separate flow of control. Threads have been successfully used in implementing network servers and web server. Following are the reasons why we use threads in designing operating systems. A process with multiple threads makes a great server for example printer server. Because threads can share common data, they do not need to use inter-process communication. Because of the very nature, threads can take advantage of multiprocessors. 5...

Operating System (OS) Interview Questions And Answers - Part X.

46. What Are Schedulers & What Are Types Of Schedulers? Schedulers are special system software which handles process scheduling in various ways. Their main task is to select the jobs to be submitted into the system and to decide which process to run. Schedulers are of three types: Long Term Scheduler. Short Term Scheduler. Medium Term Scheduler. 47. Explain The Importance Of Long Term Scheduler, Short Term Scheduler & Medium Term Scheduler? Long Term Scheduler is also called job scheduler. Long term scheduler determines which programs are admitted to the system for processing. Job scheduler selects processes from the queue and loads them into memory for execution. Process loads into the memory for CPU scheduling. The primary objective of the job scheduler is to provide a balanced mix of jobs, such as I/O bound and processor bound. It also controls the degree of multiprogramming. If the degree of multiprogramming is stable, then the average rate of process ...

Operating System (OS) Interview Questions And Answers - Part IX.

41. What Is A PCB? Explain The Structure Of Process Control Block? Process Control block is used for storing the collection of information about the processes and this is also called as the Data Structure which Stores the information about the process. The information of the Process is used by the CPU at the Run time. A process control block in an operating system will at least have the following information: Process State: Information about the current state of the process, from new, ready, running, terminated. Program Counter: States the location for the next command to be run for the same process. CPU Register: State information on various types of registers is stored during interrupts for continuity to occur correctly when process resumes. Memory Management Information: State data on memory is stored such as page tables, limit registers, or segment tables. Accounting Information: Stores state data on values of CPU and real time utilized, time limits,...

Operating System (OS) Interview Questions And Answers - Part VIII.

36. What Two Advantages & Disadvantages Do Threads Have Over Multiple Processes? Suggest One Application That Would Benefit From The Use Of Threads, & One That Would Not. Threads are very inexpensive to create and destroy, and they use very little re-sources while they exist. They do use CPU time for instance, but they don't have totally separate memory spaces. Unfortunately, threads must "trust" each other to not damage shared data. For instance, one thread could destroy data that all the other threads rely on, while the same could not happen between processes unless they used a system feature to allow them to share data. Any program that may do more than one task at once could benefit from multitasking. For instance, a program that reads input, processes it, and out-puts it could have three threads, one for each task. "Single-minded" processes would not benefit from multiple threads; for instance, a program that displays the time of the day. ...

Operating System (OS) Interview Questions And Answers - Part VII.

31. What Are The Advantages Of Using A Higher Level Language To Implement An Operating System? The code can be written faster, is more compact and is easier to understand and debug. In addition, improvements in complier technology will improve the generated code for the entire operating system by simple recompilation. Finally an operating system is far easier to port – to move to some other hardware – if written in a higher level language. 32. Distinguish Between System & Application Programs. System programs are not part of the kernel, but still are associated with the operating system. Application programs are not associated with the operating of the system. 33. State 3 Methods Used To Pass Parameters To The Operating System? Three methods used to pass parameters to the operating system are: Pass parameters in registers. Registers pass starting addresses of blocks of parameters. Parameters can be placed, or pushed, onto the stack by the ...

Operating System (OS) Interview Questions And Answers - Part VI.

26. Define The Essential Properties Of Distributed Operating System? Essential properties of Distributed Operating System: Divides computation up among several computers. The computers do not share memory or a clock; they communicate with each other over communication lines (e.g., high-speed bus, telephone line). 27. What Do You Mean By Distributed System? Why Are Distributed Systems Desirable? An operating system that manages a group of independent computers and makes them appear to be a single computer is known as a distributed operating system. The development of networked computers that could be linked and made to communicate with each other, gave rise to distributed computing. Distributed computations are carried out on more than one machine. When computers in a group work in cooperation, they make a distributed system. Distributed System is desirable because of following reasons: Any complex jobs can be divided and executed in parallel so that the res...

Operating System (OS) Interview Questions And Answers - Part V.

21. List Five Services Provided By An Operating System. Explain How Each Provides Convenience To The Users. Explain Also In Which Cases It Would Be Impossible For User-Level Programs To Provide These Services. PROGRAM EXECUTION: The operating system loads the contents (or sections) of a file into memory and begins its execution. A user-level program could not be trusted to properly allocate CPU time. I/O OPERATIONS: Disks, tapes, serial lines, and other devices must be communicated with at a very low level. The user need only specify the device and the operation to perform on it, while the system converts that request into device or controller specific commands. User-level programs cannot be trusted to only access devices they should have access to, and to only access them when they are otherwise unused. FILE-SYSTEM MANIPULATION: There are many details in file creation, deletion, allocation, and naming that users should not have to perform. Blocks of disk space are ...

Operating System (OS) Interview Questions And Answers - Part IV.

16. Discuss Distributed Operating System? Answer: An operating system that manages a group of independent computers and makes them appear to be a single computer is known as a distributed operating system. The development of networked computers that could be linked and made to communicate with each other, gave rise to distributed computing. Distributed computations are carried out on more than one machine. When computers in a group work in cooperation, they make a distributed system. Amoeba, Plan9 and LOCUS (developed during the 1980s) are some examples of distributed operating systems. 17. Discuss Embedded Operating System? Answer: The operating systems designed for being used in embedded computer systems are known as embedded operating systems. They are designed to operate on small machines like PDAs with less autonomy. They are able to operate with a limited number of resources. They are very compact and extremely efficient by design. Windows CE, FreeBSD and Minix 3 ar...

Operating System (OS) Interview Questions And Answers - Part III.

11. What Are The Three Major Activities Of An Operating System In Regard To File Management? Answer: Three major activities of an operating system in regards to file management are: Creating and deleting files. Creating and deleting directories. Supporting file and directory primitives. Mapping files onto secondary storage. File backup. 12. Discuss Various Types Of Operating Systems? Answer: Different types of operating systems available are: Real-time Operating System. Multi-user and Single-user Operating Systems. Multi-tasking and Single-tasking Operating Systems. Distributed Operating System. Embedded System. Mobile Operating System. Batch Processing and Interactive Operating Systems. 13. Discuss Real Time Operating Systems? Answer: Real-time operating systems are used to control machinery, scientific instruments and industrial systems. A very important part of an RTOS is managing the resources of the computer so that a particular operation executes in...

Operating System (OS) Interview Questions And Answers - Part II.

6. What Is BIOS In Operating System? Answer: The Basic Input Output System, usually referred to as BIOS, is a software stored on a small memory chip on the motherboard. BIOS (Basic Input/Output System) is a program which a personal computer's microprocessor uses to get the computer system started after you turn it on. BIOS instructs the computer on how to perform a number of basic functions such as booting and keyboard control. BIOS is also used to identify and configure the hardware in a computer such as the hard drive, floppy drive, optical drive, CPU, memory, etc. 7. What Are The Advantages & Disadvantages Of Multiprocessor Systems? Answer: Advantages of Microprocessor Systems are: Increased throughput - With more processors, more work can be accomplished in less time. Economy of scale - Peripheral devices may be shared amongst multi-processor systems. Increased reliability - If one processor crashes, then the others may continue to operate. Disadvant...

Operating System (OS) Interview Questions And Answers - Part I.

1. What Is An Operating System? An operating system is the most important software that runs on a computer. An operating system is a program that acts as an intermediary between the user and the computer hardware. It manages the computer's memory, processes, and all of its software and hardware. It also allows you to communicate with the computer without knowing how to speak the computer's "language". Without an operating system, a computer is useless. The purpose of an OS is to provide a convenient environment in which user can execute programs in a convenient and efficient manner. 2. What Are The Basic Functions Of Operating Systems? Functions of an operating system are: Shield the user from the intricate low-level details and provide an easier to program and more powerful interface to the machine or network => virtual machine. Manage the system resources: Protection, Scheduling, Sharing, File system, Accounting, etc. This function is obviously ...