os

Published on January 2017 | Categories: Documents | Downloads: 53 | Comments: 0 | Views: 542
of 18
Download PDF   Embed   Report

Comments

Content

What is MUTEX ? What isthe difference between a thread and a What is INODE? Explain the working of Virtual Memory. How does Windows NT supports Multitasking?

process ?

Explain the Unix Kernel. What is Concurrency? Expain with example Deadlock and Starvation. What are your solution strategies for Dining Philosophers Problem ? Explain Memory Partitioning, Paging, Segmentation. Explain Scheduling. Operating System Security. What is Semaphore? Explain the following file systems : NTFS, Macintosh(HPFS), FAT . What are the different process states? What is Marshalling? Define and explain COM? What is Marshalling? Difference - Loading and Linking ? Operating system questions By admin January 17, 2005 What are the basic functions of an operating system? - Operating system controls and coordinates the use of the hardware among the various applications programs for various uses. Operating system acts as resource allocator and manager. Sinc e there are many possibly conflicting requests for resources the operating syste m must decide which requests are allocated resources to operating the computer s ystem efficiently and fairly. Also operating system is control program which con trols the user programs to prevent errors and improper use of the computer. It i s especially concerned with the operation and control of I/O devices. Why paging is used? - Paging is solution to external fragmentation problem which is to permit the logical address space of a process to be noncontiguous, thus a llowing a process to be allocating physical memory wherever the latter is availa ble. While running DOS on a PC, which command would be used to duplicate the entire d iskette? diskcopy

What resources are used when a thread created? How do they differ from those whe n a process is created? - When a thread is created the threads does not require any new resources to execute the thread shares the resources like memory of the process to which they belong to. The benefit of code sharing is that it allows a n application to have several different threads of activity all within the same address space. Whereas if a new process creation is very heavyweight because it always requires new address space to be created and even if they share the memor y then the inter process communication is expensive when compared to the communi cation between the threads. What is virtual memory? - Virtual memory is hardware technique where the system appears to have more memory that it actually does. This is done by time-sharing, the physical memory and storage parts of the memory one disk when they are not actively being used. What is Throughput, Turnaround time, waiting time and Response time? - Throughpu t â⠬â number of processes that complete their execution per time unit. Turnaround time ime to execute a particular process. Waiting time â⠬â amount of time a process has bee ting in the ready queue. Response time â⠬â amount of time it takes from when a request submitted until the first response is produced, not output (for time-sharing env ironment). What is the state of the processor, when a process is waiting for some event to occur? - Waiting state What is the important aspect of a real-time system or Mission Critical Systems? - A real time operating system has well defined fixed time constraints. Process must be done within the defined constraints or the system will fail. An example

is the operating system for a flight control computer or an advanced jet airplan e. Often used as a control device in a dedicated application such as controlling scientific experiments, medical imaging systems, industrial control systems, an d some display systems. Real-Time systems may be either hard or soft real-time. Hard real-time: Secondary storage limited or absent, data stored in short term m emory, or read-only memory (ROM), Conflicts with time-sharing systems, not suppo rted by general-purpose operating systems. Soft real-time: Limited utility in in dustrial control of robotics, Useful in applications (multimedia, virtual realit y) requiring advanced operating-system features. What is the difference between Hard and Soft real-time systems? - A hard real-ti me system guarantees that critical tasks complete on time. This goal requires th at all delays in the system be bounded from the retrieval of the stored data to the time that it takes the operating system to finish any request made of it. A soft real time system where a critical real-time task gets priority over other t asks and retains that priority until it completes. As in hard real time systems kernel delays need to be bounded What is the cause of thrashing? How does the system detect thrashing? Once it de tects thrashing, what can the system do to eliminate this problem? - Thrashing i s caused by under allocation of the minimum number of pages required by a proces s, forcing it to continuously page fault. The system can detect thrashing by eva luating the level of CPU utilization as compared to the level of multiprogrammin g. It can be eliminated by reducing the level of multiprogramming. What is multi tasking, multi programming, multi threading? - Multi programming: Multiprogramming is the technique of running several programs at a time using ti mesharing. It allows a computer to do several things at the same time. Multiprog ramming creates logical parallelism. The concept of multiprogramming is that the operating system keeps several jobs in memory simultaneously. The operating sys tem selects a job from the job pool and starts executing a job, when that job ne eds to wait for any i/o operations the CPU is switched to another job. So the ma in idea here is that the CPU is never idle. Multi tasking: Multitasking is the l ogical extension of multiprogramming .The concept of multitasking is quite simil ar to multiprogramming but difference is that the switching between jobs occurs so frequently that the users can interact with each program while it is running. This concept is also known as time-sharing systems. A time-shared operating sys tem uses CPU scheduling and multiprogramming to provide each user with a small p ortion of time-shared system. Multi threading: An application typically is imple mented as a separate process with several threads of control. In some situations a single application may be required to perform several similar tasks for examp le a web server accepts client requests for web pages, images, sound, and so for th. A busy web server may have several of clients concurrently accessing it. If the web server ran as a traditional single-threaded process, it would be able to service only one client at a time. The amount of time that a client might have to wait for its request to be serviced could be enormous. So it is efficient to have one process that contains multiple threads to serve the same purpose. This approach would multithread the web-server process, the server would create a sep arate thread that would listen for client requests when a request was made rathe r than creating another process it would create another thread to service the re quest. To get the advantages like responsiveness, Resource sharing economy and u tilization of multiprocessor architectures multithreading concept can be used. What is hard disk and what is its purpose? - Hard disk is the secondary storage device, which holds the data in bulk, and it holds the data on the magnetic medi um of the disk.Hard disks have a hard platter that holds the magnetic medium, th e magnetic medium can be easily erased and rewritten, and a typical desktop mach ine will have a hard disk with a capacity of between 10 and 40 gigabytes. Data i s stored onto the disk in the form of files. What is fragmentation? Different types of fragmentation? - 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 allocation algorithm allocates some memory and a small pie ce is left over that cannot be effectively used. If too much external fragmentat

ion occurs, the amount of usable memory is drastically reduced. Total memory spa ce exists to satisfy a request, but it is not contiguous. Internal Fragmentation : Internal fragmentation is the space wasted inside of allocated memory blocks b ecause of restriction on the allowed sizes of allocated blocks. Allocated memory may be slightly larger than requested memory; this size difference is memory in ternal to a partition, but not being used What is DRAM? In which form does it store data? - DRAM is not the best, but it s c heap, does the job, and is available almost everywhere you look. DRAM data resid es in a cell made of a capacitor and a transistor. The capacitor tends to lose d ata unless it s recharged every couple of milliseconds, and this recharging tends to slow down the performance of DRAM compared to speedier RAM types. What is Dispatcher? - Dispatcher module gives control of the CPU to the process selected by the short-term scheduler; this involves: Switching context, Switchin g to user mode, Jumping to the proper location in the user program to restart th at program, dispatch latency â⠬â time it takes for the dispatcher to stop one process tart another running. What is CPU Scheduler? - Selects from among the processes in memory that are rea dy to execute, and allocates the CPU to one of them. CPU scheduling decisions ma y take place when a process: 1.Switches from running to waiting state. 2.Switche s from running to ready state. 3.Switches from waiting to ready. 4.Terminates. S cheduling under 1 and 4 is non-preemptive. All other scheduling is preemptive. What is Context Switch? - Switching the CPU to another process requires saving t he state of the old process and loading the saved state for the new process. Thi s task is known as a context switch. Context-switch time is pure overhead, becau se the system does no useful work while switching. Its speed varies from machine to machine, depending on the memory speed, the number of registers which must b e copied, the existed of special instructions(such as a single instruction to lo ad or store all registers). What is cache memory? - Cache memory is random access memory (RAM) that a comput er microprocessor can access more quickly than it can access regular RAM. As the microprocessor processes data, it looks first in the cache memory and if it fin ds the data there (from a previous reading of data), it does not have to do the more time-consuming reading of data from larger memory. What is a Safe State and what is its use in deadlock avoidance? - When a process requests an available resource, system must decide if immediate allocation leav es the system in a safe state. System is in safe state if there exists a safe se quence of all processes. Deadlock Avoidance: ensure that a system will never ent er an unsafe state. What is a Real-Time System? - A real time process is a process that must respond to the events within a certain time period. A real time operating system is an operating system that can run real time processes successfully Give tabular difference between batch processing,time sharing,online time sharin g,multiprogramming batch system and distributed operating sustems? Asked By: amrinder singh Asked On: Aug 1st, 2006 Last Updated: Nov 13th, 2011 Answer6 Difference between ntfs and fat32? Asked By: ravi_poo2002 Asked On: Mar 24th, 2006 Last Updated: Oct 21st, 2011 Read Best Answer Answer54 What is the meaning of physical memory and virtual memory? Asked By: vanitha Asked On: Mar 5th, 2006 Last Updated: Oct 17th, 2011 Answer12 The first-fit test and the worst-fit algorithm can be used for 1. Contiguous alo cation allocation of memory 2. Linked alocation allocation of memory 3. Indexed alocation allocation... Asked By: Rujul Asked On: Mar 9th, 2007 Last Updated: Oct 16th, 2011

Answer3 Difference between a process and a program? Asked By: pinky_princess88 Asked On: Nov 21st, 2005 Last Updated: Oct 4th, 2011 Answer25 Difference between time sharing and multitasking systems? Asked By: Nithyaa Asked On: Jun 18th, 2006 Last Updated: Sep 18th, 2011 Answer7 What is the shortest definition of os? Asked By: ashish garg Asked On: Aug 30th, 2006 Last Updated: Aug 30th, 2011 Answer16 What is the hibernation mode? Asked By: Gagan Anand Asked On: Jan 4th, 2006 Last Updated: Aug 10th, 2011 Answer5 What is the main difference between gpos and rtos? Asked By: satyagmk Asked On: Nov 14th, 2007 Last Updated: Aug 7th, 2011 Answer3 Semaphores Asked By: tereraiterence Asked On: Jan 26th, 2009 Last Updated: Jul 1st, 2011 Answer5 Types of file system in LINUX? Asked By: kishora Asked On: Sep 22nd, 2006 Last Updated: May 12th, 2011 Answer7 Difference between win98 and windowsxp? Asked By: Prince Asked On: Jul 29th, 2006 Last Updated: May 12th, 2011 Read Best Answer Answer7 What is the difference between UNIX and windows operating systems? Asked By: meera Asked On: Oct 7th, 2005 Last Updated: May 3rd, 2011 Answer35 Discuss the advantages and disadvantages of removing operating system altogether ? Asked By: pinky_princess88 Asked On: Nov 21st, 2005 Last Updated: Jan 3rd, 2011 Answer7 Data inconsistency / critical section Asked By: fatema sawan Asked On: May 25th, 2010 Last Updated: Dec 31st, 2010 Answer3 Deadlock cycle Asked By: navneetasharma Asked On: Jan 5th, 2009 Last Updated: Sep 25th, 2010 Answer2 Cache memory access time Asked By: saurabhupd Asked On: Apr 19th, 2010 Last Updated: Aug 27th, 2010 Answer1 Operating systems virtual memory Asked By: nishacoolnidhi Asked On: Nov 17th, 2009 Last Updated: Jun 26th, 2010 Answer1 Page fault Asked By: rohit.sen23 Asked On: Dec 16th, 2009

Last Updated: Apr 8th, 2010 Answer1 Which is the first operating systems? Asked By: geebs Asked On: Jul 25th, 2006 Last Updated: Jan 2nd, 2010 Answer Explain the meaning of Kernal. Answer The kernel is the essential center of a computer operating system, the core that provides basic services for all other parts of the operating system. As a basic component of an operating system, a kernel provides the lowest-level abstraction layer for the resources. The kernel's primary purpose is to manage the computer's resources and allow oth er programs to run and use the resources like the CPU, memory and the I/O device s in the computer. The facilities provides by the kernel are : Memory management The kernel has full access to the system's memory and must allow processes to ac cess safely this memory as they require it. Device management To perform useful functions, processes need access to the peripherals connected to the computer, which are controlled by the kernel through device drivers System calls To actually perform useful work, a process must be able to access the services p rovided by the kernel. Types of Kernel: Monolithic kernels Every part which is to be accessed by most programs which cannot be put in a lib rary is in the kernel space: Device drivers Scheduler Memory handling File systems Network stacks Microkernls In Microkernels, parts which really require to be in a privileged mode are in ke rnel space: -Inter-Process Communication, -Basic scheduling -Basic memory handling -Basic I/O primitives Due to this, some critical parts like below run in user space: The complete scheduler Memory handling File systems Network stacks Operating system - Kernel - Jan 07, 2010 at 15:00 PM by Vidya Sagar Explain the meaning of Kernal.

Answer The kernel is the essential center of a computer operating system, the core that provides basic services for all other parts of the operating system. As a basic component of an operating system, a kernel provides the lowest-level abstraction layer for the resources. The kernel's primary purpose is to manage the computer's resources and allow oth er programs to run and use the resources like the CPU, memory and the I/O device s in the computer. The facilities provides by the kernel are : Memory management The kernel has full access to the system's memory and must allow processes to ac cess safely this memory as they require it. Device management To perform useful functions, processes need access to the peripherals connected to the computer, which are controlled by the kernel through device drivers System calls To actually perform useful work, a process must be able to access the services p rovided by the kernel. Types of Kernel: Monolithic kernels Every part which is to be accessed by most programs which cannot be put in a lib rary is in the kernel space: Device drivers Scheduler Memory handling File systems Network stacks Microkernls In Microkernels, parts which really require to be in a privileged mode are in ke rnel space: -Inter-Process Communication, -Basic scheduling -Basic memory handling -Basic I/O primitives Due to this, some critical parts like below run in user space: The complete scheduler Memory handling File systems Network stacks Operating system - Kernel - Jan 07, 2010 at 15:00 PM by Vidya Sagar Explain the meaning of Kernel. Kernel is the core module of an operating system. It is the kernel that loads fi rst and retain in main memory of the computer system. It provides all essential operations /services those are needed by applications. Kernel takes the responsi bility of managing the memory, task, disk and process. What is a command interpreter? Answer The part of an Operating System that interprets commands and carries them out. A command interpreter is the part of a computer operating system that understand

s and executes commands that are entered interactively by a human being or from a program. In some operating systems, the command interpreter is called the shel l. The BIOS is looking for the files needed to load in case of Windows is the Comma nd.com. The required files are Command.com, IO.sys, and Msdos.sys to get Windows started. They reside in the Root of the C Drive. Operating system - What is a command interpreter? - Jan 07, 2010 at 15:00 PM by Vidya Sagar What is a command interpreter? A command interpreter is a program which reads the instructions given by the use r. It then translates these instructions into the context of the operating syste m followed by the execution. Command interpreter is also known as shell What is a daemon? In Unix and some other operating systems, a daemon is a computer program that ru ns in the background, It is not under the direct control of a user. They are usually initiated as background processes. Daemons have names that end with the letter "d". E.g. syslogd, sshd In a Unix, the parent process of a daemon is usually the init process (PID=1). P rocesses usually become daemons by forking a child process and then having their parent process immediately exit, thus causing init to adopt the child process. Operating system - What is a daemon? - Jan 07, 2010 at 15:00 PM by Vidya Sagar What is a daemon? Daemon is a program that runs in the background without user s interaction. A daem on runs in a multitasking operating system like UNIX. A daemon is initiated and controlled by special programs known as processes . Usually daemons have a suffix l etter d . For instance, syslogd , a daemon for handling the system log. Explain the basic functions of process management. Answer The basic functions of the OS wrt the process management are : Allocating resources to processes, enabling processes to share and exchange information, protecting the resources of each process from other processes and enabling synchronisation among processes. Operating system - functions of process management - Jan 07, 2010 at 15:00 PM b y Vidya Sagar Explain the basic functions of process management. A process is an integral part of operating system. The resources are allocated b y the operating system to the processes. The functions are: - Allocation and protection of resources - Synchronization enabling for all processes - Processes protection

What is a named pipe? Answer A connection used to transfer data between separate processes, usually on separa te computers. Its a pipe that an application opens by name in order to write data into or read data from the pipe. They are placed in the /dev directory and are treated as special files. Using a named pipe facilitates interprocess communications. Operating system - What is a named pipe? - Jan 07, 2010 at 15:00 PM by Vidya Sa gar What is a named pipe? A named pipe is an extension of the concept pipe in multitasking operating system. Inter process communication is implemented using a named pipe. A pipe / traditi onal pipe is unnamed. The reason is it persists as long as the process is execut ing. Where as a named pipe is system-persistent and exists more than a process r unning time. It can be removed if not required in future. What is pre-emptive and non-preemptive scheduling? Answer Tasks are usually assigned with priorities. At times it is necessary to run a ce rtain task that has a higher priority before another task although it is running . Therefore, the running task is interrupted for some time and resumed later whe n the priority task has finished its execution. This is called preemptive schedu ling. Eg: Round robin In non-preemptive scheduling, a running task is executed till completion. It can not be interrupted. Eg First In First Out Operating system - pre-emptive and non-preemptive scheduling - Jan 07, 2010 at 1 5:00 PM by Vidya Sagar What is pre-emptive and non-preemptive scheduling? Preemptive scheduling: The preemptive scheduling is prioritized. The highest pri ority process should always be the process that is currently utilized. Non-Preemptive scheduling: When a process enters the state of running, the state of that process is not deleted from the scheduler until it finishes its service time. What is a semaphore? Answer A semaphore is a variable. There are 2 types of semaphores: Binary semaphores Counting semaphores Binary semaphores have 2 methods associated with it. (up, down / lock, unlock) Binary semaphores can take only 2 values (0/1). They are used to acquire locks. When a resource is available, the process in charge set the semaphore to 1 else 0.

Counting Semaphore may have value to be greater than one, typically used to allo cate resources from a pool of identical resources. Explain the meaning of mutex. Answer A mutex and the binary semaphore are essentially the same. Both can take values: 0 or 1. However, there is a significant difference between them that makes mute xes more efficient than binary semaphores. A mutex can be unlocked only by the thread that locked it. Thus a mutex has an o wner concept. Operating System mutex - May 06, 2009 at 18:10 PM by Vidya Sagar What is difference between binary semaphore and mutex? The differences between binary semaphore and mutex are: Mutex is used exclusively for mutual exclusion. Both mutual exclusion and synchr onization can be used by binary. A task that took mutex can only give mutex. From an ISR a mutex can not be given. Recursive taking of mutual exclusion semaphores is possible. This means that a t ask that holds before finally releasing a semaphore, can take the semaphore more than once. Options for making the task which takes as DELETE_SAFE are provided by Mutex, wh ich means the task deletion is not possible when holding the mutex. Operating system - meaning of mutex - Jan 07, 2010 at 15:00 PM by Vidya Sagar Explain the meaning of mutex. Mutex is the short form for Mutual Exclusion object . A mutex allows multiple threa ds for sharing the same resource. The resource can be file. A mutex with a uniqu e name is created at the time of starting a program. A mutex must be locked from other threads, when any thread that needs the resource. When the data is no lon ger used / needed, the mutex is set to unlock. What are the different types of memory? Answer The types of memory in a computer system are: Cache Memory - This is a small amounts of memory used to speed up system perform ance. Main memory - This is the RAM (random access memory) Secondary memory - This is a magnetic storage that keeps applications and data a vailable to be used, and may also serves as virtual memory depending upon the op erating system Operating system - What are the different types of memory? - Jan 07, 2010 at 15: 00 PM by Vidya Sagar What are the different types of memory? The memory types are: SIMM - Single-Line Memory Modules: Used to store single row of chips which are s oldered onto Printed Circuit Board. DIMM Dual-Line Memory Modules: Used to store two rows of chips which are soldere

d onto printed circuit board and enables to contain two times memory than SIMM DRAM Dynamic Random Access Memory: It holds data for short time period and will be refreshed periodically. SDRAM - Static RAM n DRAM. Holds data and refreshing does not required. It is faster tha

Flash Memory: A non volatile, rewritable and solid state memory which performs t he functions of both RAM and hard disk combined. Data is retained in the memory, in case of power loss. It is ideal for printers, cellular phones, digital camer as, pagers. Shadow RAM: Allows the moving of selected parts of BIOS code that is available i n ROM to the faster RAM Explain the meaning of virtual memory. Answer Virtual memory is an approach to make use of the secondary storage devices as an extension of the primary storage of the computer. It is the process of increasing the apparent size of a computer's RAM by using a section of the hard disk storage as an extension of RAM. Logically-assigned memory that may or may not exist physically. Through the use of paging and the swap area, more memory can be referenced and allocated than ac tually exists on the system, thus giving the appearance of a larger main memory than actually exists. Operating System virtual memory - May 06, 2009 at 18:10 PM by Vidya Sagar What is virtual memory? Most operating systems of desktop computers have a common part known as virtual memory. The use of virtual memory is so common because of its benefits provided to user at a lower cost. Today most of the computers have RAM of capacity 64 or 128 MB to be used by the CPU resources. This amount of RAM is not sufficient to run all applications that are used by most users in their expected way and all at once. For example, an e -mail program, a web browser and a word processor is loaded into RAM simultaneou sly; the 64 MB space is not enough to store all these programs. In the absence o f virtual memory, a message Sorry, you cannot load any more applications. Please close an application to load a new one. would be displayed. With the use of virtu al memory, a computer can look for empty areas of RAM which is not being used cu rrently and copies them on to the hard disk device. This process frees up RAM to load new applications. As it is done automatically, the user do not even know t hat it is happening, and the user feels like RAM has unlimited space even though the RAM capacity is 32 MB. The fact that hard disk space is much cheaper than R AM chips allows virtual memory also as a nice economic benefit. The RAM images are stored in the hard disk and known as page file. It contains t he pages of RAM, and the data moves back and forth between the pages file and RA M by the operating system. The page files on a machine with Windows operating sy stem have a .SWP extension. The read/write speed of a hard disk drive is slower than RAM. The hard disk s tech nology is not upgraded to access small pieces of data at a given point of time. If the reliance of a system is too heavy on virtual memory, a significant perfor

mance drop would be noticed. The key for this is to have sufficient amount of RA M to handle all aspects that tend to work simultaneously. The feel of slowness o f virtual memory is a slight pause at the time of changing tasks. Virtual memory works beautifully with sufficient RAM availability. If not, the operating syste m must swap information back and forth between RAM and the hard disk constantly. This process is called trashing , and also causes the feel to the user that the co mputer system is incredibly slow. Operating system - meaning of virtual memory - Jan 07, 2010 at 15:00 PM by Vidy a Sagar Explain the meaning of virtual memory. Virtual Memory is a feature of an operating system. Virtual memory enables memor y address space usage by a process which is independent of other processes runni ng at the same time and uses memory space which is larger than RAM. It relegates temporarily some content that is available in RAM to disk Operating System - What is RTOS? - May 06, 2009 at 15:40 PM by Vidya Sagar What is RTOS? A certain capability within a specified time constraint is guaranteed by an oper ating system called real time operating system . For example, certain object availa bility for a robot when it is assembled is ensured by a real time operating syst em. For making an object available within a designated time, the operating syste m would terminate with a failure. This is called a hard real time operating system . The assembly line will be continued for functioning, but the output of product ion might be lower as the objects appearance is failed in a designated time, whi ch causes the robot to be temporarily unproductive. This is called soft real time operating system. Some of the real time operating systems qualities can be valua ted by operating systems such as Microsoft s Windows 2000, IBM s OS/390 up to some e xtent. It means that, if an operating system does not qualify certain characteri stics of the operating system enables to be considered as a solution to a certai n real time application problem. There is a requirement of real time operating system in small embedded systems w hich are bundled as part of micro devices. The requirements of real time operati ng systems are considered for some kernels. Since device drivers also needed for a suitable solution, a real time operating system is larger than just a kernel. Operating System - Hard real-time and soft real-time - May 06, 2009 at 15:40 PM by Vidya Sagar 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. The t asks needed for delays in the system are to be bounded by retrieving the stored data at the time which takes the operating system to complete any request. A critical task obtains a priority over other tasks and maintaining that priorit y until the completion of the task. This is performed by a soft real time system . The system kernel delays need to be bounded as in the case of hard real time s ystem. Operating System - type of scheduling in RTOS - May 06, 2009 at 15:40 PM by Vid ya Sagar What type of scheduling is there in RTOS?

The tasks of real time operating system have 3 states namely, running , ready , blocked Only one task per CPU is being performed at a given point of time. In systems t hat are simpler, the list is usually short, two or three tasks at the most. The designing of scheduler is the real key. Usually to minimize the worst-case l ength of time spent in the scheduler s critical section, the data structure of the ready list in the scheduler is designed. This is done during the inhibition of preemption. All interrupts are disabled in certain cases. The data structure cho ice depends on the tasks on the ready list can perform at the maximum. Operating System - What is interrupt latency? - May 06, 2009 at 15:40 PM by Vidy a Sagar What is interrupt latency? The time between a device that generates an interrupt and the servicing of the d evice that generated the interrupt is known as interrupt latency. Many operating systems devices are serviced soon after the interrupt handler of the device is e xecuted. The effect of interrupt latency may be caused by the interrupt controll ers, interrupt masking, and the methods that handle interrupts of an operating s ystem. Operating System - What is priority inheritance? - May 06, 2009 at 15:40 PM by V idya Sagar What is priority inheritance? Priority inversion problems are eliminated by using a method called priority inh eritance. The process priority will be increased to the maximum priority of any process which waits for any resource which has a resource lock. This is the prog ramming methodology of priority inheritance. When one or more high priority jobs are blocked by a job, the original priority assignment is ignored and execution of critical section at the highest priority level of jobs it blocks is performed. The job returns to the original priority l evel soon after executing the critical section. This is the basic idea of priori ty inheritance protocol. Operating System - What is spin lock? - May 06, 2009 at 15:40 PM by Vidya Sagar What is spin lock? In a loop a thread waits simply ( spins ) checks repeatedly until the lock becomes a vailable. This type of lock is a spin lock. The lock is a kind of busy waiting, as the threads remains active by not performing a useful task. The spin locks ar e to release explicitly, although some locks are released automatically when the tread blocks. xperienced Questions : 1 Explain the concept of Reentrancy. ? Answers : 1 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. Thus, the permanent part is the code, and the temporary part is the pointer back to the calling program and local variables used by that program. Ea ch execution instance is called activation. It executes the code in the permanen t part, but has its own copy of local variables/parameters. The temporary part a

ssociated with each activation is the activation record. Generally, the activati on record is kept on the stack. Note: A reentrant procedure can be interrupted and called by an interrupting pro gram, and still execute correctly on returning to the procedure. Questions : 2 Explain Belady's Anomaly. Answers : 2 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. Questions : 3 What is a binary semaphore? What is its use? Answer : 3 A binary semaphore is one, which takes only 0 and 1 as values. They are used to implement mutual exclusion and synchronize concurrent processes. Questions : 4 What is thrashing? Answer : 4 It is a phenomenon in virtual memory schemes when the processor spends most of i ts time swapping pages, rather than executing instructions. This is due to an in ordinate number of page faults. Questions : 5 List the Coffman's conditions that lead to a deadlock. Answers : 5 ==> Mutual Exclusion : Only one process may use a critical reso urce at a time. ==> Hold and Wait : A process may be allocated some resources while waiting for others. ==> No Pre-emption : No resource can be forcible removed from a process hol ding it. ==> Circular Wait : A closed chain of processes exist such that each process hol ds at least one resource needed by another process in the chain. Questions : 6 What are short-term, long-term and medium-term scheduling? Answers : 6 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-ma nagement 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. Questions : 7 What are turnaround time and response time? Answers : 7 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. Questions : 8 What are the typical elements of a process image? Answers : 8 ==> User data : Modifiable part of user space. May include prog ram 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. Used to store parameters and calling addresses for procedure and system call

s. ==> .

Process control Block (PCB) : Info needed by the OS to control processes

Questions : 9 What is the Translation Lookaside Buffer (TLB)? Answers : 9 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. Normally, each virtual me mory reference causes 2 physical memory accesses-- one to fetch appropriate page -table entry, and one to fetch the desired data. Using TLB in-between, this is r educed to just one physical memory access in cases of TLB-hit. Questions : 10 What is the resident set and working set of a process? Answers : 10 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. (Relate this to the variable-window size method for swapping techniques.) Questions : 11 When is a system in safe state? Answers : 11 The set of dispatchable processes is in a safe state if there exists at least on e temporal order in which all processes can be run to completion without resulti ng in a deadlock. Questions : 12 What is cycle stealing? Answers : 12 We encounter cycle stealing in the context of Direct Memory Access (DMA). Either the DMA controller can use the data bus when the CPU does not need it, or it ma y force the CPU to temporarily suspend operation. The latter technique is called cycle stealing. Note that cycle stealing can be done only at specific break poi nts in an instruction cycle. Questions : 13 What is meant by arm-stickiness? Answers : 13 If one or a few processes have a high access rate to data on one track of a stor age disk, then they may monopolize the device by repeated requests to that track . This generally happens with most common device scheduling algorithms (LIFO, SS TF, C-SCAN, etc). High-density multisurface disks are more likely to be affected by this than low density ones. Questions : 14 What are the stipulations of C2 level security? Answers : 14 C2 level security provides for: ==> Discretionary Access Control ==> Identification and Authentication ==> Auditing ==> Resource reuse Questions : 15 What is busy waiting? Answers : 15 The repeated execution of a loop of code while waiting for an e vent to occur is called busy-waiting. The CPU is not engaged in any real product ive activity during this period, and the process does not progress toward comple tion. Questions : 16 Explain the popular multiprocessor thread-scheduling strategies. Answers : 16 ==> Load Sharing : Processes are not assigned to a particular processor. A globa l queue of threads is maintained. Each processor, when idle, selects a thread fr om this queue. Note that load balancing refers to a scheme where work is allocat

ed to processors on a more permanent basis. ==>Gang Scheduling: A set of related threads is scheduled to run on a set of pro cessors at the same time, on a 1-to-1 basis. Closely related threads / processes may be scheduled this way to reduce synchronization blocking, and minimize proc ess switching. Group scheduling predated this strategy. ==>Dedicated processor assignment: Provides implicit scheduling defined by assig nment of threads to processors. For the duration of program execution, each prog ram is allocated a set of processors equal in number to the number of threads in the program. Processors are chosen from the available pool. ==>Dynamic scheduling: The number of thread in a program can be altered during t he course of execution. Questions : 17 When does the condition 'rendezvous' arise? Answers : 17 In message passing, it is the condition in which, both, the sender and receiver are blocked until the message is delivered. Questions : 18 What is a trap and trapdoor? Answers : 18 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. Questions : 19 What are local and global page replacements? Answers : 19 Local replacement means that an incoming page is brought in only to the relevant process' address space. Global replacement policy allows any page frame from an y process to be replaced. The latter is applicable to variable partitions model only. Questions : 20 Define latency, transfer and seek time with respect to disk I/O. Answers : 20 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 . Time taken to actually transfer a span of data is transfer time. Questions : 21 Describe the Buddy system of memory allocation. Answers : 21 Free memory is maintained in linked lists, each of equal sized blocks. Any such block is of size 2^k. When some memory is required by a process, the block size of next higher order is chosen, and broken into two. Note that the two such piec es differ in address only in their kth bit. Such pieces are called buddies. When any used block is freed, the OS checks to see if its buddy is also free. If so, it is rejoined, and put into the original free-block linked-list. Questions : 22 What is time-stamping? Answers : 22 It is a technique proposed by Lamport, used to order events in a distributed sys tem without the use of clocks. This scheme is intended to order events consistin g of the transmission of messages. Each system 'i' in the network maintains a co unter Ci. Every time a system transmits a message, it increments its counter by 1 and attaches the time-stamp Ti to the message. When a message is received, the receiving system 'j' sets its counter Cj to 1 more than the maximum of its curr ent value and the incoming time-stamp Ti. At each site, the ordering of messages is determined by the following rules: For messages x from site i and y from sit e j, x precedes y if one of the following conditions holds....(a) if Ti Questions : 23 How are the wait/signal operations for monitor different from th ose for semaphores?

Answers : 23 If a process in a monitor signal and no task is waiting on the condition variabl e, the signal is lost. So this allows easier program design. Whereas in semaphor es, every operation affects the value of the semaphore, so the wait and signal o perations should be perfectly balanced in the program. Questions : 24 In the context of memory management, what are placement and repl acement algorithms? Answers : 24 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. The replacement algorithm determines which are the partitions to be swapped out. Questions : 25 In loading programs into memory, what is the difference between load-time dynamic linking and run-time dynamic linking? Answer : 25 For load-time dynamic linking: Load module to be loaded is read into memory. Any reference to a target external module causes that module to be loaded and the r eferences are updated to a relative address from the start base address of the a pplication module. With run-time dynamic loading: Some of the linking is postponed until actual ref erence during execution. Then the correct module is loaded and linked. Questions : 26 Answer : 26 ocation on that ages other than f such pages is emory devices. What are demand- and pre-paging? With demand paging, a page is brought into memory only when a page is actually referenced during execution. With pre-paging, the one demanded by a page fault are brought in. The selection done based on common access patterns, especially for secondary l p o m

Questions : 27 Paging a memory management function, while multiprogramming a pr ocessor management function, are the two interdependent? Answers : 27 Yes. Questions : 28 What is page cannibalizing? Answer : 28 Page swapping or page replacements are called page cannibalizin g. Questions : 29 What has triggered the need for multitasking in PCs? Answer : 29 ==> Increased speed and memory capacity of microprocessors toge ther with the support fir virtual memory and ==> Growth of client server computing Questions : 30 What are the four layers that Windows NT have in order to achiev e independence? Answer : 30 ==> Hardware abstraction layer ==> Kernel ==> Subsystems ==> System Services. Questions : 31 What is SMP? Answer : 31 To achieve maximum efficiency and reliability a mode of operati on known as symmetric multiprocessing is used. In essence, with SMP any process or threads can be assigned to any processor. Questions : 32 What are the key object oriented concepts used by Windows NT? Answer : 32 ==> Encapsulation ==> Object class and instance

Questions : 33 Is Windows NT a full blown object oriented operating system? Giv e reasons. Answer : 33 No Windows NT is not so, because its not implemented in object oriented language and the data structures reside within one executive component and are not represented as objects and it does not support object oriented capab ilities Questions : 34 What is a drawback of MVT? Answer : 34 It does not have the features like ==> ability to support multiple processors ==> virtual storage ==> source level debugging Questions : 35 What is process spawning? Answer : 35 When the OS at the explicit request of another process creates a process, this action is called process spawning Questions : 36 How many jobs can be run concurrently on MVT? Answer : 36 15 jobs Questions : 37 List out some reasons for process termination. Answer : 37 ==> 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 Questions : 38 What are the reasons for process suspension? Answer : 38 ==> swapping ==> interactive user request ==> timing ==> parent process request Questions : 39 What is process migration? Answer : 39 It is the transfer of sufficient amount of the state of process from one machine to the target machine Questions : 40 What is mutant? Answer : 40 In Windows NT a mutant provides kernel mode or user mode mutual exclusion with the notion of ownership. Questions : 41 What is an idle thread? Answer : 41 The special thread a dispatcher will execute when no ready thre ad is found Questions : 42 What is FtDisk? Answer : 42 It is a fault tolerance disk driver for Windows NT. Questions : 43 What are the possible threads a thread can have? Answer : 43 ==> Ready ==> Standby

==> ==> ==> ==>

Running Waiting Transition Terminated.

Questions : 44 What are rings in Windows NT? Answer : 44 Windows NT uses protection mechanism called rings provides by t he process to implement separation between the user mode and kernel mode. Questions : 45 What is Executive in Windows NT? Answer : 45 In Windows NT, executive refers to the operating system code th at runs in kernel mode. Questions : 46 What are the sub-components of I/O manager in Windows NT? Answer : 46 ==> Network redirector/ Server ==> Cache manager. ==> File systems ==> Network driver ==> Device driver Questions : 47 What are DDks? Name an operating system that includes this featu re. Answer : 47 DDks are device driver kits, which are equivalent to SDKs for w riting device drivers. Windows NT includes DDks. Questions : 48 What level of security does Windows NT meets? Answer : 48 C2 level security

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close