Operating system concepts 10th instructors edition pdf free download






















They communicate with each other through various communication lines, such as a high-speed bus or telephone line. Why is such a system not really wasteful?

Answer: Single-user systems should maximize use of the system for the user. Answer: When there are few other users, the task is large, and the hardware is fast, time- sharing makes sense. The problem can be solved faster than on a personal computer. Another case is when there are lots of other users needing resources at the same time. What are three advantages and one disadvantage of multiprocessor systems?

Multiprocessors can save money, by not duplicating power sup- plies, housings, and peripherals. They can execute programs more quickly, and can have increased reliability. They are also more complex in both hardware and software than uniprocessor systems. Answer: Distributed systems can provide resource sharing, computation speedup, in- creased reliability, and the ability to communicate with remote sites.

Answer: The main difficulty is keeping the operating system within the fixed time con- straints of a real-time system. If the system does not complete a task in a certain time, it could cause a breakdown of the entire system it is running. Review Questions 5 Review Questions 1. Answer: True 1. Answer: To execute user programs and solve user problems. Answer: Their primary goal is convenience of the user; the secondary goal is efficient operation and allocation of all resources.

Answer: The programmer himself operated the computer by flipping switches. He had to sign up for free time. Answer: The user had to guess the amount of time needed to complete his job, fairly accurately, to avoid wasting machine time, and still allow enough time to complete the job.

Answer: Libraries of common functions, device drivers, assembly language, compilers. Answer: Creation of software libraries shared by all users, especially for input—output subroutines. List them. Load loader tape. Load compiler tape. Load source program. Execute compiler with output going to tape. Rewind each tape. If output of compiler was assembly language, load assembler.

Rewind tapes. Execute assembler with object output to tape. Load the object program from tape. Execute the program with output going to paper tape. Run paper tape output through teletype to get printed copy. Note: On some systems, the loader had to be reloaded after many of the above steps.

Answer: A professional computer operator or machine groups jobs by characteristics and runs groups of similar jobs together, efficiently. Answer: Less setup time, and thus less idle time of the computer. Answer: System proceeds from one job to the next without human intervention. Answer: To avoid the delays inherent in having the operator changing jobs, and doing things manually. Answer: To perform orderly and efficient automatic job sequencing, regardless of errors that might arise.

Answer: To let monitor know what resources are needed for current job, such as compiler, linker, data, etc. Answer: Control card interpreter, device drivers, loader. Answer: humans 0. Cards copied to magnetic tape, which was then mounted on computer; output of computer was dumped to magnetic tape, which was then mounted for output to a printer. Satellite computers read cards onto magnetic tape, which could transfer information to the main computer without remounting.

Data is read from cards onto magnetic tapes, which are in turn mounted manually on the main system. Printer output from the main system is saved on magnetic tape, which is then mounted manually on a tape reader attached to a line printer. Data is read from cards onto magnetic tapes.

But the tapes are not removed from their drives. Instead, a small computer reads them and sends the information to the main system. Similarly with output. Review Questions 7 Note: Main difference here is that data was manually exchanged between main computer and off-line system. Thus, an old model card reader can be replaced with a new model; the old device driver programs are replaced by new ones; user programs need not be changed though they may need to be relinked.

Note: Many students respond that it is the ability to use different devices. This is false. Main computer no longer constrained by speed of card reader. Answer: Off-line systems use magnetic tape.

The system cannot read data from one end of the tape while the card reader writes data on the other end; it takes about 5 minutes to rewind the tape fully. With disks, it takes only milliseconds to alternate from the portion of the disk used for input and the portion for output.

It can also be used for input, but is generally used for output. Its main use is to prevent two users from alternately printing lines to the line printer on the same page, getting their output completely mixed together. Answer: In multiprogramming, several programs are in memory concurrently; the sys- tem switches among the programs for efficient processing, and minimal idle time.

Answer: They are essentially devoid of interaction between user and program. They must anticipate prob- lems or else debugging could be a mess with machine-language dumps. There may also be long turnaround times. Answer: Using scheduling and multiprogramming to provide an economical interactive system of two or more users. Answer: Interaction with computer while program is running, short response times usu- ally less than 10 seconds.

Answer: Each user is given a brief time-slice for her job, in round-robin fashion. Her job continues until the time-slice ends. Then her job stops, until it is her turn again. It was very flexible, and oriented toward programmers. It was designed for program development, using a device-independent file system. Answer: A system with two or more CPUs. Answer: A master computer controls the actions of various slave computers. Answer: Remote Job Entry. Answer: A system used to control a dedicated application.

Answer: In time-sharing, fast response is desirable, but not required. In real-time systems, processing must be completed within certain time constraints appropriate for the system. Control of a nuclear reactor, to prevent chain reaction. Control of a space ship, to avoid collision with meteors. Control of manufacturing equipment, such as lathes, canners, etc.

Collecting data on cosmic rays in physics research. It may be a good idea to re- view the basic concepts of machine organization and assembly language programming. Since the operating system is the interface be- tween the hardware and user programs, a good understanding of operating systems requires an understanding of both hardware and programs. Answers to Exercises 2. The idea is simple. After a read operation completes and the job is about to start operating on the data, the input device is instructed to begin the next read immediately.

The CPU and input device are then both busy. With luck, by the time that the job is ready for the next data item, the input device will have finished reading that data item. The CPU can then begin processing the newly read data, while the input device starts to read the following data.

A similar idea can be used for output. In this case, the job creates data that are put into a buffer until an output device can accept them. Compare the prefetching scheme with the spooling scheme, where the CPU overlaps the input of one job with the computation and output of other jobs.

Answer: Prefetching is a user-based activity, while spooling is a system-based activity. Answer: By establishing a set of privileged instructions that can be executed only when in the monitor mode, the operating system is assured of controlling the entire system at all times. What is the use of each function?

Answer: An interrupt is a hardware-generated change-of-flow within the system. A trap is a software-generated interrupt. A trap can be used to call operating system routines or to catch arithmetic errors. Answer: DMA is useful for transferring large quantities of data between memory and devices. It eliminates the need for the CPU to be involved in the transfer, allowing the transfer to complete more quickly and the CPU to perform other tasks concurrently.

Set value of timer. Read the clock. Clear memory. Turn off interrupts. Switch from user to monitor mode. Answer: The following instructions should be privileged: a. Con- sider whether it is possible to construct a secure operating system for these computers. Give arguments both that it is and that it is not possible. Answer: An operating system for a machine of this type would need to remain in control or monitor mode at all times. This could be accomplished by two methods: a.

The software interpreter would provide, in software, what the hardware does not provide. Require that all programs be written in high-level languages so that all object code is compiler-produced. The compiler would generate either in-line or by function calls the protection checks that the hardware is missing. Describe two difficulties that you think could arise with such a scheme. Answer: The data required by the operating system passwords, access controls, account- ing information, and so on would have to be stored in or passed through unprotected memory and thus be accessible to unauthorized users.

Provision of this protection is the reason behind dual-mode operation, memory protection, and the timer. To allow maximum flexibility, however, we would also like to place minimal constraints on the user. The following is a list of operations that are normally protected.

What is the minimal set of instructions that must be protected? Change to user mode. Answers to Exercises 11 b. Change to monitor mode. Read from monitor memory. Write into monitor memory.

Fetch an instruction from monitor memory. Turn on timer interrupt. Turn off timer interrupt. Answer: The minimal set of instructions that must be protected are: a. What problems do they solve? What problems do they cause? If a cache can be made as large as the device for which it is caching for instance, a cache as large as a disk , why not make it that large and eliminate the device?

Answer: Caches are useful when two or more components need to exchange data, and the components perform transfers at differing speeds. Cahces solve the transfer problem by providing a buffer of intermediate speed between the components.

If the fast device finds the data it needs in the cache, it need not wait for the slower device. The data in the cache must be kept consistent with the data in the components. If a component has a data value change, and the datum is also in the cache, the cache must also be updated.

This is especially a problem on multiprocessor systems where more than one process may be accessing a datum. A component may be eliminated by an equal-sized cache, but only if: a the cache and the component have equivalent state-saving capacity that is, if the component retains its data when electricity is removed, the cache must retain data as well , and b the cache is affordable, because faster storage tends to be more expensive.

Name three hardware aids for writing an operating system, and describe how they could be used together to protect the operating system. Privileged instructions c.

Timer d. Answer: A list giving the starting addresses of each interrupt service routine. Answer: For slow devices, each character transferred causes an interrupt.

For fast devices, each block of characters transferred causes an interrupt. Programming errors, such as illegal instruction, addressing fault. Halting the computer. Masking the interrupt so that none can occur.

Changing mode from user to system; or else user can control system. Using memory outside user area; invasion of privacy. Modifying interrupt vectors in monitor; could crash system. Accessing monitor memory; invasion of privacy. Answer: Disks are flat circular-shaped platters with magnetic material on both surfaces.

They have concentric tracks where information is stored. Each track is divided up into sectors. Review Questions 13 b. Multiplatter disks: several disks in one cover, all driven by the same motor. Removable cartridge: allows disks to be swapped. Hard disks: uses rigid aluminum platters covered with magnetic material.

Floppy disks: uses flexible material like in Time-Life sample records, encased in card- board. RAM disks: not really a disk; semiconductor memory set up to emulate a disk. Answer: A separate board installed in the computer chassis to control and interact with each disk drive attached to it. Answer: Effectively, a single disk with only one cylinder. Alter an interrupt vector entry to point to his own program area. This would give him control of the system while system is in monitor mode.

Alter part of the interrupt service routine to jump to his program, again giving him privileged access to all instructions. Answer: Introduce base and limit registers that hold the smallest legal physical memory address, and the size of the range, respectively. If another job starts up, these registers are reset for the new job. Answer: A timer hardware is added to system. Each user is allowed some predeter- mined time of execution not all users are given same amount.

If user exceeds these time limits, the program is aborted via an interrupt. Modifying timer d. Halt e. Turning interrupt enable off f. The treatment is somewhat vague since more detail requires picking a specific system to discuss. This chapter is best supplemented with exactly this detail for the specific system the students have at hand.

They should study the control card or command semantics and syntax; ideally they should study the system calls and write some pro- grams making system calls. Answers to Exercises 3. Why is it usually separate from the kernel? Answer: 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.

Explain how each provides conve- nience to the users. Explain also in which cases it would be impossible for user-level pro- grams to provide these services. The operating system loads the contents or sections of a file into memory and begins its execution. A user-level program could not be trusted to properly allocate CPU time.

Disks, tapes, serial lines, and other devices must be communicated with at a very low level. The user need only specify the device and the operation to perform on it, while the system converts that request into device or controller specific commands.

User-level programs cannot be trusted to only access devices they should have access to, and to only access them when they are otherwise unused. There are many details in file creation, deletion, allocation, and naming that users should not have to perform. Blocks of disk space are used by files and must be tracked. Deleting a file requires removing the name file information and freeing the allocated blocks. Protections must also be checked to assure proper file access.

User programs could ensure neither adherence to protection methods nor could they be trusted to allocate only free blocks and deallocate blocks on file deletion.

Message passing between systems requires messages be turned into packets of information, sent to the network controller, transmitted across a com- munications medium, and reassembled by the destination system. Packet ordering and data correction must take place. Again, user programs might not coordinate ac- cess to the network device, or they may receive packets destined for other processes.

Error detection occurs at both the hardware and software levels. At the hardware level, all data transfers must be inspected to ensure that data have not been corrupted in transit. All data on media must be checked to be sure they have not changed since they were written to the media. At the software level, media must be checked for data consistency; for instance, do the number of allocated and unallocated blocks of storage match the total number on the device.

There, errors are frequently process-independent for instance, the corruption of data on a disk , so there must be a global program the operating system that handles all types of errors. Also, by having errors processed by the operating system, processes need not contain code to catch and correct all the errors possible on a system. Answer: System calls allow user-level processes to request services of the operating sys- tem.

Answer: System programs can be thought of as bundles of useful system calls. They provide basic functionality to users so users do not need to write their own programs to solve common problems. Answer: As in all cases of modular design, designing an operating system in a modular way has several advantages. The system is easier to debug and modify because changes affect only limited sections of the system rather than touching all sections of the operating system.

Information is kept only where it is needed and is accessible only within a defined and restricted area, so any bugs affecting that data must be limited to a specific module or layer. What is the main advantage for a user? Answer: The system is easy to debug, and security problems are easy to solve.

Virtual machines also provide a good platform for operating system research since many different operating systems may run on one physical system. Answer: Mechanism and policy must be separate to ensure that systems are easy to modify. No two system installations are the same, so each installation may want to tune the operating system to suit its needs.

With mechanism and policy separate, the policy may be changed at will while the mechanism stays unchanged. This arrangement provides a more flexible system. To optimize system-call performance, the kernel assembles rou- tines within kernel space to minimize the path the system call must take through the kernel. This approach is the antithesis of the layered approach, in which the path through the kernel is extended so that building the operating system is made easier.

Discuss the pros and cons of this approach to kernel design and to system-performance optimization. Answer: Synthesis is impressive due to the performance it achieves through on-the-fly compilation.

Unfortunately, it is difficult to debug problems within the kernel due to the fluidity of the code. Also, such compilation is system specific, making Synthesis difficult to port a new compiler must be written for each architecture. Tell what each does. Communications allows processes to communicate with each other Error detection CPU, hardware, instructions, device errors 3.

Answer: Systems-programming languages allow system calls directly; they have provi- sions for accessing hardware components, such as registers. Answer: Get, put, signal finish , open, close. In more detail: a.

Put prompt message b. Get file names c. Open files d. On error condition e. Put error message f. Write or Put into file created g. On end-of-file h. Put error message i. Read or Get file j.

Put or Write file k. Put all-done message l. Close both files m. Delete source file n. Pass parameters in registers b. Registers pass starting addresses of blocks of parameters c. Parameters can be placed, or pushed, onto the stack by the program, and popped off the stack by the operating system. Answer: Shows amount of time executed by each instruction or block of instructions. By what other names is it known?

Answer: Program that interprets the commands you type in at terminal, or enter through a batch file; gets and executes next user-specified command. Names: control card inter- preter, command line interpreter, console command processor, shell. Whole procedures in memory. Procedure calls programs into memory from disk.

Those are at the very heart of modern operating systems. A process is is a program in execution and is the unit of work in a modern time-sharing system. Such a system consists of a collection of processes: Operating-system processes executing system code, and user processes executing user code. By switching the CPU between processes, the operating system can make the computer more productive. We also discuss the notion of a thread light-weight process and interprocess communication IPC.

Answers to Exercises 4. Discuss the major complications that concurrent processing adds to an operating system. This method involves the preemption of processes that do not voluntarily give up the CPU by using a system call, for instance and the kernel being reentrant so more than one process may be executing kernel code concurrently. Any given process must be limited in the amount of memory it can use and the operations it can perform on devices like disks.

A swapping scheme is implemented to remove partially run programs from memory and reinstate them later to continue where they left off. The primary difference is in the frequency of their execution. The short-term must select a new process quite often.

Long-term is used much less often since it handles placing jobs in the system, and may wait a while for a job to finish before it admits another one. Describe the actions of a context switch if the new context is already loaded into one of the register sets.

What else must happen if the new context is in memory rather than a register set, and all the register sets are in use?

Answer: The CPU current-register-set pointer is changed to point to the set containing the new context, which takes very little time. If the context is in memory, one of the contexts in a register set must be chosen and moved to memory, and the new context must be loaded from memory into the set.

This process takes a little more time than on systems with one set of registers, depending on how a replacement victim is selected. What major disadvantage do they have? Suggest one application that would benefit from the use of threads, and one that would not. Answer: Threads are very inexpensive to create and destroy, and they use very little re- sources while they exist.

For instance, one thread could destroy data that all the other threads rely on, while the same could not happen between processes unless they used a system feature to allow them to share data. Any program that may do more than one task at once could benefit from multitasking. For instance, a program that reads input, processes it, and out- puts it could have three threads, one for each task.

How do they differ from those used when a process is created? Answer: A context must be created, including a register set storage location for storage during context switching, and a local stack to record the procedure call arguments, return values, and return addresses, and thread-local storage.

A process creation results in mem- ory being allocated for program instructions and data, as well as thread-like storage. Code may also be loaded into the allocated memory. Among threads. Among processes. Answers to Exercises 23 b. The same as a , plus the memory context must be stored and that of the next process must be loaded. Answer: User-level threads have no kernel support, so they are very inexpensive to create, destroy, and switch among.

However, if one blocks, the whole process blocks. Kernel-supported threads are more expensive because system calls are needed to create and destroy them and the kernel must schedule them. They are more powerful because they are independently scheduled and block individually. Modify the algorithm to allow all the buffers to be utilized fully. Answer: The shared data structures are as in the solution presented in Section 4. The producer process has a local variable nextp in which the new item to be produced is stored: repeat Suppose a process P wants to wait for two messages, one from mailbox A and one from mailbox B.

What sequence of send and receive should it execute? What sequence of send and receive should P execute if P wants to wait for one mes- sage either from mailbox A or from mailbox B or from both? A receive operation makes a process wait until the mailbox is nonempty. Either de- vise a scheme that allows a process to wait until a mailbox is empty, or explain why such a scheme cannot exist. Answer: No Answer 4. Give examples of problems that could be solved with each type of scheme. Explain why each problem is best solved by the method that you specify.

Answer: A program in execution. See Figure 4. Answer: Process control block. It contains various data structures. Answer: FIFO queues, trees, linked-lists. Answer: One for each device. Answer: Determines which of the current jobs should run in the next CPU burst. Which can be slow? Answer: Fast: short-term. Slow: long-term. Answer: False. It selects a mix of jobs for efficient machine utilization. What kind of scheduling does it involve? It uses medium- term scheduling, such as round-robin for the foreground.

Background can use a different scheduling technique. Answer: Copying a process out of memory onto a fast disk or drum, to allow space for other active processes; it will be copied back into memory when space is ample. Answer: The time needed to switch from one job to another. Parent continues executing. Parent stops executing until children are done. Parent and children share all variables. Parents and children share no common resources. Answer: Using mod arithmetic, like in clocks.

Note: Several students have said by using linked lists; not so, authors replace the circular array with a linked list. Answer: If the input-pointer is one less than the output-pointer in mod arithmetic.

Answer: If the input-pointer equals output-pointer. By switching the CPU among processes, the operating system can make the computer more productive. In this chap- ter, we introduce the basic scheduling concepts and discuss in great length CPU scheduling.

This is their first exposure to the idea of resource allocation and scheduling, so it is important that they understand how it is done. Gantt charts, simulations, and play acting are valuable ways to get the ideas across.

Show how the ideas are used in other situations like waiting in line at a post office, a waiter time sharing between customers, even classes being an interleaved round-robin scheduling of professors. A simple project is to write several different CPU schedulers and compare their performance by simulation. The instructor can make the trace tape up in advance to provide the same data for all students. The first line of a job was the word JOB and the job number. The job was terminated by an END line with the job number again.

Round-Robin is more difficult, since it requires putting unfinished requests back in the ready queue. The paper by Coffman and Kleinrock [a] is a good discussion of CPU scheduling for supplemental reading.

Answers to Exercises 5. Given n processes to be scheduled on one processor, how many possible different schedules are there? As we wrote this Ninth Edition of Operating System Concepts, we were guided by the recent growth in three fundamental areas that affect operating systems. Operating System Concepts Abraham Silberschatz, Greg - The tenth edition of Operating System Concepts has been revised to keep it fresh and up-to-date with contemporary examples of how operating systems function, as well as enhanced interactive elements to improve learning and the student's experience with the material.

Label: Livre. Posting Komentar Catatan: Hanya anggota dari blog ini yang dapat mengirim komentar. Search This Blog. Popular Posts. Zhi Gang. Warshawski Novel V. Voir la critique Photography Essentials Waiting Fo Voir la critique Complexity and the Art of Public The Sex P Tolkien: Author of the Labels Abraham M. Brusha Joe Bryant Anthony J. Green Celia Greenberg Edward S.

Haney Eric L. Zvelebil Marketa J. Diberdayakan oleh Blogger. Any use that differs from the above, and any for profit sale of the manual in any form requires the consent of the copyright owners; contact Avi Silberschatz avi yale. Describe the two general roles of an operating system, and elaborate why these roles are important.

It is important in order to reduce the burden File Size: KB. Students are encouraged to solve the practice exercises on their own, and later use the solutions to check.

Wiley India Pvt. Download Free Operating System Concepts 9ed Operating System Concepts 9ed Recognizing the habit ways to get this ebook operating system concepts 9ed is additionally useful. The text includes content to bridge the gap between concepts and actual implementations. Another defining moment in the evolution of operating systems.

Operating Systems: Basic Concepts and History 1 Introduction to Operating Systems An operating system is the interface between the user and the architecture. Comprehensive Hands-on Projects give students step-by-step instructions for performing various Operating System tasks -- equipping them with practical, firsthand experience with today's most popular systems.

Operating System by Galvin Operating System Concepts continues to provide a solid theoretical foundation for understanding operating systems. Operating Systems — H.

Galvin and Greg Gagne. Published by Wiley. Operating systems are an essential part of any computer system. Similarly, a course on operating systems is an essential part of any computer science education. This field is undergoing rapid change, as computers are now prevalent in virtually every arena of day-to-day life— from embedded devices in auto mobiles through the most sophisticated planning tools for governments and multinational firms. Yet the fundamental concepts remain fairly clear, and it is on these that we base this book.

I should have had the two of you shave and cut your hair before coming in here.



0コメント

  • 1000 / 1000