Uploaded on 


PETER BAER GALVIN. Pluribus Networks it is on these that we base this book. We wrote this book as a text for an introductory course in operating systems. Peter Baer Galvin is the chief technologist for Corporate Technologies We wrote this book as a text for an introductory course in operating systems at the junior. Operating System Concepts [Abraham Silberschatz, Peter B. Galvin, Greg Gagne ] on He is a coauthor of the textbook Database System Concepts. He has.

Language:English, Spanish, Arabic
Genre:Personal Growth
Published (Last):06.04.2016
Distribution:Free* [*Register to download]
Uploaded by: VERONIKA

67536 downloads 174899 Views 16.87MB ePub Size Report

Os Book Galvin

Free PDF of Operating System by Galvin - Free download as PDF File .pdf), no authorized, free downloads of any of the Operating Systems Concepts books. In this book, we do not concentrate on any particular operating system or hardware. . Abraham Silberschatz, , Murray Hill, NJ ~ Peter Baer Galvin, With substantial revisions and organizational changes, Silberschatz, Galvin, and Gagne's Operating System Concepts, Eighth Edition remains as current and.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy. See our Privacy Policy and User Agreement for details. Published on Mar 18, SlideShare Explore Search You. Submit Search. Successfully reported this slideshow. We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime. Operating system Galvin. Upcoming SlideShare.

The hardware topics required for an understanding of operating systems are covered in Chapter 1. In that chapter, we also include an overview of the fundamental data structures that are prevalent in most operating systems. For code examples, we use predominantly C, with some Java, but the reader can still understand the algorithms without a thorough knowledge of these languages. Concepts are presented using intuitive descriptions.

Important theoretical results are covered, but formal proofs are largely omitted. The fundamental concepts and algorithms covered in the book are often based on those used in both commercial and open-source operating systems. Our aim is to present these concepts and algorithms in a general setting that is not tied to one particular operating system.

However, we present a large number of examples that pertain to the most popular and the most innovative operating systems, including Linux, Microsoft Windows, Apple Mac OS X, and Solaris.

We also include examples of both Android and iOS, currently the two dominant mobile operating systems. Consideration was also given to the feedback provided by the reviewers of the text, along with the many comments and suggestions we received from readers of our previous editions and from our current and former students.

Content of This Book The text is organized in eight major parts: Chapters 1 and 2 explain what operating systems are, what they do, and how they are designed and constructed.

These chapters discuss what the common features of an operating system are and what an operating system does for the user. We include coverage of both traditional PC and server operating systems, as well as operating systems for mobile devices.

The presentation is motivational and explanatory in nature. We have avoided a discussion of how things are done internally in these chapters. Therefore, they are suitable for individual readers or for students in lower-level classes who want to learn what an operating system is without getting into the details of the internal algorithms. Chapters 3 through 7 describe the process concept and concurrency as the heart of modern operating systems.

A process is the unit of work in a system. Such a system consists of a collection of concurrently executing processes, some of which are operating-system processes those that execute system code and the rest of which are user processes those that execute user code.

These chapters cover methods for process scheduling, interprocess communication, process synchronization, and deadlock handling. Also included is a discussion of threads, as well as an examination of issues related to multicore systems and parallel programming. Chapters 8 and 9 deal with the management of main memory during the execution of a process.

To improve both the utilization of the CPU and the speed of its response to its users, the computer must keep several processesinmemory.

Because they represent a 7. Chapters 14 and 15 discuss the mechanisms necessary for the protection and security of computer systems. Protection is a mechanism for controlling the access of programs, processes, or users to computer-system resources. This mechanism must provide a means of specifying the controls to be imposed, as well as a means of enforcement.

Security protects the integrity of the information stored in the system both data and code , as well as the physical resources of the system, from unauthorized access, malicious destruction or alteration, and accidental introduction of inconsistency. Chapters 16 and 17 discuss virtual machines and distributed systems. Chapter 16 is a new chapter that provides an overview of virtual machines and their relationship to contemporary operating systems. Included is an overview of the hardware and software techniques that make virtualization possible.

Chapter 17 condenses and updates the three chapters on distributed computing from the previous edition. This change is meant to make it easier for instructors to cover the material in the limited time available during a semester and for students to gain an understanding of the core ideas of distributed computing more quickly. Chapters 18 and 19 in the text, along with Appendices A and B which are available on http: Coverage of both Linux and Windows 7 are presented throughout this text; however, the case studies provide much more detail.

It is especially interesting to compare and contrast the design of these two very different systems. The Ninth Edition 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: Multicore systems 2.

Mobile computing 3. Virtualization To emphasize these topics, we have integrated relevant coverage throughout this new edition—and, in the case of virtualization, have written an entirely new chapter. Additionally, we have rewritten material in almost every chapter by bringing older material up to date and removing material that is no longer interesting or relevant. For example, we have eliminated the chapter on real-time systems and instead have integrated appropriate coverage of these systems throughout the text.

We have reordered the chapters on storage management and have moved up the presentation of process synchronization so that it appears before process scheduling. Most of these organizational changes are based on our experiences while teaching courses on operating systems. Below, we provide a brief outline of the major changes to the various chapters: Additionally, the coverage of computing environments now includes mobile systems and cloud computing.

We also have incorporated an overview of real-time systems. Coverage of real-time scheduling algorithms has also been integrated into this chapter. A new section discusses ARM architecture. The chapter also includes new coverage of Windows 7 security.

Programming Environments This book uses examples of many real-world operating systems to illustrate fundamental operating-system concepts. The text also provides several example programs written in C and Java.

These programs are intended to run in the following programming environments: These example programs were tested on Linux 2. Java is a widely used programming language with a rich API and built-in language support for thread creation and management. Java programs run on any operating system supporting a Java virtual machine or JVM. We illustrate various operating-system and networking concepts with Java programs tested using the Java 1.

The primary programming environment for Windows systems is the Windows API, which provides a comprehensive set of func- tions for managing processes, threads, memory, and peripheral devices. We supply several C programs illustrating the use of this API. Programs were tested on systems running Windows XP and Windows 7.

Free PDF of Operating System by Galvin | Portable Document Format | Operating System

Most programming examples are written in C, and we expect readers to be comfortable with this language. Readers familiar with both the C and Java languages should easily understand most programs provided in this text. In other situations, we may use just one of the APIs to demonstrate a concept.

Linux Virtual Machine To help students gain a better understanding of the Linux system, we provide a Linux virtual machine, including the Linux source code, that is available for download from the the website supporting this text http: This virtual machine also includes a gcc development environment with compilers and editors.

Most of the programming assignments in the book can be completed on this virtual machine, with the exception of assignments that require Java or the Windows API. We also provide three programming assignments that modify the Linux kernel through kernel modules: Adding a basic kernel module to the Linux kernel. Adding a kernel module that uses various kernel data structures.

Adding a kernel module that iterates over tasks in a running Linux system. Over time it is our intention to add additional kernel module assignments on the supporting website. Supporting Website When you visit the website supporting this text at http: As a general rule, we encourage instructors to progress sequentially through the chapters, as this strategy provides the most thorough study of operating systems.

However, by using the sample syllabi, an instructor can select a different ordering of chapters or subsections of chapters. In this edition, we have added over sixty new written exercises and over twenty new programming problems and projects. Most of the new program- ming assignments involve processes, threads, process synchronization, and memory management.

Some involve adding kernel modules to the Linux system which requires using either the Linux virtual machine that accompanies this text or another suitable Linux distribution.

Solutions to written exercises and programming assignments are available to instructors who have adopted this text for their operating-system class.

Operating System Concepts

Solutions to the practice exercises are available for download from the supporting website http: We also encourage you to read through the study guide, which was prepared by one of our students. Finally, for students who are unfamiliar with UNIX and Linux systems, we recommend that you download and install the Linux virtual machine that we include on the supporting website.

Not only will this provide you with a new computing experience, but the open-source nature of Linux will allow you to easily examine the inner details of this popular operating system.

We wish you the very best of luck in your study of operating systems. Contacting Us We have endeavored to eliminate typos, bugs, and the like from the text. But, as in new releases of software, bugs almost surely remain. We would be grateful if you would notify us of any errors or omissions in the book that are not on the current list of errata. We would be glad to receive suggestions on improvements to the book.

We also welcome any contributions to the book website that could be of E-mail should be addressed to os-book-authors cs. Schauble, Thomas P. Skinner, Yannis Smaragdakis, Jesse St. Wear, John Werth, James M. Westall, J. Weston, and Yang Xiang Robert Love updated both Chapter 18 and the Linux coverage throughout the text, as well as answering many of our Android-related questions. Jonathan Katz contributed to Chapter Richard West provided input into Chapter Salahuddin Khan updated Section Parts of Chapter 17 were derived from a paper by Levy and Silberschatz [].

Chapter 18 was derived from an unpublished manuscript by Stephen Tweedie. Some of the exercises and accompanying solutions were supplied by Arvind Krishnamurthy.

Andrew DeNicola prepared the student study guide that is available on our website. Some of the the slides were prepeared by Marilyn Turnamian.

Thomas Gagne prepared new artwork for this edition. Owen Galvin helped copy-edit Chapter She was assisted by Katherine Willis, who managed many details of the project smoothly.

The cover illustrator was Susan Cyr, and the cover designer was Madelyn Lesure. Beverly Peavler copy-edited the manuscript. Intel 32 and bit Architectures 8. ARM Architecture 8. Contents xix Chapter 9 Virtual Memory 9. Windows 7 Part One Overview An operating system acts as an intermediary between the user of a computer and the computer hardware. An operating system is software that manages the computer hard- ware. The hardware must provide appropriate mechanisms to ensure the correct operation of the computer system and to prevent user programs from interfering with the proper operation of the system.

Internally, operating systems vary greatly in their makeup, since they are organized along many different lines. The design of a new operating system is a major task. These goals form the basis for choices among various algorithms and strategies.

Because an operating system is large and complex, it must be created piece by piece. It also provides a basis for application programs and acts as an intermediary between the computer user and the computer hardware. An amazing aspect of operating systems is how they vary in accomplishing these tasks.

Mainframe operating systems are designed primarily to optimize utilization of hardware. Personal computer PC operating systems support complex games, business applications, and everything in between. Operating systems for mobile com- puters provide an environment in which a user can easily interface with the computer to execute programs.

Before we can explore the details of computer system operation, we need to know something about system structure. We also describe the basic computer architecture that makes it possible to write a functional operating system.

In this chapter, we provide a general overview of the major components of a contemporary computer system as well as the functions provided by the operating system. Additionally, we cover several other topics to help set the stage for the remainder of this text: A computer system can be divided roughly into four components: The operating system controls the hardware and coordinates its use among the various application programs for the various users.

We can also view a computer system as consisting of hardware, software, and data. The operating system provides the means for proper use of these resources in the operation of the computer system.

An operating system is similar to a government. Like a government, it performs no useful function by itself. It simply provides an environment within which other programs can do useful work. Most computer users sit in front of a PC, consisting of a monitor, keyboard, mouse, and system unit. Such a system is designed for one user The goal is to maximize the work or play that the user is performing.

In this case, the operating system is designed mostly for ease of use, with some attention paid to performance and none paid to resource utilization—how various hardware and software resources are shared. Performance is, of course, important to the user; but such systems are optimized for the single-user experience rather than the requirements of multiple users.

In other cases, a user sits at a terminal connected to a mainframe or a minicomputer. Other users are accessing the same computer through other terminals.

These users share resources and may exchange information. In still other cases, users sit at workstations connected to networks of other workstations and servers. Therefore, their operating system is designed to compromise between individual usability and resource utilization. Recently, many varieties of mobile computers, such as smartphones and tablets, have come into fashion. Most mobile computers are standalone units for individual users.

Quite often, they are connected to networks through cellular or other wireless technologies. Increasingly, these mobile devices are replacing desktop and laptop computers for people who are primarily interested in using computers for e-mail and web browsing. Some computers have little or no user view. For example, embedded computers in home devices and automobiles may have numeric keypads and may turn indicator lights on or off to show status, but they and their operating systems are designed primarily to run without user intervention.

In this context, we can view an operating system as a resource allocator. A computer system has many resources that may be required to solve a problem: The operating system acts as the manager of these resources. As we have seen, resource allocation is especially important where many users access the same mainframe or minicomputer.

An operating system is a control program. A control program manages the execution of user programs to prevent errors and improper use of the computer. That is the case, at least in part, because of the myriad designs and uses of computers. Computers are present within toasters, cars, ships, spacecraft, homes, and businesses.

They are the basis for game machines, music players, cable TV tuners, and industrial control systems. Although computers have a relatively short history, they have evolved rapidly. Computers gained in functionality and shrunk in size, leading to a vast number of uses and a vast number and variety of operating systems. See Chapter 20 for more details on the history of operating systems. Operating systems exist because they offer a reasonable way to solve the problem of creating a usable computing system.

The fundamental goal of computer systems is to execute user programs and to make solving user problems easier. Computer hardware is constructed toward this goal. Since bare hardware alone is not particularly easy to use, application programs are developed.

The common functions of controlling and allocating resources are then brought together into one piece of software: Some systems take up less than a megabyte of space and lack even a full-screen editor, whereas others require gigabytes of space and are based entirely on graphical windowing systems. Along with the kernel, there are two other types of programs: The matter of what constitutes an operating system became increasingly important as personal computers became more widespread and operating systems grew increasingly sophisticated.

For example, a Web browser was an integral part of the operating systems. As a result, Microsoft was found guilty of using its operating-system monopoly to limit competition. Today, however, if we look at operating systems for mobile devices, we see that once again the number of features constituting the operating system Mobile operating systems often include not only a core kernel but also middleware—a set of software frameworks that provide additional services to application developers.

In this section, we look at several parts of this structure. The section is mostly concerned with computer-system organization, so you can skim or skip it if you already understand the concepts. The CPU and the device controllers can execute in parallel, competing for memory cycles. To ensure orderly access to the shared memory, a memory controller synchronizes access to the memory. For a computer to start running—for instance, when it is powered up or rebooted—it needs to have an initial program to run.

This initial program, or bootstrap program, tends to be simple. It initializes all aspects of the system, from CPU registers to device controllers to memory contents. The bootstrap program must know how to load the operating system and how to start executing that system.

Once the kernel is loaded and executing, it can start providing services to the system and its users. Some services are provided outside of the kernel, by system programs that are loaded into memory at boot time to become system processes, or system daemons that run the entire time the kernel is running.

Once this phase is complete, the system is fully booted, and the system waits for some event to occur. The occurrence of an event is usually signaled by an interrupt from either the hardware or the software. Hardware may trigger an interrupt at any time by sending a signal to the CPU, usually by way of the system bus.

Software may trigger an interrupt by executing a special operation called a system call also called a monitor call. The interrupt service routine executes; on completion, the CPU resumes the interrupted computation. A timeline of this operation is shown in Figure 1. Interrupts are an important part of a computer architecture. Each computer design has its own interrupt mechanism, but several functions are common. The interrupt must transfer control to the appropriate interrupt service routine.

The straightforward method for handling this transfer would be to invoke a generic routine to examine the interrupt information. However, interrupts must be handled quickly. The interrupt routine is called indirectly through the table, with no intermediate routine needed.

These locations hold the addresses of the interrupt service routines for the various devices. This array, or interrupt vector, of addresses is then indexed by a unique device number, given with the interrupt request, to provide the address of the interrupt service routine for A bit can contain one of two values, 0 and 1. All other storage in a computer is based on collections of bits. Given enough bits, it is amazing how many things a computer can represent: A byte is 8 bits, and on most computers it is the smallest convenient chunk of storage.

A word is made up of one or more bytes. For example, a computer that has bit registers and bit memory addressing typically has bit 8-byte words. A computer executes many operations in its native word size rather than a byte at a time. Computer storage, along with most computer throughput, is generally measured and manipulated in bytes and collections of bytes. Computer manufacturers often round off these numbers and say that a megabyte is 1 million bytes and a gigabyte is 1 billion bytes. Networking measurements are an exception to this general rule; they are given in bits because networks move data a bit at a time.

The interrupt architecture must also save the address of the interrupted instruction. More recent architectures store the return address on the system stack.

If the interrupt routine needs to modify the processor state—for instance, by modifying register values—it must explicitly save the current state and then restore that state before returning. After the interrupt is serviced, the saved return address is loaded into the program counter, and the interrupted computation resumes as though the interrupt had not occurred.

General-purpose computers run most of their programs from rewritable memory, called main memory also called random-access memory, or RAM.

Main memory commonly is implemented in a semiconductor technology called dynamic random-access memory DRAM. Computers use other forms of memory as well. Because ROM cannot be changed, only static programs, such as the bootstrap program described earlier, are stored there. The immutability of ROM is of use in game cartridges. Each byte has its own address. The load instruction moves a byte or word from main memory to an internal register within the CPU, whereas the store instruction moves the content of a register to main memory.

Aside from explicit loads and stores, the CPU automatically loads instructions from main memory for execution. The instruction is then decoded and may cause operands to be fetched from memory and stored in some internal register.

After the instruction on the operands has been executed, the result may be stored back in memory. Notice that the memory unit sees only a stream of memory addresses. It does not know how they are generated by the instruction counter, indexing, indirection, literal addresses, or some other means or what they are for instructions or data.

Accordingly, we can ignore how a memory address is generated by a program. We are interested only in the sequence of memory addresses generated by the running program. Ideally, we want the programs and data to reside in main memory permanently. This arrangement usually is not possible for the following two reasons: Main memory is usually too small to store all needed programs and data permanently.

Operating System Concepts, 8th Edition

Main memory is a volatile storage device that loses its contents when power is turned off or otherwise lost. Thus, most computer systems provide secondary storage as an extension of main memory. The main requirement for secondary storage is that it be able to hold large quantities of data permanently.

The most common secondary-storage device is a magnetic disk, which provides storage for both programs and data. Most programs system and application are stored on a disk until they are loaded into memory. Many programs then use the disk as both the source and the destination of their processing. Hence, the proper management of disk storage is of central importance to a computer system, as we discuss in Chapter In a larger sense, however, the storage structure that we have described— consisting of registers, main memory, and magnetic disks—is only one of many possible storage systems.

Each storage system provides the basic functions of storing a datum and holding that datum until it is retrieved at a later time. The main differences among the various storage systems lie in speed, cost, size, and volatility. The wide variety of storage systems can be organized in a hierarchy Figure 1. The higher levels are expensive, but they are fast. As we move down the hierarchy, the cost per bit generally decreases, whereas the access time generally increases.

This trade-off is reasonable; if a given storage system were both faster and less expensive than another—other properties being the same—then there would be no reason to use the slower, more expensive memory.

In fact, many early storage devices, including paper The top four levels of memory in Figure 1. In addition to differing in speed and cost, the various storage systems are either volatile or nonvolatile. As mentioned earlier, volatile storage loses its contents when the power to the device is removed. In the absence of expensive battery and generator backup systems, data must be written to nonvolatile storage for safekeeping.

In the hierarchy shown in Figure 1. Solid-state disks have several variants but in general are faster than magnetic disks and are nonvolatile. One type of solid-state disk stores data in a large DRAM array during normal operation but also contains a hidden magnetic hard disk and a battery for backup power.

When external power is restored, the controller copies the data back into RAM. Flash memory is slower than DRAM but needs no power to retain its contents. This memory can be as fast as DRAM and as long as the battery lasts is nonvolatile. The design of a complete memory system must balance all the factors just discussed: Caches can A general-purpose computer system consists of CPUs and multiple device controllers that are connected through a common bus.

Depending on the controller, more than one device may be attached.

Free PDF of Operating System by Galvin

For instance, seven or more devices can be attached to the small computer-systems interface SCSI controller. A device controller maintains some local buffer storage and a set of special-purpose registers. The device controller is responsible for moving the data between the peripheral devices that it controls and its local buffer storage.

Typically, operating systems have a device driver for each device controller. This device driver understands the device controller and provides the rest of the operating system with a uniform interface to the device.

The controller starts the transfer of data from the device to its local buffer. The device driver then returns control to the operating system, possibly returning the data or a pointer to the data if the operation was a read. For other operations, the device driver returns status information. To solve this problem, direct memory access DMA is used.

Only one interrupt is generated per block, to tell the device driver that the operation has completed, rather than the one interrupt per byte generated for low-speed devices.

While the device controller is performing these operations, the CPU is available to accomplish other work. Some high-end systems use switch rather than bus architecture.

On these systems, multiple components can talk to other components concurrently, rather than competing for cycles on a shared bus. In this case, DMA is even more effective. Figure 1. A computer system can be organized in a number of different ways, which we On a single- processor system, there is one main CPU capable of executing a general-purpose instruction set, including instructions from user processes.

Almost all single- processor systems have other special-purpose processors as well. All of these special-purpose processors run a limited instruction set and do not run user processes. Sometimes, they are managed by the operating system, in that the operating system sends them information about their next task and monitors their status. Beyond the basics, the Eight Edition sports substantive revisions and organizational changes that clue you in to such cutting-edge developments as open-source operating systems, multi-core processors, clustered computers, virtual machines, transactional memory, NUMA, Solaris 10 memory management, Sun's ZFS file system, and more.

New to this edition is the use of a simulator to dynamically demonstrate several operating system topics. Best of all, a greatly enhanced WileyPlus, a multitude of new problems and programming exercises, and other enhancements to this edition all work together to prepare you enter the world of operating systems with confidence.

Stay ahead with the world's most comprehensive technology and business learning platform. With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more. Start Free Trial No credit card required. View table of contents. Start reading. Book Description Keep pace with the fast-developing world of operating systems Open-source operating systems, virtual machines, and clustered computing are among the leading fields of operating systems and networking that are rapidly changing.