Os
Os
Once it detects thrashing, what can the system do to eliminate this problem? Answer : Thrashing is caused by under allocation of the minimum number of pages required by a process, forcing it to continuously page fault. The system can detect thras hing by evaluating the level of CPU utilization as compared to the level of mult iprogramming. It can be eliminated by reducing the level of multiprogramming **What is fragmentation? Different types of fragmentation? Answer : Fragmentation occurs in a dynamic memory allocation system when many of the free blocks are too small to satisfy any request. External Fragmentation: External Fragmentation happens when a dynamic memory all ocation algorithm allocates some memory and a small piece is left over that cann ot be effectively used. If too much external fragmentation occurs, the amount of usable memory is drastically reduced. Total memory space exists to satisfy a re quest, but it is not contiguous. Internal Fragmentation: Internal fragmentation is the space wasted inside of all ocated memory blocks because of restriction on the allowed sizes of allocated bl ocks. Allocated memory may be slightly larger than requested memory; this size d ifference is memory internal to a partition, but not being used ***Why paging is used? Answer : Paging is solution to external fragmentation problem which is to permit the logi cal address space of a process to be noncontiguous, thus allowing a process to b e allocating physical memory **What are the basic functions of an operating system? Answer : Operating system controls and coordinates the use of the hardware among the vari ous applications programs for various uses. Operating system acts as resource allocator and manager. Since there are many po ssibly conflicting requests for resources the operating system must decide which requests are allocated resources to operating the computer system efficiently a nd fairly. Also operating system is control program which controls the user programs to pre vent errors and improper use of the computer. It is especially concerned with the operation and control of I/O devices **What is Context Switch? Answer : Switching the CPU to another process requires saving the state of the old proces s and loading the saved state for the new process. This task is known as a conte xt switch. Context-switch time is pure overhead, because the system does no usef ul work while switching. Its speed varies from machine to machine, depending on the memory speed, the number of registers which must be copied, the existed of s pecial instructions( such as a single instruction to load or store all registers ). **What is CPU Scheduler? Answer : Selects from among the processes in memory that are ready to execute, and alloca tes the CPU to one of them. CPU scheduling decisions may take place when a proce ss: 1.Switches from running to waiting state. 2.Switches from running to ready s tate. 3.Switches from waiting to ready. 4.Terminates. Scheduling under 1 and 4 i s non-preemptive. All other scheduling is preemptive.
**What are short-, long- and medium-term scheduling? answer : Long term scheduler determines which programs are admitted to the system for pro cessing. It controls the degree of multiprogramming. Once admitted, a job become s a process. Medium term scheduling is part of the swapping function. This relates to process es that are in a blocked or suspended state. They are swapped out of real-memory until they are ready to execute.The swapping-in decision is based on memory-man agement criteria. short term scheduler, also know as a dispatcher executes most frequently, and ma kes the finest-grained decision of which process should execute next. This sched uler is invoked whenever an event occurs. It may lead to interruption of one pro cess by preemption ***What is Dispatcher? Answer : Dispatcher module gives control of the CPU to the process selected by the shortterm scheduler; this involves: Switching context, Switching to user mode, Jumpin g to the proper location in the user program to restart that program, dispatch l atency - time it takes for the dispatcher to stop one process and start another running. **List out few of the Application of tree data-structure? Answer : The manipulation of Arithmetic expression,Symbol Table construction,Syntax analy sis What is cycle stealing? We encounter cycle stealing in the context of Direct Memory Access (DMA). The DM A controller can use the data bus when the CPU does not need it, The latter tech nique is called cycle stealing. Note that cycle stealing can be done only at spe cific break points in an instruction cycle. What is busy waiting? The repeated execution of a loop of code while waiting for an event to occur is called busy-waiting. The CPU is not engaged in any real productive activity duri ng this period, and the process does not progress toward completion. . What are turnaround time and response time? Turnaround time is the interval between the submission of a job and its completi on. Response time is the interval between submission of a request, and the first response to that request. What are the typical elements of a process image? > User data: Modifiable part of user space. May include program data, user stack area, and programs that may be modified. > User program: The instructions to be executed. > System Stack: Each process has one or more LIFO stacks associated with it. Use d to store parameters and calling addresses for procedure and system calls. > Process control Block (PCB): Info needed by the OS to control processes. What is the Translation Lookaside Buffer (TLB)? In a cached system, the base addresses of the last few referenced pages is maint ained in registers called the TLB that aids in faster lookup. TLB contains those page-table entries that have been most recently used.. What is the resident set and working set of a process? Resident set is that portion of the process image that is actually in real-memor
y at a particular instant. Working set is that subset of resident set that is ac tually needed for execution Explain the concept of Reentrancy. It is a useful, memory-saving technique for multiprogrammed timesharing systems. A Reentrant Procedure is one in which multiple users can share a single copy of a program during the same period. Reentrancy has 2 key aspects: The program cod e cannot modify itself, and the local data for each user process must be stored separately. Explain Belady's Anomaly. Also called FIFO anomaly. Usually, on increasing the number of frames allocated to a process' virtual memory, the process execution is faster, because fewer pag e faults occur. Sometimes, the reverse happens, i.e., the execution time increas es even when more frames are allocated to the process. This is Belady's Anomaly. This is true for certain page reference patterns What is a binary semaphore? What is its use? A binary semaphore is one, which takes only 0 and 1 as values. They are used to implement mutual exclusion and synchronize concurrent processes. List the Coffman's conditions that lead to a deadlock. > Mutual Exclusion: Only one process may use a critical resource at a time. > Hold & Wait: A process may be allocated some resources while waiting for other s. > No Pre-emption: No resource can be forcible removed from a process holding it. > Circular Wait: A closed chain of processes exist such that each process holds at least one resource needed by another process in the chain. When does the condition 'rendezvous' arise? In message passing, it is the condition in which, both, the sender and receiver are blocked until the message is delivered What is a trap and trapdoor? Trapdoor is a secret undocumented entry point into a program used to grant acces s without normal methods of access authentication. A trap is a software interrup t, usually the result of an error condition. Define latency, transfer and seek time with respect to disk I/O. Seek time is the time required to move the disk arm to the required track. Rotat ional delay or latency is the time it takes for the beginning of the required se ctor to reach the head. Sum of seek time (if any) and latency is the access time . In the context of memory management, what are placement and replacement algorith ms? Placement algorithms determine where in available real-memory to load a program. Common methods are first-fit, next-fit, best-fit. Replacement algorithms are us ed when memory is full, and one process (or part of a process) needs to be swapp ed out to accommodate a new program. What are demand- and pre-paging? With demand paging, a page is brought into memory only when a location on that p age is actually referenced during execution. With pre-paging, pages other than t he one demanded by a page fault are brought in. What is page cannibalizing? Page swapping or page replacements are called page cannibalizing
What are the four layers that Windows NT have in order to achieve independence? > Hardware abstraction layer > Kernel > Subsystems > System Services What is SMP? To achieve maximum efficiency and reliability a mode of operation known as symme tric multiprocessing is used. In essence, with SMP any process or threads can be assigned to any processor. List out some reasons for process termination. > Normal completion > Time limit exceeded > Memory unavailable > Bounds violation > Protection error > Arithmetic error > Time overrun > I/O failure > Invalid instruction > Privileged instruction > Data misuse > Operator or OS intervention > Parent termination. What are the reasons for process suspension? > swapping > interactive user request > timing > parent process request What is a Real-Time System? A real time operating system is an operating system that can run real time proc esses successfully
What is Throughput, Turnaround time, waiting time and Response time? Throughput number of processes that complete their execution per time unit Turnaround time amount of time to execute a particular process Waiting time amount of time a process has been waiting in the ready queue Response time amount of time it takes from when a request was submitted until th e first response is produced, not output (for time-sharing environment