LDC INSTITUTE OF TECHNICAL STUDIES SORAON, PRAYAGRAJ Operating System (B.Tech 2nd year & MCA 1st Year) Practice Set -1 Faculty: Archana Tandon MULTIPLE CHOICE QUESTIONS: 1) Which of the following is a single-user operating system? a. Windows b. MAC c. Ms-Dos d. None of these 2) Consider the following three processes in the FCFS. Process ID. Brust-time. Arrival-time P1 3 3 P2 6 6 P3 9 9 What is the average waiting time? a. 2 b. 3 c. 4 d. 5 3) Which of the following method is used to improve the main memory utilization? a. Swapping b. Operating system c. Memory stack d. None of these. 4) Buffer is a ___________. a. Permanent area b. Temporary area c. Small area d. Large area 5) SSTF stands for ________. a. Shortest Signal Time First b. Shortest Seek Time First c. System Seek Time First d. System Shortest Time First 6) The PCB is identified by ___________. a. Real-Number b. Binary Number c. Store block d. Integer Process ID 7) The address of the next instruction to be executed by the current process is provided by the: a. CPU registers b. program counter c. process stack d. pipe 8) The number of processes completed per unit time is known as __________. a. output b. Throughput c. Efficiency d. Capacity 9) 17. The degree of multi-programming is : a. the number of processes executed per unit time b. the number of processes in the ready queue c. the number of processes in the I/O queue d. the number of processes in main memory 10) What is a long-term scheduler? a. It selects which process has to be brought into the ready queue b. It selects which process has to be executed next and allocates CPU c. It selects which process to remove from memory by swapping d. None of these 11) What is a medium-term scheduler ? a. It selects which process has to be brought into the ready queue b. It selects which process has to be executed next and allocates CPU c. It selects which process to remove from memory by swapping d. None of these 12) he primary distinction between the short term scheduler and the long term scheduler is : a. The length of their queues b. The type of processes they schedule c. The frequency of their execution d. None of these 13) In a time-sharing operating system, when the time slot given to a process is completed, the process goes from the running state to the : a. Blocked state b. Ready state c. Suspended state d. Terminated state 14) In a multi-programming environment: a. the processor executes more than one process at a time b. the programs are developed by more than one person c. more than one process resides in the memory d. a single user can execute many programs at the same time 15) In which of the following OS, the response time is very crucial? a. Network operating system b. Real time operating system c. Batch operating system d. Unix operating system 16) With _____________ only one process can execute at a time; meanwhile all other process are waiting for the processor. With ______________ more than one process can be running simultaneously each on a different processor. a. b. c. d. Multiprocessing, Multiprogramming Multiprogramming, Uniprocessing Multiprogramming, Multiprocessing Uniprogramming, Multiprocessing 17) Message passing system processes to __________ a. b. c. d. communicate with one another without resorting to shared data communicate with one another by resorting to shared data share data name the recipient or sender of the message 18) A process that is based on IPC mechanism which executes on different systems and can communicate with other processes using message based communication, is called a. Local Procedure Call b. Inter Process Communication c. Remote Procedure Call d. Remote Machine Invocation 19) The initial program that is run when the computer is powered up is called __________ a. boot program b. bootloader c. initializer d. bootstrap program 20) In the layered approach of Operating Systems __________ a. Bottom Layer(0) is the User interface b. Highest Layer(N) is the User interface c. Bottom Layer(N) is the hardware d. Highest Layer(N) is the hardware 21) The interval from the time of submission of a process to the time of completion is termed as ____________ a. waiting time b. turnaround time c. response time d. throughput 22) Scheduling is done so as to ____________ a. increase CPU utilization b. decrease CPU utilization c. keep the CPU more idle d. none of the mentioned 23) Concurrent access to shared data may result in ____________ a. data consistency b. data insecurity c. data inconsistency d. none of the mentioned 24) What is operating system? a. collection of programs that manages hardware resources b. system service provider to the application programs c. link to interface the hardware and application programs d. all of the mentioned 25) Which one of the following is not true? a. kernel is the program that constitutes the central core of the operating system b. kernel is the first part of operating system to load into memory during booting c. kernel is made of various modules which can not be loaded in running operating system d. kernel remains in the memory during the entire computer session 26) What is the main function of the command interpreter? a. to get and execute the next user-specified command b. to provide the interface between the API and application program c. to handle the files in operating system d. none of the mentioned 27) In operating system, each process has its own __________ a. address space and global variables b. open files c. pending alarms, signals and signal handlers d. all of the mentioned 28) A Process Control Block(PCB) does not contain which of the following? a. Code b. Stack c. Bootstrap program d. Data 29) The entry of all the PCBs of the current processes is in __________ a. Process Register b. Program Counter c. Process Table d. Process Unit 30) Process synchronization can be done on __________ a. hardware level b. software level c. both hardware and software level d. none of the mentioned SHORT QUESTION ANSWERS: 1) What are the advantages of a multiprocessor system? With an increased number of processors, there is a considerable increase in throughput. It can also save more money because they can share resources. Finally, overall reliability is increased as well. 2) What is kernel? A kernel is the core of every operating system. It connects applications to the actual processing of data. It also manages all communications between software and hardware components to ensure usability and reliability. 3) What are real-time systems? Real-time systems are used when rigid time requirements have been placed on the operation of a processor. It has well defined and fixed time constraints. 4) What is time- sharing system? In a Time-sharing system, the CPU executes multiple jobs by switching among them, also known as multitasking. This process happens so fast that users can interact with each program while it is running. 5) What is SMP? SMP is a short form of Symmetric Multi-Processing. It is the most common type of multiple-processor systems. In this system, each processor runs an identical copy of the operating system, and these copies communicate with one another as needed. 6) How are server systems classified? Server systems can be classified as either computer-server systems or file server systems. In the first case, an interface is made available for clients to send requests to perform an action. In the second case, provisions are available for clients to create, access and update files. 7) What is asymmetric clustering? In asymmetric clustering, a machine is in a state known as hot standby mode where it does nothing but to monitor the active server. That machine takes the active server’s role should the server fails. 8) What is caching? Caching is the processing of utilizing a region of fast memory for a limited data and process. A cache memory is usually much efficient because of its high access speed. 9) What is spooling? Spooling is normally associated with printing. When different applications want to send an output to the printer at the same time, spooling takes all of these print jobs into a disk file and queues them accordingly to the printer. 10) What is preemptive multitasking? Preemptive multitasking allows an operating system to switch between software programs. This, in turn, allows multiple programs to run without necessarily taking complete control over the processor and resulting in system crashes. 11) What do you mean by system Call. In computing, a system call (commonly abbreviated to syscall) is the programmatic way in which a computer program requests a service from the kernel of the operating system on which it is executed. ... System calls provide an essential interface between a process and the operating system. 12) What are the use of job Queue, ready Queue and device queue. There are different queues of processes (in an operating system): Job Queue: Each new process goes into the job queue. Processes in the job queue reside on mass storage and await the allocation of main memory. Ready Queue: The set of all processes that are in main memory and are waiting for CPU time is kept in the ready queue. Waiting (Device) Queues: The set of processes waiting for allocation of certain I/O devices is kept in the waiting (device) queue. 13) What is meant by Context switch? The Context switching is a technique or method used by the operating system to switch a process from one state to another to execute its function using CPUs in the system. When switching perform in the system, it stores the old running process's status in the form of registers and assigns the CPU to a new process to execute its tasks. While a new process is running in the system, the previous process must wait in a ready queue. The execution of the old process starts at that point where another process stopped it. It defines the characteristics of a multitasking operating system in which multiple processes shared the same CPU to perform multiple tasks without the need for additional processors in the system. Context Switching Triggers There are three major triggers for context switching. These are given as follows − Multitasking: In a multitasking environment, a process is switched out of the CPU so another process can be run. The state of the old process is saved and the state of the new process is loaded. On a pre-emptive system, processes may be switched out by the scheduler. Interrupt Handling: The hardware switches a part of the context when an interrupt occurs. This happens automatically. Only some of the context is changed to minimize the time required to handle the interrupt. User and Kernel Mode Switching: A context switch may take place when a transition between the user mode and kernel mode is required in the operating system. 14) What is independent and cooperative processes? A process is independent if it cannot affect other other process or be affected by it. Any process that does not share data with others is independent. Otherwise the process is cooperating. Cooperation is done to provide information sharing, computational speedups, modularity and convenience. 15) State the advantage of multiprocessor system. Advantages of Multiprocessor Systems There are multiple advantages to multiprocessor systems. Some of these are − More reliable Systems In a multiprocessor system, even if one processor fails, the system will not halt. This ability to continue working despite hardware failure is known as graceful degradation. For example: If there are 5 processors in a multiprocessor system and one of them fails, then also 4 processors are still working. So the system only becomes slower and does not ground to a halt. Enhanced Throughput If multiple processors are working in tandem, then the throughput of the system increases i.e. number of processes getting executed per unit of time increase. If there are N processors then the throughput increases by an amount just under N. More Economic Systems Multiprocessor systems are cheaper than single processor systems in the long run because they share the data storage, peripheral devices, power supplies etc. If there are multiple processes that share data, it is better to schedule them on multiprocessor systems with shared data than have different computer systems with multiple copies of the data. LONG QUESTIONS: Q1. Discuss various operating system services with example. Q2. What is information in the PCB? Discuss with diagram. Q3. Find A.W.T. & A.T.A.T. for the following process using I) Preemptive shortest job first II) Non preemptive shortest job first Process ID. P1 Brust-time. 5 Arrival-time 0 P2 13 1 P3 8 2 P4 4 3 P5 10 4 Q4. What do you understand by process? Explain various states of process with suitable diagram. Q5. Explain briefly Layered Operating System structure with neat sketch. Q6. Differentiate between: i) Real time & Batch Operating System ii) Multiprogramming & Multitasking Q7. What do you mean by Monolithic & Microkernel. Q8. Differentiate between Symmetric and Asymmetric multiprocessing. ***