* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Hold and wait
Survey
Document related concepts
Transcript
What is multiprocessor system? Write down the advantages of multiprocessor system.? Multiprocessor systems also known as parallel systems, tightlycoupled systems are growing in importance. Such systems have two or more processors in close communication. Multiprocessor system have three advantage. 1. Increased throughput – by increasing the number of processors, we expect to get more work done in less time. 2. Economy of scale – Multiprocessor systems can cost less that equivalent multiple single-processor system, because they can share peripherals, mass storage, and power supplies. 3. Increased reliability – if functions can be distributed properly among several processors, then the failure of one processor will not halt the system, only slow it down. Such system is called graceful degradation or fault tolerance. What is the difference between I/O bound and CPU bound process.? I/O-bound process is one that spends more of its time doing I/O than it spends doing computations. CPU-bound process in contrast, generates I/O request infrequently, using more of its time doing computations. It is important that the long-term scheduler select a good process mix of I/O bound and CPU bound processes. If all processes are I/O bound, the ready queue will almost always be empty, and the shortterm scheduler will have little to do. If all processes are CPU bound, the I/O waiting queue will almost always be empty, devices will go unused, and again the system will be unbalanced. The system with the best performance will thus have a combination of CPU bound and I/O bound processes. What is Process? Write down the states of a process.? Process is a program in execution; process execution must progress in sequential fashion The state of process : new: The process is being created running: Instructions are being executed waiting: The process is waiting for some event to occur ready: The process is waiting to be assigned to a processor terminated: The process has finished execution Describe the differences between symmetric and asymmetric multiprocessing.? Multiprocessors systems in use today are of two types. Asymmetric multiprocessing – each processor is assigned a specific task. A master processor controls the system, the other processors either look to the master for instruction or have predefined tasks. Symmetric multiprocessing – each processor performs all tasks within the operating system. SMP means that all processors are peers, no master-slave relationship exists between processors. What is DMA? Device controller transfers blocks of data from buffer storage directly to main memory without CPU intervention List the main services provided by the operating system.? Program execution . I/O operations. File-system manipulation. Communication. Error detection. What do you mean by the dispatcher? The dispatcher is the module that gives control of the CPU to the process selected by the short-term scheduler. This function involves the following switching context, switching to user mode and jumping to the proper location in the user program to restart that program. The time it takes for the dispatcher to stop one process and start another running is known as the dispatch latency. Why do some systems store the operating system in firmware, and others on disk? For certain devices, such as handheld PDAs and cellular telephones, a disk with a file system may be not be available for the device. In this situation, the operating system must be stored in firmware What is bootstrap program? How could a system be designed to allow a choice of operating systems to boot from? The procedure of starting a computer by loading the kernel is known as booting the system. On most computer system, a small piece of code known as the bootstrap program, or bootstrap loader, locates the kernel, loads it into main memory, and starts it execution. Consider a system that would like to run both Windows XP and three different distributions of Linux (e.g., RedHat, Debian, and Mandrake). Each operating system will be stored on disk. During system boot-up, a special program (which we will call the boot manager) will determine which operating system to boot into. This means that rather initially booting to an operating system, the boot manager will first run during system startup. It is this boot manager that is responsible for determining which system to boot into. Typically boot managers must be stored at certain locations of the hard disk to be recognized during system startup. Boot managers often provide the user with a selection of systems to boot into; boot managers are also typically designed to boot into a default operating system if no choice is selected by the user. When a process creates a new process using the fork() operation, which of the state among Stack, Heap and Shared memory segments is shared between the parent process and the child process? Only the shared memory segments are shared between the parent process and the newly forked child process. Copies of the stack and the heap are made for the newly created process. What is the purpose of the command interpreter? Why is it usually separate from the kernel? It reads commands from the user or from a file of commands and executes them, usually by turning them into one or more system calls. It is usually not part of the kernel since the command interpreter is subject to changes. What do you mean by Producer-Consumer Problem? Suggest a solution. A producer process continually adds new items to the buffer, each new item being placed at the position referenced by the cursor in. However, if the buffer is full the producer process must be blocked when it attempts to add an item. The blocked process should be allowed to complete its operation when the space becomes available. after adding an item the producer increments cursor in. A consumer process continually removes items from the buffer. after removing an item the cursor increments the cursor out. If the buffer is empty a process which attempts to take something out of it is blocked. When a fresh item becomes available, the consumer should be allowed to resume operation. One solution to the producer-consumer problem uses shared memory. What system calls have to be executed by a command interpreter or shell in order to start a new process? In Unix systems, a fork system call followed by an exec system call need to be performed to start a new process. The fork call clones the currently executing process, while the exec call overlays a new process based on a different executable over the calling process. What the differences are between commit operations and abort operation? A commit operation signifies that the transaction has terminated its execution successfully, whereas an abort operation signifies that the transaction has ended its normal execution due to some logical error or a system failure. What is aging? Aging: gradual increase of priority with age of job, to prevent starvation is called aging. A deadlock situation can arise if the following four conditions hold simultaneously in a system. What are those four conditions? Mutual exclusion: only one process at a time can use a resource. Hold and wait: a process holding at least one resource is waiting to acquire additional resources held by other processes. No preemption: a resource can be released only voluntarily by the process holding it, after that process has completed its task. Circular wait: there exists a set {P0, P1, …, P0} of waiting processes such that P0 is waiting for a resource that is held by P1, P1is waiting for a resource that is held by P2, …, Pn–1is waiting for a resource that is held by Pn, and P0is waiting for a resource that is held by P0 What is the purpose of system calls? Allow user-level processes to request services of the operating system. What is CPU burst and I/O burst? CPU burst is time interval when a process uses CPU only. I/O burst is time interval when a process uses I/O devices only. What do you mean by the RPC and RMI.? A remote procedure call (RPC) is a call to procedure located on machine that is different (remote) from the machine from which the call was made. An PRC system consists of a communication protocol, which typically sits on top of a transport-level service such as the ARPA. Remote method invocation (RMI) is a java mechanism similar to PRCs. RMI allows a java program on one machine to invoke a method on remote object. Explain the differences, in terms of cost, among the three storage types volatile, nonvolatile, and stable.? Volatile storage refers to main and cache memory and is very fast. However, volatile storage cannot survive system crashes or powering down the system. Disks and tapes are example of nonvolatile storage. Recently, USB devices using erasable program read-only memory (EPROM) have appeared providing nonvolatile storage. Stable storage refers to storage that technically can never be lost as there are redundant backup copies of the data (usually on disk). Consider a logical address space of eight pages of 1024 words each, mapped onto a physical memory of 32 frames. a. How many bits are there in the logical address? Logical address: 13 bits b. How many bits are there in the physical address? Physical address: 15 bits Under what circumstances do page faults occur? A page fault occurs when an access to a page that has not been brought into main memory takes place. What system calls have to be executed by a command interpreter or shell in order to start a new process? In Unix systems, a fork system call followed by an exec system call need to be performed to start a new process. The fork call clones the currently executing process, while the exec call overlays a based on a different executable over the calling process What are interpreters? It run source program directly. They do not produce object program (in machine language). Interpreters are popular in program development environment. Interpreters are slower than compiled codes as they translate every instruction every time the program is executed. دعواتكم بالنجاح