Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 1. 1. In multiprocessor systems, failure of one processor will not halt the system, but only slow it down by sharing the work of failure system by other systems. This ability to continue providing service is proportional to the surviving hardware is called graceful degradation2. The invocation of an operating system routine. Operating systems contain sets of routines for performing various low-level operations. For example, all operating systems have a routine for creating a directory. If you want to execute anoperating system routine from a program, you must make a system call. ORSystem calls are required to access services of OS for user level processes.3. Solution to critical section problem must satisfy these three requirements:1. mutual exclusion - only one process in its critical section at a time2. progress - waiting processes must be permitted to enter critical sections if no other process is in itscritical section3. bounded waiting - there must be a limit to how long a process is delayed waiting for entry into its criticalsection 1. mutual exclusion The resources involved must be unshareable; otherwise, the processes would not be prevented from using the resource when necessary. 2. hold and wait or partial allocation The processes must hold the resources they have already been allocated while waiting for other (requested) resources. If the process had to release its resources when a new resource or resources were requested, deadlock could not occur because the process would not prevent others from using resources that it controlled. 3. no pre-emption The processes must not have resources taken away while that resource is being used. Otherwise, deadlock could not occur since the operating system could simply take enough resources from running processes to enable any process to finish. 4. resource waiting or circular wait A circular chain of processes, with each process holding resources which are currently being requested by the next process in the chain, cannot exist. If it does, the cycle theorem (which states that "a cycle in the resource graph is necessary for deadlock to occur") indicated that deadlock could occur. Q5. Paging is a memory management technique in which the memory is divided into fixed size pages. Paging is used for faster access to data. When a program needs a page, it is available in the main memory as the OS copies a certain number of pages from your storage device to main memory. Paging allows the physical address space of a process to be noncontiguous. H. 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 thrashing by evaluating the level of CPU utilization as compared to the level of multiprogramming. It can be eliminated by reducing the level of multiprogramming I.A kernel is a central component of an operating system. It acts as an interface between the user applications and the hardware. The sole aim of the kernel is to manage the communication between the software (user level applications) and the hardware (CPU, disk memory etcJ.Swap-space management is essential just because of two reasons. First and foremost this kind of system needsmore memory in comparison with physical availability. It swaps out less used pages while giving memory to the othercurrent application. It requires the memory very currently. The second reason is in a large number of the pages thatare used through an application. At the time of its start up process a phase can be used for initializing and then to use.This kind of system can swap such pages with free memory for every application for the disk cache
  2. 2. 1.what is semaphore and its uses? Ans. A semaphore is hardware or a software tag variable whose value indicates the status of a common resource. Its purpose is to lock the resource being used. A process which needs the resource will check the semaphore for determining the status of the resource followed by the decision for proceeding. In multitasking operating systems, the activities are synchronized by using the semaphore techniques. 2.what is thread why is it used?1. Ans. A thread is a single sequence stream within in a process. Because threads have some of the properties of processes, they are sometimes called lightweight processes. In a process, threads allow multiple executions of streams. In many respect, threads are popular way to improve application through parallelism. The CPU switches rapidly back and forth among the threads giving illusion that the threads are running in parallel. Like a traditional process i.e., process with one thread, a thread can be in any of several states (Running, Blocked, Ready or Terminated). Each thread has its own stack. Since thread will generally call different procedures and thus a different execution history. This is why thread needs its own stack. An operating system that has thread facility, the basic unit of CPU utilization is a thread. A thread has or consists of a program counter (PC), a register set, and a stack space. Threads are not independent of one other like processes as a result threads shares with other threads their code section, data section, OS resources also known as task, such as open files and signals.2. A process with multiple threads make a great server for example printer server.3. Because threads can share common data, they do not need to use interprocess communication. 4.Because of the very nature, threads can take advantage of multiprocessors.4.5. 3.diff.bet.paging and segmentation?Ans.Paging – Computer memory is divided into small partitions that are all the same size and referredto as, page frames. Then when a process is loaded it gets divided into pages which are the same size asthose previous frames. The process pages are then loaded into the frames.Segmentation – Computer memory is allocated in various sizes (segments) depending on the need foraddress space by the process. These segments may be individually protected or shared betweenprocesses. Commonly you will see what are called “Segmentation Faults” in programs, this is becausethe data that’s is about to be read or written is outside the permitted address space of that process.So now we can distinguish the differences and look at a comparison between the two:Paging:Transparent to programmer (system allocates memory)No separate protectionNo separate compilingNo shared codeSegmentation:Involves programmer (allocates memory to specific function inside code)Separate compilingSeparate protectionShare code 4.diff. bet.external and internal fragramatation? External Fragmentation: External Fragmentation happens when a dynamic memory allocation algorithm allocates some memory and a small piece is left over that cannot be effectively used. If too much external fragmentation occurs, the amount of usable memory is drastically reduced. Total memory space exists to satisfy a request, but it is not contiguous. Internal Fragmentation: Internal fragmentation is the space wasted inside of allocated memory blocks because of restriction on the allowed sizes of allocated blocks. Allocated memory may be slightly larger than requested memory; this size difference is memory internal to a partition, but not being used
  3. 3. 5.diff.bet. logical and physical file sysrem? Physical file (PF) contains the data and have only one record format. Logical file (LF) is a view of the physical file which does not contain any data may be based on one physical file or more then one physical file. Logical file can have more then one record format. Logical can be non join or join logical file. Performance becomes better if you use the logical file in the program.6 . A program is a set of instructions that are to perform a designated task, where as the process is an operation whichtakes the given instructions and perform the manipulations as per the code, called ‘execution of instructions’. A processis entirely dependent of a ‘program’.- A process is a module that executes modules concurrently. They are separate loadable modules. Where as theprogram perform the tasks directly relating to an operation of a user like word processing, executing presentationsoftware etc. 7.belady’s anomaly?Ans. It is also called FIFO anomaly. Usually, on increasingthenumber of frames allocated to a process virtual memory,the process execution is faster, because fewer page faultsoccur. Sometimes, the reverse happens, i.e., the executiontime increases even when more frames are allocated to theprocess. This is Beladys Anomaly. This is true forcertainpage reference patterns 8.semaphore? Ans.Semaphores are devices used to help with synchronization. If multiple processes share a common resource, they need a way to be able to use that resource without disrupting each other. You want each process to be able to read from and write to that resource uninterrupted. A semaphore will either allow or disallow access to the resource, depending on how it is set up. One example setup would be a semaphore which allowed any number of processes to read from the resource, but only one could ever be in the process of writing to that resource at a time 9.thrasing? Ans.When referring to a computer, thrashing or disk thrashing is a term used to describe when thehard drive is being overworked by moving information between the system memory and virtualmemory excessively. Thrashing is often caused when the system does not have enough memory,the system swap file is not properly configured, or too much is running on the computer and it haslow system resources.When thrashing occurs, a user will notice the computer hard drive always working and a decreasein system performance. Thrashing is bad on a hard drive because of the amount of work the harddrive has to do and if is left unfixed will likely cause an early failure of the hard drive.To resolve hard drive thrashing, a user can do any of the below. 1. Increase the amount of RAM in the computer. 2. Decrease the amount of programs being run on the computer. 3. Adjust the size of the swap file.