1. Trang chủ
  2. » Công Nghệ Thông Tin

Ebook Operating systems Internals and design principles (6th edition) Part 2

419 750 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 419
Dung lượng 4,38 MB

Nội dung

(BQ) Part 2 book Operating systems Internals and design principles has contents Uniprocessor scheduling, multiprocessor and real time scheduling, file management, IO management and disk scheduling, embedded operating systems, embedded operating systems,...and other contents.

PART FOUR Scheduling A n operating system must allocate computer resources among the potentially competing requirements of multiple processes In the case of the processor, the resource to be allocated is execution time on the processor and the means of allocation is scheduling The scheduling function must be designed to satisfy a number of objectives, including fairness, lack of starvation of any particular process, efficient use of processor time, and low overhead In addition, the scheduling function may need to take into account different levels of priority or real-time deadlines for the start or completion of certain processes Over the years, scheduling has been the focus of intensive research, and many different algorithms have been implemented Today, the emphasis in scheduling research is on exploiting multiprocessor systems, particularly for multithreaded applications, and real-time scheduling ROAD MAP FOR PART FOUR Chapter Uniprocessor Scheduling Chapter concerns scheduling on a system with a single processor In this limited context, it is possible to define and clarify many design issues related to scheduling Chapter begins with an examination of the three types of processor scheduling: long term, medium term, and short term The bulk of the chapter focuses on short-term scheduling issues The various algorithms that have been tried are examined and compared Chapter 10 Multiprocessor and Real-Time Scheduling Chapter 10 looks at two areas that are the focus of contemporary scheduling research The presence of multiple processors complicates the scheduling decision and opens up new opportunities In particular, with multiple processors it is possible simultaneously to schedule for execution multiple threads within the same process The first part of Chapter 10 provides a survey of multiprocessor and multithreaded scheduling The remainder of the chapter deals with real-time scheduling Real-time requirements are the most demanding for a scheduler to meet, because requirements go beyond fairness or priority by specifying time limits for the start or finish of given tasks or processes 404 CHAPTER UNIPROCESSOR SCHEDULING 9.1 Types of Professor Scheduling Long-Term Scheduling Medium-Term Scheduling Short-Term Scheduling 9.2 Scheduling Algorithms Short-Term Scheduling Criteria The Use of Priorities Alternative Scheduling Policies Performance Comparison Fair-Share Scheduling 9.3 Traditional UNIX Scheduling 9.4 Summary 9.5 Recommended Reading 9.6 Key Terms, Review Questions, and Problems APPENDIX 9A Response Time APPENDIX 9B Queuing Systems Why Queuing Analysis? The Single-Server Queue The Multiserver Queue Poisson Arrival Rate 405 406 CHAPTER / UNIPROCESSOR SCHEDULING In a multiprogramming system, multiple processes exist concurrently in main memory Each process alternates between using a processor and waiting for some event to occur, such as the completion of an I/O operation.The processor or processors are kept busy by executing one process while the others wait The key to multiprogramming is scheduling In fact, four types of scheduling are typically involved (Table 9.1) One of these, I/O scheduling, is more conveniently addressed in Chapter 11, where I/O is discussed.The remaining three types of scheduling, which are types of processor scheduling, are addressed in this chapter and the next This chapter begins with an examination of the three types of processor scheduling, showing how they are related.We see that long-term scheduling and medium-term scheduling are driven primarily by performance concerns related to the degree of multiprogramming.These issues are dealt with to some extent in Chapter and in more detail in Chapters and 8.Thus, the remainder of this chapter concentrates on short-term scheduling and is limited to a consideration of scheduling on a uniprocessor system Because the use of multiple processors adds additional complexity, it is best to focus on the uniprocessor case first, so that the differences among scheduling algorithms can be clearly seen Section 9.2 looks at the various algorithms that may be used to make short-term scheduling decisions 9.1 TYPES OF PROCESSOR SCHEDULING The aim of processor scheduling is to assign processes to be executed by the processor or processors over time, in a way that meets system objectives, such as response time, throughput, and processor efficiency In many systems, this scheduling activity is broken down into three separate functions: long-, medium-, and shortterm scheduling The names suggest the relative time scales with which these functions are performed Figure 9.1 relates the scheduling functions to the process state transition diagram (first shown in Figure 3.9b) Long-term scheduling is performed when a new process is created This is a decision whether to add a new process to the set of processes that are currently active Medium-term scheduling is a part of the swapping function This is a decision whether to add a process to those that are at least partially in main memory and therefore available for execution Short-term scheduling is the actual decision of which ready process to execute next Figure 9.2 reorganizes the state transition diagram of Figure 3.9b to suggest the nesting of scheduling functions Table 9.1 Types of Scheduling Long-term scheduling The decision to add to the pool of processes to be executed Medium-term scheduling The decision to add to the number of processes that are partially or fully in main memory Short-term scheduling The decision as to which available process will be executed by the processor I/O scheduling The decision as to which process’s pending I/O request shall be handled by an available I/O device New Long-term scheduling Ready/ suspend Blocked/ suspend Figure 9.1 Long-term scheduling Medium-term scheduling Medium-term scheduling Ready Short-term scheduling Running Exit Blocked Scheduling and Process State Transitions Running Ready Blocked Short term Blocked, suspend Ready, suspend Medium term Long term New Figure 9.2 Levels of Scheduling Exit 407 408 CHAPTER / UNIPROCESSOR SCHEDULING Long-term scheduling Timeout Batch jobs Ready queue Short-term scheduling Release Processor Medium-term scheduling Interactive users Ready, suspend queue Medium-term scheduling Blocked, suspend queue Event occurs Figure 9.3 Blocked queue Event wait Queuing Diagram for Scheduling Scheduling affects the performance of the system because it determines which processes will wait and which will progress This point of view is presented in Figure 9.3, which shows the queues involved in the state transitions of a process.1 Fundamentally, scheduling is a matter of managing queues to minimize queuing delay and to optimize performance in a queuing environment Long-Term Scheduling The long-term scheduler determines which programs are admitted to the system for processing Thus, it controls the degree of multiprogramming Once admitted, a job or user program becomes a process and is added to the queue for the short-term scheduler In some systems, a newly created process begins in a swapped-out condition, in which case it is added to a queue for the medium-term scheduler In a batch system, or for the batch portion of a general-purpose operating system, newly submitted jobs are routed to disk and held in a batch queue.The long-term scheduler creates processes from the queue when it can There are two decisions involved here First, the scheduler must decide when the operating system can take on one or more additional processes Second, the scheduler must decide which job or jobs to accept and turn into processes Let us briefly consider these two decisions The decision as to when to create a new process is generally driven by the desired degree of multiprogramming The more processes that are created, the smaller For simplicity, Figure 9.3 shows new processes going directly to the Ready state, whereas Figures 9.1 and 9.2 show the option of either the Ready state or the Ready/Suspend state 9.1 / TYPES OF PROCESSOR SCHEDULING 409 is the percentage of time that each process can be executed (i.e., more processes are competing for the same amount of processor time) Thus, the long-term scheduler may limit the degree of multiprogramming to provide satisfactory service to the current set of processes Each time a job terminates, the scheduler may decide to add one or more new jobs Additionally, if the fraction of time that the processor is idle exceeds a certain threshold, the long-term scheduler may be invoked The decision as to which job to admit next can be on a simple first-come-firstserved basis, or it can be a tool to manage system performance The criteria used may include priority, expected execution time, and I/O requirements For example, if the information is available, the scheduler may attempt to keep a mix of processorbound and I/O-bound processes.2 Also, the decision may be made depending on which I/O resources are to be requested, in an attempt to balance I/O usage For interactive programs in a time-sharing system, a process creation request can be generated by the act of a user attempting to connect to the system Timesharing users are not simply queued up and kept waiting until the system can accept them Rather, the operating system will accept all authorized comers until the system is saturated, using some predefined measure of saturation At that point, a connection request is met with a message indicating that the system is full and the user should try again later Medium-Term Scheduling Medium-term scheduling is part of the swapping function The issues involved are discussed in Chapters 3, 7, and Typically, the swapping-in decision is based on the need to manage the degree of multiprogramming On a system that does not use virtual memory, memory management is also an issue Thus, the swapping-in decision will consider the memory requirements of the swapped-out processes Short-Term Scheduling In terms of frequency of execution, the long-term scheduler executes relatively infrequently and makes the coarse-grained decision of whether or not to take on a new process and which one to take The medium-term scheduler is executed somewhat more frequently to make a swapping decision The short-term scheduler, also known as the dispatcher, executes most frequently and makes the fine-grained decision of which process to execute next The short-term scheduler is invoked whenever an event occurs that may lead to the blocking of the current process or that may provide an opportunity to preempt a currently running process in favor of another Examples of such events include • • • • Clock interrupts I/O interrupts Operating system calls Signals (e.g., semaphores) A process is regarded as processor bound if it mainly performs computational work and occasionally uses I/O devices A process is regarded as I/O bound if the time it takes to execute the process depends primarily on the time spent waiting for I/O operations 410 CHAPTER / UNIPROCESSOR SCHEDULING 9.2 SCHEDULING ALGORITHMS Short-Term Scheduling Criteria The main objective of short-term scheduling is to allocate processor time in such a way as to optimize one or more aspects of system behavior Generally, a set of criteria is established against which various scheduling policies may be evaluated The commonly used criteria can be categorized along two dimensions First, we can make a distinction between user-oriented and system-oriented criteria Useroriented criteria relate to the behavior of the system as perceived by the individual user or process An example is response time in an interactive system Response time is the elapsed time between the submission of a request until the response begins to appear as output This quantity is visible to the user and is naturally of interest to the user We would like a scheduling policy that provides “good” service to various users In the case of response time, a threshold may be defined, say seconds Then a goal of the scheduling mechanism should be to maximize the number of users who experience an average response time of seconds or less Other criteria are system oriented That is, the focus is on effective and efficient utilization of the processor An example is throughput, which is the rate at which processes are completed This is certainly a worthwhile measure of system performance and one that we would like to maximize However, it focuses on system performance rather than service provided to the user Thus, throughput is of concern to a system administrator but not to the user population Whereas user-oriented criteria are important on virtually all systems, systemoriented criteria are generally of minor importance on single-user systems On a single-user system, it probably is not important to achieve high processor utilization or high throughput as long as the responsiveness of the system to user applications is acceptable Another dimension along which criteria can be classified is those that are performance related and those that are not directly performance related Performancerelated criteria are quantitative and generally can be readily measured Examples include response time and throughput Criteria that are not performance related are either qualitative in nature or not lend themselves readily to measurement and analysis An example of such a criterion is predictability We would like for the service provided to users to exhibit the same characteristics over time, independent of other work being performed by the system To some extent, this criterion can be measured, by calculating variances as a function of workload However, this is not nearly as straightforward as measuring throughput or response time as a function of workload Table 9.2 summarizes key scheduling criteria These are interdependent, and it is impossible to optimize all of them simultaneously For example, providing good response time may require a scheduling algorithm that switches between processes frequently This increases the overhead of the system, reducing throughput Thus, the design of a scheduling policy involves compromising among competing requirements; the relative weights given the various requirements will depend on the nature and intended use of the system 9.2 / SCHEDULING ALGORITHMS Table 9.2 411 Scheduling Criteria User Oriented, Performance Related Turnaround time This is the interval of time between the submission of a process and its completion Includes actual execution time plus time spent waiting for resources, including the processor This is an appropriate measure for a batch job Response time For an interactive process, this is the time from the submission of a request until the response begins to be received Often a process can begin producing some output to the user while continuing to process the request Thus, this is a better measure than turnaround time from the user’s point of view The scheduling discipline should attempt to achieve low response time and to maximize the number of interactive users receiving acceptable response time Deadlines When process completion deadlines can be specified, the scheduling discipline should subordinate other goals to that of maximizing the percentage of deadlines met User Oriented, Other Predictability A given job should run in about the same amount of time and at about the same cost regardless of the load on the system A wide variation in response time or turnaround time is distracting to users It may signal a wide swing in system workloads or the need for system tuning to cure instabilities System Oriented, Performance Related Throughput The scheduling policy should attempt to maximize the number of processes completed per unit of time This is a measure of how much work is being performed This clearly depends on the average length of a process but is also influenced by the scheduling policy, which may affect utilization Processor utilization This is the percentage of time that the processor is busy For an expensive shared system, this is a significant criterion In single-user systems and in some other systems, such as real-time systems, this criterion is less important than some of the others System Oriented, Other Fairness In the absence of guidance from the user or other system-supplied guidance, processes should be treated the same, and no process should suffer starvation Enforcing priorities When processes are assigned priorities, the scheduling policy should favor higher-priority processes Balancing resources The scheduling policy should keep the resources of the system busy Processes that will underutilize stressed resources should be favored This criterion also involves medium-term and long-term scheduling In most interactive operating systems, whether single user or time shared, adequate response time is the critical requirement Because of the importance of this requirement, and because the definition of adequacy will vary from one application to another, the topic is explored further in Appendix 9A The Use of Priorities In many systems, each process is assigned a priority and the scheduler will always choose a process of higher priority over one of lower priority Figure 9.4 illustrates the use of priorities For clarity, the queuing diagram is simplified, ignoring the existence of multiple blocked queues and of suspended states (compare Figure 3.8a) Instead of a single ready queue, we provide a set of queues, in descending order of priority: RQ0, 412 CHAPTER / UNIPROCESSOR SCHEDULING RQ0 Release Dispatch Processor RQ1 Admit RQn Preemption Event wait Event occurs Figure 9.4 Blocked queue Priority Queuing RQ1, RQn, with priority[RQi] Ͼ priority[RQj] for i Ͻ j.3 When a scheduling selection is to be made, the scheduler will start at the highest-priority ready queue (RQ0) If there are one or more processes in the queue, a process is selected using some scheduling policy If RQ0 is empty, then RQ1 is examined, and so on One problem with a pure priority scheduling scheme is that lower-priority processes may suffer starvation This will happen if there is always a steady supply of higher-priority ready processes If this behavior is not desirable, the priority of a process can change with its age or execution history We will give one example of this subsequently Alternative Scheduling Policies Animation: Process Scheduling Algorithms Table 9.3 presents some summary information about the various scheduling policies that are examined in this subsection The selection function determines which process, among ready processes, is selected next for execution The function may be based on priority, resource requirements, or the execution characteristics of the process In the latter case, three quantities are significant: w ϭ time spent in system so far, waiting e ϭ time spent in execution so far s ϭ total service time required by the process, including e; generally, this quantity must be estimated or supplied by the user In UNIX and many other systems, larger priority values represent lower priority processes; unless otherwise stated we follow that convention Some systems, such as Windows, use the opposite convention: a higher number means a higher priority 9.2 / SCHEDULING ALGORITHMS Table 9.3 413 Characteristics of Various Scheduling Policies FCFS Round robin SPN SRT Selection function max[w] constant min[s] min[s - e] Decision mode Nonpreemptive Preemptive (at time quantum) Nonpreemptive Preemptive (at arrival) Nonpreemptive Throughput Not emphasized May be low if quantum is too small High High High Response time May be high, especially if there is a large variance in process execution times Provides good response time for short processes Provides good response time for short processes Provides good response time Provides good response time Not emphasized Overhead Minimum Minimum Can be high Can be high Can be high Can be high Effect on processes Penalizes short processes; penalizes I/O bound processes Fair treatment Penalizes long processes Penalizes long processes No No Possible Possible Starvation HRRN max a w + s b s Good balance No Feedback (see text) Preemptive (at time quantum) Not emphasized May favor I/O bound processes Possible For example, the selection function max[w] indicates a first-come-first-served (FCFS) discipline The decision mode specifies the instants in time at which the selection function is exercised There are two general categories: • Nonpreemptive: In this case, once a process is in the Running state, it continues to execute until (a) it terminates or (b) it blocks itself to wait for I/O or to request some operating system service • Preemptive: The currently running process may be interrupted and moved to the Ready state by the operating system The decision to preempt may be performed when a new process arrives; when an interrupt occurs that places a blocked process in the Ready state; or periodically, based on a clock interrupt Preemptive policies incur greater overhead than nonpreemptive ones but may provide better service to the total population of processes, because they prevent any one process from monopolizing the processor for very long In addition, the cost of preemption may be kept relatively low by using efficient process-switching mechanisms (as much help from hardware as possible) and by providing a large main memory to keep a high percentage of programs in main memory 808 REFERENCES PROV99 PRZY88 RADC04 RAJA00 RAMA94 RASH88 RAYN86 RAYN88 RAYN90 RICA81 RICA83 RIDG97 RITC74 RITC78 RITC84 ROBB04 ROBI90 RODR02 ROME04 ROSC03 ROSE78 Provos, N., and Mazieres, D “A Future-Adaptable Password Scheme.” Proceedings of the 1999 USENIX Annual Technical Conference, 1999 Przybylski, S.; Horowitz, M.; and Hennessy, J “Performance Trade-Offs in Cache Design.” Proceedings, Fifteenth Annual International Symposium on Computer Architecture, June 1988 Radcliff, D “What Are They Thinking?” Network World, March 1, 2004 Rajagopal, R Introduction to Microsoft Windows NT Cluster Server Boca Raton, FL: CRC Press, 2000 Ramamritham, K., and Stankovic, J “Scheduling Algorithms and Operating Systems Support for Real-Time Systems.” Proceedings of the IEEE, January 1994 Rashid, R., et al “Machine-Independent Virtual Memory Management for Paged Uniprocessor and Multiprocessor Architectures.” IEEE Transactions on Computers, August 1988 Raynal, M Algorithms for Mutual Exclusion Cambridge, MA: MIT Press, 1986 Raynal, M Distributed Algorithms and Protocols New York: Wiley, 1988 Raynal, M., and Helary, J Synchronization and Control of Distributed Systems and Programs New York: Wiley, 1990 Ricart, G., and Agrawala, A “An Optimal Algorithm for Mutual Exclusion in Computer Networks.” Communications of the ACM, January 1981 (Corrigendum in Communications of the ACM, September 1981) Ricart, G., and Agrawala, A “Author’s Response to ‘On Mutual Exclusion in Computer Networks’ by Carvalho and Roucairol.” Communications of the ACM, February 1983 Ridge, D., et al “Beowulf: Harnessing the Power of Parallelism in a Pile-ofPCs.” Proceedings, IEEE Aerospace, 1997 Ritchie, D., and Thompson, K “The UNIX Time-Sharing System.” Communications of the ACM, July 1974 Ritchie, D “UNIX Time-Sharing System: A Retrospective.” The Bell System Technical Journal, July–August 1978 Ritchie, D “The Evolution of the UNIX Time-Sharing System.” AT & T Bell Labs Technical Journal, October 1984 Robbins, K., and Robbins, S UNIX Systems Programming: Communication, Concurrency, and Threads Upper Saddle River, NJ: Prentice Hall, 2004 Robinson, J., and Devarakonda, M “Data Cache Management Using Frequency-Based Replacement.” Proceedings, Conference on Measurement and Modeling of Computer Systems, May 1990 Rodriguez, A., et al TCP/IP Tutorial and Technical Overview Upper Saddle River: NJ: Prentice Hall, 2002 Romer, K., and Mattern, F “The Design Space of Wireless Sensor Networks.” IEEE Wireless Communications, December 2004 Rosch, W The Winn L Rosch Hardware Bible Indianapolis, IN: Que Publishing, 2003 Rosenkrantz, D.; Stearns, R.; and Lewis, P “System Level Concurrency Control in Distributed Database Systems.” ACM Transactions on Database Systems, June 1978 REFERENCES RUBI97 RUDO90 RUSS05 SAND94 SAND96 SATY81 SAUE81 SAUN01 SCAR07 SCHA62 SCHM97 SCHW96 SELT90 SEVC96 SHA90 SHA91 SHA94 SHEN02 SHIV92 SHNE84 SHOR75 SHOR97 809 Rubini, A “The Virtual File System in Linux.” Linux Journal, May 1997 Rudolph, B “Self-Assessment Procedure XXI: Concurrency.” Communications of the ACM, May 1990 Russinovich, M., and Solomon, D Microsoft Windows Internals: Microsoft Windows Server(TM) 2003, Windows XP, and Windows 2000 Redmond, WA: Microsoft Press, 2005 Sandhu, R, and Samarati, P “Access Control: Principles and Practice.” IEEE Communications, September 1994 Sandhu, R., et al “Role-Based Access Control Models.” Computer, September 1994 Satyanarayanan, M and Bhandarkar, D “Design Trade-Offs in VAX-11 Translation Buffer Organization.” Computer, December 1981 Sauer, C., and Chandy, K Computer Systems Performance Modeling Englewood Cliffs, NJ: Prentice Hall, 1981 Saunders, G.; Hitchens, M.; and Varadharajan, V “Role-Based Access Control and the Access Control Matrix.” Operating Systems Review, October 2001 Scarfone, K., and Mell, P Guide to Intrusion Detection and Prevention Systems NIST Special Publication SP 800–94, February 2007 Schay, G., and Spruth, W “Analysis of a File Addressing Method.” Communications of the ACM, August 1962 Schmidt, D “Distributed Object Computing.” IEEE Communications Magazine, February 1997 Schwaderer, W., and Wilson, A Understanding I/O Subsystems Milpitas, CA: Adaptec Press, 1996 Seltzer, M.; Chen, P.; and Ousterhout, J “Disk Scheduling Revisited.” Proceedings, USENIX Winter Technical Conference, January 1990 Sevcik, P “Designing a High-Performance Web Site.” Business Communications Review, March 1996 Sha, L.; Rajkumar, R.; and Lehoczky, J “Priority Inheritance Protocols: An Approach to Real-Time Synchronization.” IEEE Transactions on Computers, September 1990 Sha, L.; Klein, M.; and Goodenough, J “Rate Monotonic Analysis for RealTime Systems.” in [TILB91] Sha, L.; Rajkumar, R.; and Sathaye, S “Generalized Rate-Monotonic Scheduling Theory: A Framework for Developing Real-Time Systems.” Proceedings of the IEEE, January 1994 Shene, C “Multithreaded Programming Can Strengthen an Operating Systems Course.” Computer Science Education Journal, December 2002 Shivaratri, N.; Krueger, P.; and Singhal, M “Load Distributing for Locally Distributed Systems.” Computer, December 1992 Shneiderman, B “Response Time and Display Rate in Human Performance with Computers.” ACM Computing Surveys, September 1984 Shore, J “On the External Storage Fragmentation Produced by First-Fit and Best-Fit Allocation Strategies.” Communications of the ACM, August, 1975 Short, R.; Gamache, R.; Vert, J.; and Massa, M “Windows NT Clusters for Availability and Scalability.” Proceedings, COMPCON Spring 97, February 1997 810 REFERENCES SHUB90 SHUB03 SILB04 SING94a SING94b SING99 SINH97 SMIT82 SMIT83 SMIT85 SMIT88 SMIT89 SNYD93 STAL06a STAL06b STAL07 STAL08 STAN89 STAN93 STAN96 STEE95 STER99 STON93 STRE83 STRO88 Shub, C “ACM Forum: Comment on a Self-Assessment Procedure on Operating Systems.” Communications of the ACM, September 1990 Shub, C “A Unified Treatment of Deadlock.” Journal of Computing in Small Colleges, October 2003 Available through the ACM digital library Silberschatz, A.; Galvin, P.; and Gagne, G Operating System Concepts with Java Reading, MA: Addison-Wesley, 2004 Singhal, M., and Shivaratri, N Advanced Concepts in Operating Systems New York: McGraw-Hill, 1994 Singhal, M “Deadlock Detection in Distributed Systems.” In [CASA94] Singh, H Progressing to Distributed Multiprocessing Upper Saddle River, NJ: Prentice Hall, 1999 Sinha, P Distributed Operating Systems Piscataway, NJ: IEEE Press, 1997 Smith, A “Cache Memories.” ACM Computing Surveys, September 1982 Smith, D “Faster Is Better: A Business Case for Subsecond Response Time.” Computerworld, April 18, 1983 Smith, A “Disk Cache—Miss Ratio Analysis and Design Considerations.” ACM Transactions on Computer Systems, August 1985 Smith, J “A Survey of Process Migration Mechanisms.” Operating Systems Review, July 1988 Smith, J “Implementing Remote fork() with Checkpoint/restart.” Newsletter of the IEEE Computer Society Technical Committee on Operating Systems, Winter 1989 Snyder, A “The Essence of Objects: Concepts and Terms.” IEEE Software, January 1993 Stallings, W Computer Organization and Architecture, Seventh Edition Upper Saddle River, NJ: Prentice Hall, 2006 Stallings, W Cryptography and Network Security: Principles and Practice, Fourth Edition Upper Saddle River, NJ: Prentice Hall, 2006 Stallings, W Data and Computer Communications Upper Saddle River: NJ: Prentice Hall, 2007 Stallings, W., and Brown L Computer Security: Principles and Practice Upper Saddle River, NJ: Prentice Hall, 2008 Stankovic, J., and Ramamrithan, K “The Spring Kernel: A New Paradigm for Real-Time Operating Systems.” Operating Systems Review, July 1989 Stankovic, J., and Ramamritham, K., eds Advances in Real-Time Systems Los Alamitos, CA: IEEE Computer Society Press, 1993 Stankovic, J., et al “Strategic Directions in Real-Time and Embedded Systems.” ACM Computing Surveys, December 1996 Steensgarrd, B., and Jul, E “Object and Native Code Mobility Among Heterogeneous Computers.” Proceedings, 15th ACM Symposium on Operating Systems Principles, December 1995 Sterling, T., et al How to Build a Beowulf Cambridge, MA: MIT Press, 1999 Stone, H High-Performance Computer Architecture Reading, MA: AddisonWesley, 1993 Strecker, W “Transient Behavior of Cache Memories.” ACM Transactions on Computer Systems, November 1983 Stroustrup, B “What Is Object-Oriented Programming?” IEEE Software, May 1988 REFERENCES SUN99 SUZU82 SWAI07 SYMA01 TAIV96 TAKA01 TALL92 TAMI83 TANE78 TANE85 TANE06 TAY90 TEL01 TEVA87 THAD81 THOM84 THOM01 TILB91 TIME90 TIME02 TUCK89 TUCK04 811 Sun Microsystems “Sun Cluster Architecture: A White Paper.” Proceedings, IEEE Computer Society International Workshop on Cluster Computing, December 1999 Suzuki, I., and Kasami, T “An Optimality Theory for Mutual Exclusion Algorithms in Computer Networks.” Proceedings of the Third International Conference on Distributed Computing Systems, October 1982 Swaine, M “Wither Operating Systems?” Dr Dobb’s Journal, March 2007 Symantec Corp The Digital Immune System Symantec Technical Brief, 2001 Taivalsaari, A “On the Nature of Inheritance.” ACM Computing Surveys, September 1996 Takada, H “Real-Time Operating System for Embedded Systems.” In Imai, M and Yoshida, N (eds) Asia South-Pacific Design Automation Conference, 2001 Talluri, M.; Kong, S.; Hill, M.; and Patterson, D “Tradeoffs in Supporting Two Page Sizes.” Proceedings of the 19th Annual International Symposium on Computer Architecture, May 1992 Tamir, Y., and Sequin, C “Strategies for Managing the Register File in RISC.” IEEE Transactions on Computers, November 1983 Tanenbaum, A “Implications of Structured Programming for Machine Architecture.” Communications of the ACM, March 1978 Tanenbaum, A., and Renesse, R “Distributed Operating Systems.” Computing Surveys, December 1985 Tanenbaum, A., and Woodhull, A Operating Systems: Design and Implementation Upper Saddle River, NJ: Prentice Hall, 2006 Tay, B., and Ananda, A “A Survey of Remote Procedure Calls.” Operating Systems Review, July 1990 Tel, G Introduction to Distributed Algorithms Cambridge: Cambridge University Press, 2001 Tevanian, A., et al “Mach Threads and the UNIX Kernel: The Battle for Control.” Proceedings, Summer 1987 USENIX Conference, June 1987 Thadhani, A “Interactive User Productivity.” IBM Systems Journal, No 1, 1981 Thompson, K “Reflections on Trusting Trust (Deliberate Software Bugs).” Communications of the ACM, August 1984 Thomas, G “ eCos: An Operating System for Embedded Systems.” Dr Dobb’s Journal, January 2001 Tilborg, A., and Koob, G., eds Foundations of Real-Time Computing: Scheduling and Resource Management Boston: Kluwer Academic Publishers, 1991 Time, Inc Computer Security, Understanding Computers Series Alexandria, VA: Time-Life Books, 1990 TimeSys Corp “Priority Inversion: Why You Care and What to Do About It” TimeSys White Paper, 2002 http://www.techonline com/community/ed_ resource/tech_paper/21779 Tucker, A., and Gupta, A “Process Control and Scheduling Issues for Multiprogrammed Shared-Memory Multiprocessors.” Proceedings, Twelfth ACM Symposium on Operating Systems Principles, December 1989 Tucker, A ed The Computer Science Handbook Boca Raton, FL: CRC Press, 2004 812 REFERENCES VAHA96 VINO97 WAGN00 WALK89 WARD80 WARR91 WAYN94 a WAYN94b WEIZ81 WEND89 WHIT99 WIED87 WOOD86 WOOD89 WORT94 WRIG95 YOUN87 ZAHO90 ZAJC93 ZEAD97 ZOU05 Vahalia, U UNIX Internals: The New Frontiers Upper Saddle River, NJ: Prentice Hall, 1996 Vinoski, S “CORBA: Integrating Diverse Applications Within Distributed Heterogeneous Environments.” IEEE Communications Magazine, February 1997 Wagner, D., and Goldberg, I “Proofs of Security for the UNIX Password Hashing Algorithm.” Proceedings, ASIACRYPT ‘00, 2000 Walker, B., and Mathews, R “Process Migration in AIX’s Transparent Computing Facility.” Newsletter of the IEEE Computer Society Technical Committee on Operating Systems, Winter 1989 Ward, S “TRIX: A Network-Oriented Operating System.” Proceedings, COMPCON ‘80, 1980 Warren, C “Rate Monotonic Scheduling.” IEEE Micro, June 1991 Wayner, P “Small Kernels Hit it Big.” Byte, January 1994 Wayner, P “Objects on the March.” Byte, January 1994 Weizer, N “A History of Operating Systems.” Datamation, January 1981 Wendorf, J.; Wendorf, R.; and Tokuda, H “Scheduling Operating System Processing on Small-Scale Microprocessors.” Proceedings, 22 nd Annual Hawaii International Conference on System Science, January 1989 White, S Anatomy of a Commercial-Grade Immune System IBM Research White Paper, 1999 Wiederhold, G File Organization for Database Design New York: McGrawHill, 1987 Woodside, C “Controllability of Computer Performance Tradeoffs Obtained Using Controlled-Share Queue Schedulers.” IEEE Transactions on Software Engineering, October 1986 Woodbury, P et al “Shared Memory Multiprocessors: The Right Approach to Parallel Processing.” Proceedings, COMPCON Spring ‘89, March 1989 Worthington, B.; Ganger, G.; and Patt, Y “Scheduling Algorithms for Modern Disk Drives.” ACM SiGMETRICS, May 1994 Wright, G., and Stevens, W TCP/IP Illustrated, Volume 2: The Implementation Reading, MA: Addison-Wesley, 1995 Young, M., et al “The Duality of Memory and Communication in the Implementation of a Multiprocessor Operating System.” Proceedings of the Eleventh ACM Symposium on Operating Systems Principles, December 1987 Zahorjan, J., and McCann, C “Processor Scheduling in Shared Memory Multiprocessors.” Proceedings, Conference on Measurement and Modeling of Computer Systems, May 1990 Zajcew, R., et al “An OSF/1 UNIX for Massively Parallel Multicomputers.” Proceedings, Winter USENIX Conference, January 1993 Zeadally, S “An Evaluation of the Real-Time Performance of SVR4.0 and SVR4.2.” Operating Systems Review, January 1977 Zou, C., et al “The Monitoring and Early Detection of Internet Worms.” IEEE/ACM Transactions on Networking, October 2005 INDEX A Linux security, 692, 693–699, 703–705, Absolute loading, 340–342 Access control, 146, 579–580, 585–587, 675–680, 697–699 capability tickets, 580 computer security, 675–680, 697–698 discretionary (DAC), 675–679, 699 file management system security, 578–580, 585–587 lists, 579–580, 587 mandatory (MAC), 675 matrix, 579–580 operating systems, 146 role-based (RBAC), 675, 679–680 security (SAC), 699 tokens, 698 UNIX, 146, 579–580, 585–587 user identification numbers (ID), 585–586 Windows, 697–699 Access efficiency, 43–45 Access method for file systems, 556 Access rights for file sharing, 567–568 Access time, 508 Accountability for computer security, 637–638 Accounting information, 110 Accumulator (AC), 13–14 Active attacks, 642–643 Address registers, 8–10, 325–326 input/output (I/OAR), 8–9 memory relocation and, 10, 325–326 Addresses, 10, 69, 324–329, 340–342, 346, 391–393, 695–696 binding, 340–342 buffer overflow attacks and, 695–696 executable space protection, 695 logical, 325 map, 391–393 memory relocation, 324–326, 340–342 physical, 325 real, 69, 346 relative, 325 space randomization, 695–696 spaces, 346, 393 translation for paging, 326–329 virtual, 346, 391–393 Windows, 391–393 Addressing, 241–242, 389–391 direct, 241 indirect, 241–242 Linux virtual memory, 389–391 memory management, 241–242, 389–391 Adobe PageMaker thread use example, 167–168 message passing, 241–242 Analyzers for intrusion detection, 145, 682 Anticipatory scheduler, 532–533 Aperiodic tasks, 467, 474–476 Application programming interface (API), 192, 609, 711, 721 Architecture, 77, 83–84, 91, 175–177, 179–180, 555–556, 713, 717–718, 720–721, 732–733, 772–776 client/server, 713, 717–718, 720–721 cluster computer, 732–733 Common Object Request Broker Architecture (CORBA), 772–776 file system, 555–556 master/slave, 176 microkernel, 77, 179–180 Microsoft Windows operating systems, 83–84 middleware, 720–721 object-oriented design, 772–776 symmetric multiprocessing (SMP), 175–177 three-tier client/server, 717–718 UNIX, 91 Associative mapping, 357 Associative search, 401 Asynchronous I/O, Windows, 534–535 Asynchronous remote procedure calls (RPC), 727 Atomic operations, 207, 289–290 Attacks and network security, 642–643 Audit records for intrusion detection, 684–685 Authentication, 145–146, 668–675 biometric, 669, 673–675 computer security by, 145–146, 668–675 intrusion detection, 145–146 means of, 668–669 password-based, 668, 669–672 token-based, 668, 672–673 user identification (ID), 145–146, 661 Authenticity of information, 71, 637 Auxiliary memory, 29 Availability of information, 71, 636–637 B Banker’s algorithm, 275–277 Barriers, Linux, 294–295 Basic file system (physical I/O), 556 Batch systems, 55–62 job control language (JCL), 57–58 memory protection, 58 monitor for, 56–57 multiprogrammed, 59–62 operating systems and, 55–62 privileged instructions, 58 simple, 55–59 timers, 58 Behavior-blocking software, 688–689 Beowulf clusters, 738–740 Berkeley Software Distribution (BSD), 94 Binary search, 401 Binary semaphores, 220, 221–222, 292–294 Biometric authentication, 669, 673–675 Bit tables, 575–576 Bitmap operations, Linux atomic, 289–290 Blended attack, 650–651 Blocked state, 165 Blocked/waiting process state, 117 Blocking/unblocking messages, 724 Blocks, 30–32, 98, 110–111, 128–129, 568–578 device drivers, Linux, 98 file allocation, 570–574 file management, 568–578 free space management, 574–577 memory, 30–32 process control, 110–111, 128–129 record blocking, 568–570 secondary storage management, 570–578 Blu-ray (BR) disks, 549–550 Boot block, 585 Bots, 659–661, 691 attack network construction, 661 botnets, 659 malware countermeasures, 691 remote control facilities, 660 scanning (fingerprinting), 661 use of, 659–660 Broadcast monitor condition for, 236–239 Buddy system algorithm, 322–324, 387–389 kernel memory allocation, UNIX SVR4, 387–389 memory partitioning using, 322–324 Buffer overflow attacks, 331–335, 692–697 address space randomization, 695–696 compile-time defenses, 692–694 defending against, 334–335 executable address space protection, 695 guard pages, 696–697 memory management and, 331–335 programming languages and, 692, 693–694 run-time defenses, 694–697 safe coding techniques, 692–693 safe libraries and, 693–694 stack overflow, 332–334, 694 Buffer register (I/OBR), 8–9 Buffering, 504–507, 527–529 cache, 527–528 circular, 505–507 double, 505–506 I/O systems management, 504–507 single, 504–506 SVR4, 527–529 swapping, 506 unbuffered I/O, 529 use of, 507 Busy waiting technique, 218 C Cache consistency, 718–719 Cache memory, 29–33, 85, 374 See also Disk cache blocks, 30–32 design, 31–33 main memory and, 29, 30–31 mapping function, 32–33 motivation, 29–30 principles of, 30–31 replacement algorithm, 33 size, replacement policies and, 374 slots (lines), 30–31 Windows manager, 85 write policy, 33 Canary value, 694 Capability tickets, 580 CD recordable (CD-R) disks, 547 CD rewritable (CD-RW) disks, 547–548 Central processing unit (CPU), 8–9 Chain pointer, 355 Chained allocation, 573–574 Chained free portions, 576 Chaining, overflow with, 403 Character device drivers, Linux, 98 Character queues, SVR4, 528–529 Child process, 116 CIA triad for security, 636–637 Circular buffering, 505, 506–507 Circular SCAN (C-SCAN) policy, 511–512, 514 Circular wait processes, deadlock prevention using, 271, 273 Clandestine users, 144, 643 Classes, 88, 485–486, 716–717, 769–771 client/server, 716–717 objects, 88, 769–771 priority, SVR4, 485–486 813 814 INDEX Cleaning policy, 381 Client/servers, 86–87, 711–721, 726–727 applications, 713–719 binding, 726–727 classes of, 716–717 computing, 711–721 database applications, 714–716 file cache consistency, 718–719 middleware, 711, 719–721 network, 711–713 remote procedure calls (RPC), 726–727 three-tier, 717–718 Windows model, 86–87 Clock algorithms, 370–374, 386–387 Clock interrupt, 138 Clock replacement policy, 370–374 Cloned () processes, 197–198 Clusters, 176, 593–594, 728–740 Beowulf, 738–740 computer architecture, 732–733 configurations, 728–731 failure management, 731 Linux, 738–740 load balancing, 731 New Technology File System (NTFS), 593–594 OS design, 731–732 parallelizing computation, 731–732 SMP compared to, 176, 733 Sun (Solaris), 735–738 Windows Cluster Server (Wolfpack), 733–735, 738 Commands, TinyOS, 626 Common Object Request Broker Architecture (CORBA), 772–776 Communication lines, security of, 641, 642–643 Compaction of memory, 320 Compare & swap instruction, 217–218 Compatible Time-Sharing System (CTSS), 63–64 Compile-time defenses, 692–694 Composite objects, 771 Computer systems, 6, 7–49 cache memory, 29–33 central processing unit (CPU), 8–9 input/output (I/O), 8–9, 33–36 instruction execution, 12–15, 17–20 interrupts, 15–26 main memory, 8–9, 29–33, 39–40 memory, 8–9, 26–33, 35–36, 39–46 procedure control, 46–49 processors, 8–26, 46–49 registers, 8–12 stacks, 10, 46–49 system bus, 8–9 two-level memory, 39–46 Concurrency, 106, 205–308, 744–764 atomic operations, 207, 289–290 critical section, 207, 212, 300–301 deadlock, 106, 213, 219, 262–308 dining philosophers problem, 282–286 livelock, 207 mechanisms for, 219–220 message passing, 239–245, 248–249, 286–287 monitors and, 232–239, 284–286 mutual exclusion, 106, 205–261, 745–751 OS concerns, 210–211 principles of, 207–216 process interaction, 211–215 producer/consumer problem example for, 226–232, 234–236, 244–245 race conditions, 207, 210, 751–758 semaphores, 219–232, 245–247, 283–284, 287–288, 292–294, 297, 751–764 software approaches for, 745–751 Solaris thread synchronization primitives, 295–298 starvation, 106, 213, 207, 282–286 synchronization, 239–241, 245–249, 295–298 UNIX mechanisms, 286–295 Windows mechanisms, 298–301 Condition codes, 11 Condition variables, 233–239, 297–298, 301, 617–620 eCos, 617620 monitors, 233–239 Solaris, 297–298 thread synchronization, 297–298, 617–620 Windows concurrency, 301 Confidentiality of information, 71, 636–637 Configuration manager, Windows, 85 Constant angular velocity (CAV), 541 Constant linear velocity (CLV), 547 Consumable resources, deadlock and, 268 Containment, object-oriented design, 771 Context data, 110 Contiguous allocation, 572–573 Control and status registers, 9, 11–12 Control bits, 354 Control mode, 135 Control objects, Windows, 89 Coroutines, 745 Counting (general) semaphores, 220–222 Criminal intruders, 645–646 Critical resources, 212 Critical sections, 207, 212, 300–301 D Data, 10, 13, 71, 109–110, 384–386, 540–542, 585, 636, 641–642, 708–709 blocks, 585 disk drive storage, 540–542 distributed processing (DDP), 708–709 integrity, 71, 636 organization and formatting, 540–542 paging structures, 384–386 processing, 13, 109–111 registers, 10 security threats, 641–642 set, 109–111 Database, 553–554, 711, 714–716 client/server applications, 714–716 I/O files, 553–554 relational, 711 Deadline scheduling, 472–476, 531–532 aperiodic tasks, 474–476 completion, 472–474 disk scheduling, I/O, 531–532 Linux, 531–532 periodic tasks, 473–474 priorities, 472 starting, 472, 475–476 Deadlock, 66, 106, 207, 213, 219, 262–308 algorithm for detection, 279–280 avoidance, 273–279 banker’s algorithm, 275–277 circular wait processes and, 271, 273 concurrency and, 106, 207, 213, 219, 262–308 conditions for, 66, 271–272, 297–298 consumable resources, 268 detection, 279–281 dining philosophers problem, 282–286 hold and wait process and, 271, 272 integrated strategy for, 281–282 joint progress diagrams, 264–267 Linux kernel concurrency mechanisms, 289–295 mutual exclusion and, 271, 272 no preemption and, 271, 272–273 prevention, 272–273 principles of, 263–272 process initiation denial, 274 recovery, 280–281 resource allocation, 268–270, 275–279 reusable resources, 267–268 safe states, 275–277 Solaris thread synchronization primitives, 295–298 UNIX concurrency mechanisms, 286–288 unsafe states, 275–277 Windows concurrency mechanisms, 298–301 Deception, security threats of, 638–639 Decision mode, 413 Dedicated process assignment, 461, 463–465 Deferred service routine (DSR), 613 Dekker’s algorithm, 745–750 Demand cleaning policy, 381 Demand paging, 366 Denial of service attacks, 643 Dentry objects, Linux, 589, 591 Descriptors, Windows security, 699–701 Device drivers, 84, 98, 534, 556, 612–614 Digital immune system, 687–688 Digital versatile disk (DVD), 548–549 Direct access tables, 400–401 Direct addressing, 241 Direct (hashed) files, 560, 562 Direct memory access (DMA), 35–36, 498–501 Disabled interrupts, 22–23 Discretionary access control (DAC), 675–679, 699 Disk allocation tables, 574 Disk block descriptors, 384–386 Disk cache, 39–40, 523–526 design considerations for, 523–525 I/O system management, 523–526 least frequently used (LFU) algorithm, 523–525 least recently used (LRU) algorithm, 523–526 memory, 39–40 performance considerations for, 525–526 Disk scheduling, 507–514, 530–533 anticipatory scheduler, 532–533 circular SCAN (CSCAN), 511–512, 514 deadline scheduler, 531–532 elevator scheduler, 530–531 first-in-first-out (FIFO), 510–512 FSCAN, 512, 514 I/O system management, 507–514, 530–533 last-in-first-out (LIFO), 512–153 Linux, 530–533 N-step SCAN, 512, 514 performance parameters, 507–510 policies, 510–514 priority (PRI), 512–513 rotational delay, 508 SCAN, 511–514 seek time, 507–508 shortest service time first (SSTF), 511–513 transfer time, 508–509 Dispatcher objects, 89, 298–300 Dispatcher program, 111 Disruption, security threats of, 639–640 Distributed object computing (DOC), 772–773 INDEX Distributed operating systems, 80 Distributed processing, 707–743 Beowulf, 738–740 client/servers, 711–721, 726–727 clusters, 728–740 data (DDP), 708–709 Linux, 738–740 message passing, 722–724 remote procedure calls (RPC), 724–728 Solaris Sun, 735–738 systems, 707–743 Windows, 733–735, 738 Double buffering, 505, 506 Dynamic allocation, 570, 583–584 Dynamic link libraries (DLLs), 344 Dynamic linker, 343–344 Dynamic linking, Linux, 95–96 Dynamic partitions for memory, 316, 319–322 Dynamic run-time loading, 342 Dynamic scheduling, 461, 465–466 E EFLAGS, Pentium, 131–133 Elevator scheduler, 530–531 E-mail viruses, 656–657 Embedded configurable operating system (eCos), 607–622 components, 610–614 configurability, 607–210 hardware abstraction layer (HAL), 610–611 I/O device drivers, 612–614 kernels, 611–612 schedulers, 614–616 thread synchronization, 615–621 Embedded systems, 601–633 characteristics of, 605–607 configurability, 605 configurable operating system (eCos), 607–622 I/O device flexibility, 605 interrupts, 606 protection mechanisms, 606 purpose-built OS, 607 reactive operation, 605 real-time operation, 605 TinyOS, 622–631 types of 603–605 Encapsulation, 88, 769 Encrypted viruses, 655 Encryption, Windows, 535–536 Environmental subsystems, Windows, 86 Event flags, 220, 620 Event object, Windows, 300 Events, TinyOS, 626 Exchange instruction, 218–219 Execute stage, 12–15 Executive modules, Windows, 84–85 Exit process state, 118 Exponential averaging, 420 External fragmentation of memory data, 320 F Failed mutual exclusion errors, 66 Failure management, clusters, 731 Fair-share scheduling, 429–432 Fat client, 717 Fatal region, 265 Feedback scheduling, 413–416, 423–424 Fetch policy, 366 Fetch stage, 12–15 Field, I/O files, 553 File allocation, 570–574, 583–584 chained, 573–574 contiguous, 572–573 indexed, 574–575 portion size, 571–572 preallocation versus dynamic, 570 UNIX, 583–584 File allocation table (FAT), 570, 588 File directories, 562–566, 584 contents of, 562–564 naming, 565–566 pathname, 565 structure of, 564–565 tree-structure approach, 564–566, 584 UNIX, 584 working, 566 File objects, Linux, 589, 591 File tables, 128 Files, 98, 494–600, 718–719 access control, 579–580, 585–587 access method, 556 architecture, 555–556 basic system (physical I/O), 556 blocking records, 568–570 cache consistency, 718–719 database, 553–554 device drivers for, 556 direct (hashed), 560, 562 directories, 562–566, 584 disk scheduling, 507–514, 530–533 disk storage, 540–550 field, 553 functions, 556–557 I/O management for, 494–550 indexed, 559–560, 562 indexed sequential, 559–560, 561–562 input/output (I/O), 494, 551–600 Linux, 98, 529–533, 587–592 logical I/O system, 556 management systems, 554–557 New Technology File System (NTFS), 591–597 organization and access, 558–562 pile, 558–560 record blocking, 568–570 records, 553–554 secondary storage management, 570–578 security, 578–580, 585–587 sequential, 559–561 sharing, 567–568 structure, 553–554 SVR4, 526–529 system drivers, 534 systems, 552–553 UNIX, 526–529, 580–587 virtual file system (VFS), 587–592 Windows, 533–536, 591–597 Finished state, 165 Firewalls, 146–147 First-come-first-served (FCFS) discipline, 413–417, 461 First-in-first-out (FIFO), 222–224, 369–370, 510–512 disk scheduling for I/O, 510–512 memory management process, 222–224, 369–370 replacement policy, 369–370 semaphores, 222–224 Five-state process model, 117–121 Fixed-allocation replacement policy, 375–376 Fixed-head disks, 542 Fixed partitions for memory, 316–319 Fixed record blocking, 568–570 Flags, 11, 220, 620, 699 Floppy disk, 543 Flush operations, 184 Frames, 312, 326–327, 368–374 locking, 368–374 815 memory management, 312, 326–327 replacement policies using, 368–374 virtual memory management, 368–374 Free block list, 576–577 Free space management, 574–577 FSCAN policy, 512, 514 Functions, 33–36, 497–501, 501–503, 556–557 communication modules, as, 33–36, 497–498 direct memory access (DMA), 35–36, 498–501 evolution of, 498–499 file system management, 556–557 input/output (I/O) system, 33–36, 497–501, 501–503 interrupt-driven I/O, 34–35, 498 logical structure of, 501–503 programmed I/O, 33–34, 497–498 Fuzzing, 334 G Gang scheduling, 461, 462–463 Generic decription (GD), 686–687 Global file system, Sun Cluster, 737–738 Global replacement, 375–377 Grant operations, 183 Granularity, 453–457 coarse-grained parallelism, 454 fine-grained parallelism, 455 hybrid threading, 455–457 independent parallelism, 453–454 medium-grained parallelism, 454–455 multiprocessor scheduling and, 453–457 Graphical user interface (GUI), 84, 714 Guard pages, 696–697 H Hackers, 644–654 Handspread, 387 Hard affinity policy, 190 Hardware, 15, 216–219, 346–365, 534, 641 device drivers, Windows, 534 failure interrupts, 15 interrupt disabling, 216 machine-instruction approaches, 217–219 mutual exclusion, support for, 216–219 security threats, 641 virtual memory management, 346–365 Hardware abstraction layer (HAL), 84, 610–611 Hash tables, 400–403 Hashed (direct) files, 560, 562 Hashed passwords, 669–671 High-definition (HD DVD) disks, 548–550 Highest response ratio next (HRRN) scheduling, 413–416, 422–423 Hit ratio (H), 27–28, 44–45 Hold and wait process, deadlock prevention using, 271, 272 Host-based intrusion detection, 145, 681, 683–684 Hybrid threading, 455–457 I Identifiers, 110 Improper synchronization errors, 66 Index registers, 10 Indexed allocation, 574–575 Indexed files, 559–560, 562 Indexed sequential files, 559–560, 561–562 Indirect addressing, 241–242 816 INDEX Infection mechanism (vector), 652, 655 Information protection, see Security Inheritance, 88, 769–770 Inodes, 581–583, 585, 589–591 Linux objects, 589–591 table, 585 UNIX, 581–583 Input/output (I/O), 8–9, 13, 15–26, 33–36, 110, 128, 184, 494–600 See also Files address register (I/OAR), 8–9 asynchronous, 534–535 buffer register (I/OBR), 8–9 buffering, 504–507 channel, 499 communication techniques, 33–36 devices, 496–497, 540–550 direct memory access (DMA), 35–36, 498–501 disk cache, 523–526 disk scheduling, 507–514, 530–533 files, 494, 551–600 functions, 33–36, 497–501, 501–503 instruction execution and, 13, 15 interrupt-driven, 34–35, 498 interrupts, 15–26 Linux, 529–533, 587–592 management, 494–550 microkernels, management using, 184 modules, 8–9, 13, 15 processor, 499 programmed, 33–34, 497–498 RAID, 514–523 status information, 110 storage devices, 540–550 SVR4, 526–529 synchronous, 534–535 system design, 501–503 tables, 128 UNIX, 526–529, 580–587 Windows, 84, 530, 533–536, 591–597 Insider attacks, 646 Instantiation of objects, 88, 769 Instruction execution, 12–15, 17–20 See also Direct memory access (DMA) execute stage, 12–15 fetch stage, 12–15 I/O module function for, 15 interrupts and, 17–20 processors and, 12–15 Instruction registers (IR), 11, 14 Integer operations, Linux atomic, 289–290 Integrity of information, 636–637 Interface identification language (IDL), 774–776 Interfaces, 51–53, 145, 629–631, 682, 771, 773–774 intrusion detection systems, 145, 682 objects, 771, 773–774 operating system, 51–53 TinyOS, 629–631 user, 51–53, 145, 682 Internal fragmentation of memory, 318 Interrupt-driven I/O, 34–35, 498 Interrupt service routines (ISR), 467–468, 612 Interrupts, 15–26, 99, 137–139, 184, 194–195, 216, 606 clock (time slice), 138 disabled, 22–23, 216 embedded OS, 606 handler routine, 17–18 hardware failure, 15 input/output (I/O), 15, 138 instruction cycle and, 17–20 Linux, 99 memory fault, 138 microkernels, management using, 184 multiple, 22–25 multiprogramming and, 25–26 mutual exclusion and, 216 printer service routine (ISR), 24 process switching, 137–139 processing, 20–22 program, 15 request, 17 Solaris process management and, 194–195 stage, 17 threads, as, 194–195 timer, 15 Intruders, 144, 643–647 behavior patterns, 644–646 clandestine users, 144, 643 criminals, 645–646 hackers, 644–654 insider attacks, 646 masqueraders, 144, 643 misfeasors, 144, 643 security threats of, 144, 643–647 Intrusion detection systems (IDSs), 145, 680–685 analyzers, 145, 682 audit records, 684–685 false positives and negatives, 682 host-based, 145, 681, 683–684 network-based, 145, 681 sensors, 145, 681–682 user interface, 145, 682 Inverted page tables, 353–355 J Job, serial processing, 55 Job control language (JCL), 57–58 Joint progress diagrams, 264–267 Journaling, NTFS, 593 K Kernel-level threads (KLTs), 168, 172–173, 191–192 Kernels, 53, 58, 77, 84, 91–93, 97–100, 135–136, 289–295, 387–389, 611–612 See also Microkernels eCos, 611–612 Linux concurrency mechanisms, 289–295 main memory and, 53 memory allocator, 387–389 microkernel architecture using, 77 Microsoft Windows operating systems, 84 mode, 58, 135–136 modules, Linux, 96–97 monolithic, 77 process control execution and, 135–136 UNIX, 91–93, 387–389 virtual memory management, 387–389 Key field for sequential files, 560 L Last-in-first-out (LIFO) implementation, 46, 512–153 Layered operating systems, 179–180 Least frequently used (LFU) algorithm, 523–525 Least recently used (LRU) algorithm, 33, 368–369, 523–526 disk cache, 523–526 replacement policy, 33, 368–369 virtual memory management, 368–369 Lightweight processes (LPW), 191, 191–192 Linear hashing, 42–403 Linking, 338–339, 342–344 dynamic, 343–344 linkage editor, 342–343 loading and, 338–339 memory management, 338–342 Linux, 4, 94–100, 103–104, 195–198, 289–295, 299, 389–392, 481–485, 487, 529–533, 587–592, 696, 738–740 addressing, 389–391 atomic operations, 289–290 barriers, 294–295 Beowulf software and, 739–740 cloned () processes, 197–198 clusters, 738–740 components, Linux, 97–100 disk scheduling, 530–533 history of, 94–95 I/O devices, 529–533, 587–592 kernel components, 97–100 kernel concurrency mechanisms, 289–295 kernel memory allocation, 391 loadable modules, 95–96 modular structure of, 95–97 non-real-time scheduling, 482–485 objects, 589–591 page allocation, 390 page cache, 533 page replacement algorithm, 390–391 priorities for scheduling, 484 pthread (POSIX thread) libraries, 197 real-time scheduling, 481–482, 485 scheduling, 481–485, 487 semaphores, 292–294 signals, 98 spinlocks, 289–292 system calls, 98–100 thread management, 195–198 three-level page table structure, 389–391 time slices, 484 virtual file system (VFS), 587–592 virtual memory management, 389–392 Windows comparison with, 103–104, 299, 392, 487, 530, 592, 696, 738 Livelock, 207, 748 Load balancing, clusters, 731 Load control, 382–383 Load sharing, 460–462 Load-time dynamic linking, 343–344 Loadable modules, Linux, 95–96 Loading, 338–342 absolute, 340–342 dynamic run-time, 342 linking and, 338–339 memory management, 338–342 Local procedure call (LPC) facility, Windows, 85 Local replacement, 375–376, 377–381 Locality of reference, 28 Locks, 225, 296–297, 301 Log files, NTFS, 595–597 Logic bomb, 649 Logical address, 325, 328–329 Logical I/O file system, 556 Long-term scheduling, 406–409 Low-level memory management, 183–184 M Macro viruses, 655–656 Magnetic disk devices, 540–545 constant angular velocity (CAV), 541 data organization and formatting, 540–542 drive parameters, 545 gaps, 540 head, 540 multiple zone recording, 541 physical characteristics, 542–544 sectors, 541 tracks, 540 Mailboxes, 220, 241–242, 620–621 INDEX Main memory, 8–9, 29–33, 39–40, 53, 346–348 blocks, 30–32 cache memory and, 29, 30–33 computer system component of, 8–9 kernel (nucleus), 53 paging, 348 segmentation, 348 two-level memory and, 39–40 virtual memory compared to, 346–348 Malicious software (malware), 144–145, 647–651 See also Malware defense backdoor (trapdoor), 647–649 logic bomb, 649 mobile code, 650 multiple threat, 650–651 parasitic, 144, 647 security threats of, 144–145, 647–651 Trojan horse, 649–650 types of, 144, 647–648 Malware defense, 686–691 behavior-blocking software, 688–689 bot countermeasures, 691 digital immune system, 687–688 generic decription (GD), 686–687 rootkit countermeasures, 691 worm countermeasures, 690–691 Mandatory access control (MAC), 675 Many-to-many relationships, 173–174, 241–242 message passing, 241–242 thread, 173–174 Many-to-one relationship, 241–242 Map operations, 183 Mapping function, cache memory, 32–33 Masquerade attacks, 144, 638, 643 Master file table (MFT), NTFS, 594–595 Master/slave architecture, 176 Medium-term scheduling, 406–407, 49 Memory, 8–9, 26–33, 35–36, 39–46, 58, 68–71, 99, 110, 127, 178, 287, 309–403 See also Optical memory devices access control and, 69 access efficiency of, 43–45 addresses, 69 automatic allocation of, 68 auxiliary, 29 cache, 29–33 disk cache, 39–40 hierarchy, 26–33 hit ratio (H), 27–28, 44–45 long-term storage and, 69 main, 8–9, 28, 29–33, 39–40 modular programming and, 69 physical, Linux, 99 pointers, 110 process isolation of, 68 processor instructions and, 12 protection, 58, 69 secondary, 29 shared, 287 tables, 127 two-level, 39–46 UNIX, 287 virtual (paging), 39–40, 69–71, 345–403 Memory address register (MAR), 8–9, 14 Memory buffer register (MBR), 8–9, 15 Memory cards, 672 Memory faults, 138 Memory management, 62, 68–71, 178, 183–184, 309, 311–344, 383–394 buffer overflow attacks, 331–335 flush operations, 184 frames, 312, 326–327 grant operations, 183 linking, 338–339, 342–344 loading, 338–342 local organization, 314–315 low-level, 183–184 map operations, 183 microkernels, 183–184 multiprogramming, 62, 68–71 operating systems, 62, 68–71, 178 paging, 312, 326–330 partitioning, 315–326 physical organization, 315 protection, 313–314 relocation, 312–313, 324–326 requirements, 312–315 security, 331–335 segmentation, 312, 330–331 sharing, 314 symmetric multiprocessing (SMP), 178 virtual, 383–394 Messages, 184, 239–245, 248–249, 286–287, 722–724, 768–769 addressing, 241–242 blocking, 724 distributed passing, 722–724 encapsulation, 769 format of, 242–243 mailboxes, 241–242 microkernels and, 184 mutual exclusion and, 239–245, 248–249 objects and, 768–769 passing, 239–245, 248–249, 286–287 producer/consumer problem, solution using, 244–245 queuing discipline, 243, 248 readers/writers problem, solution using, 248–249 receive primitive, 239–241 reliability, 723–724 send primitive, 239–241 synchronization of, 239–241 UNIX concurrency using, 286–287 Metamorphic viruses, 655 Micro-electromechanical sensors (MEMS), 622 Microkernels, 77, 179–184 architecture, 77, 179–180 benefits of, 180–182 design, 182–183 I/O management,184 interprocess communications, 184 interrupt management, 184 low-level memory management, 183–184 messages, 184 performance, 182 ports, 184 Microsoft Windows, see Windows Middleware, 711, 719–721 Misfeasors, 144, 643 Mobile code, 650 Modes, 58, 85–86, 135–136, 138–139 control, 135 execution, 135–136 kernel, 58, 135–136 switching, 138–139 system, 135 user, 58, 85–86 Modules, 8–9, 13, 15, 95–97 dynamic linking, 95–96 input/output(I/O), 8–9, 13, 15 kernel, 96–97 Linux structure of, 95–97 loadable, 95–96 stackable, 96 Monitors, 56–57, 220, 232–239, 284–286 batch systems, 56–57 broadcast condition for, 236–239 condition variables, 233–239 dining philosophers problem, solution 817 using, 284–286 mutual exclusion and, 220, 232–239 notify condition for, 236–239 producer/consumer problem, solution using, 234–236 signals and, 233–236 Monolithic operating systems, 179 Moveable-head disks, 542 Multilevel feedback, 424 Multipartite virus, 650 Multiple data streams, NTFS, 593 Multiple instruction multiple data (MIMD) streams, 176 Multiple instruction single data (MISD) streams, 176 Multiple-platter disks, 542 Multiple zone recording, 541 Multiprocessor scheduling, 452–493 design issues, 457–458 granularity, 453–457 kernel, 485 Linux, 481–485, 487 non-real-time, 482–485 processes and, 457–459 processors and, 457–458 real-time, 452–453, 466–482, 485, 493 SVR4, 485–486 thread, 459–466 time-shared, 486 UNIX, 485–486 Windows, 487–490 Multiprogramming, 25–26, 59–64, 68–73, 78–80, 82–83, 382–383 batch systems, 59–62 interrupts and, 25–26 level, 382–383 load control and, 382–383 memory management, 62, 68–71 resource management, 71–73 round-robin technique, 73 scheduling management, 71–73 symmetric multiprocessing (SMP) and, 78–80 time-sharing systems, 62–64 Windows single-user (multitasking), 82–83 Multiserver queues, 445–446 Multitasking, see Multiprogramming Multithreading, 77–79, 161–165, 187, 191–192 operating system process of, 77–79, 161–165 Solaris architecture, 191–192 Windows process of, 187 Mutex (mutual exclusion), 220, 222, 296–297, 300, 617–619 concurrency and, 220, 296–297 eCos, 617–619 lock, 296–297 object, Windows, 300 semaphores compared to, 222 Solaris, 296–297 thread synchronization, 296–297, 617–619 Mutual exclusion, 106, 205–261, 271, 272, 296–297, 745–751 compare & swap instruction, 217–218 deadlock prevention using, 271, 272 Dekker’s algorithm, 745–750 exchange instruction, 218–219 hardware support for, 216–219 interrupt disabling, 216 lock, 296–297 machine-instruction approaches, 217–219 message passing, 239–245, 248–249 monitors and, 220, 232–239 Peterson’s algorithm, 750–751 818 INDEX Mutual exclusion (Contd.) producer/consumer problem example for, 226–232, 234–236, 244–245 readers/writers problem example for, 245 requirements for, 215–216 semaphores and, 219–232, 245–247 software approaches for, 745–751 N Naming files, 565–566 Network-based intrusion detection, 145, 681 Network device drivers, 98, 534 Networks, 98, 622–623, 642–643, 657–658, 711–713 client/server, 711–713 protocols, Linux, 98 security, 642–643 wireless sensor, 622–623 worm programs, 657–658 New process state, 118 New Technology File System (NTFS), 591–597 clusters, 593–594 file structure, 593–595 journaling, 593 log files, 595–597 multiple data streams, 593 recoverability, 591–593, 595–597 security, 593 volume, 593–595 No preemption deadlock prevention using, 271, 272–273 Non-real-time scheduling, 482–485 Nondeterminate program operation errors, 66 Nonpersistant binding, 726 Nonprocess kernel, 140 Nonuniform memory access (NUMA) systems, 367 Notify monitor condition, 236–239 N-step SCAN policy, 512, 514 O Object-oriented design, 80, 765–776 benefits of, 772 Common Object Request Broker Architecture (CORBA), 772–776 concepts of, 80, 767–771 motivation for, 766 terms of, 766 Object request brokers (ORB), 773 Objects, 85, 88–90, 186–188, 298–300, 589–591, 767–771 attributes, 767–768 classes, 88, 769–771 composite, 771 concurrency and, 298–300 containment, 771 control, 89 dentry, 589, 591 dispatcher, 89, 298–300 encapsulation, 88, 769 file, 589, 591 inheritance, 88, 769–770 inode, 589–591 instance, 88, 769 interfaces, 771 LINUX, 589–591 manager, 85 messages, 768–769 methods, 768 polymorphism, 88, 770–771 structure for object-oriented deign, 767–769 superblock, 589–590 thread, 186–188 variables, 767–768 virtual file system (VFS), 589–591 Windows operating system, 85, 88–90, 186–188, 298–300 One-to-many relationships, 174–175, 241–242 message passing, 241–242 thread, 174–175 One-to-one relationship, 241–242 Operating systems, 1–5, 6–106, 126–128, 140–143, 178–179, 365–383, 731–732 achievements of, 64–76 batch systems, 55–62 clusters and design issues, 731–732 computer systems, 6, 7–49 control structures, 126–128 developments of, 77–80 distributed, 80 evolution of, 54–64 execution of, 140–143 kernel (nucleus), 53, 58, 77, 84, 93, 97–100, 178 Linux, 4, 94–100 memory management, 62, 68–71, 178 microkernel architecture, 77 Microsoft Windows, 2, 4, 80–90 multiprogramming, 59–62 multithreading, 77–79 objectives and functions of, 51–55 overview of, 50–106 process, 65–68 process-based, 143 reader’s guide, 1–5 resource management and, 53–54, 71–73 scheduling, 55, 71–73, 178 serial processing, 55 structure of, 73–76 symmetric multiprocessing (SMP), 78–80, 178–179 tables for, 127–128 time-sharing systems, 62–64 UNIX, 2, 4, 90–94 user/computer interface of, 51–53 virtual memory, software for, 365–383 Web resources, 4–5 Optical memory devices, 544–550 Blu-ray (BR), 549–550 CD recordable (CD-R), 547 CD rewritable (CD-RW), 547–548 CD-ROM, 544–547 constant linear velocity (CLV), 547 digital versatile disk (DVD), 548–549 high-definition (HD DVD), 548–550 products, 546 Optimal (OPT) replacement policy, 368–369 Overflow with chaining, 403 P Page buffering, 374 Page cache, LINUX, 533 Page fault frequency (PFF), 380 Page frame data tables, 384–386 Page numbers, 354 Page tables, 326, 350–355, 384–385, 389–390 entry (PTE), 352–353 inverted, 353–355 Linux three-level structure, 389–390 paging use of, 350–355 structure, 351–353 UNIX use of, 384–385 Paging, 312, 326–330, 348, 349–360, 362–363, 366, 384–387, 393–394 address translation and, 326–329 associative mapping, 357 data structures, 384–386 demand, 366 fetch policy for, 366 frames, 312, 326–327 main (real) memory, 348 memory management, 312, 326–330, 348–360, 362–363, 366 page faults, 356 page size, 358–360 process pages, 326–327 replacement policies, 386–387 segmentation combined with, 362–363 Solaris, 384–387 tables, 326, 350–355, 384–385 translation lookaside buffers (TLB), 355–358 UNIX, 384–387 virtual memory, 348–360, 362–363, 366, 393–394 Windows, 393–394 Parallelism, granularity of, 453–457 Parallelizing computation, clusters, 731–732 Parameters, 507–510, 545, 726 disk scheduling performance, 507–510 magnetic disk drive, 545 message representation, 726 passing, 726 remote procedure calls (RPC), 726 Parent process, 116 Partition boot sector, NTFS, 594 Partitioning, 315–326 buddy system, 322–324 compaction, 320 dynamic, 316, 319–322 external fragmentation, 320 fixed, 316–319 internal fragmentation, 318 memory, 315–326 placement algorithms, 318–319, 321–322 relocation, 324–326 replacement algorithm, 322 size, 317–318 Passive attacks, 642 Password-based authentication, 668, 669–672 hashed passwords, 669–671 UNIX implementations, 671–672 user identification (ID), 668–672 Pathname, 565 Periodic tasks, 467, 473–474, 476–478 Persistent binding, 726–727 Peterson’s algorithm, 750–751 Physical address, 325–239 Physical memory, Linux, 99 Pile files, 558–560 Pipes, UNIX, 286 Placement algorithms for memory, 318–319, 321–322 Placement policy, 367 Plug-and-play manager, Windows, 85 Poisson arrival rate, 446 Polymorphic viruses, 655–656 Polymorphism, 88, 770–771 Ports, microkernels and, 184 Power manager, Windows, 85 Preallocation, 570 Precleaning, 381 Prepaging, 366 Printer interrupt service routine, 24 Priorities, 110, 411–412, 472, 478–481, 484–486, 488–490, 512–513 ceiling approach, 481 deadline scheduling, 472 disk scheduling (PRI), I/O, 512–513 inheritance, 479–481 inversion scheduling, 478–481 Linux, 484 process control, 110 INDEX queuing, 411–412 scheduling, 411–412, 478–481, 484, 488–490 SVR4 classes, 485–486 unbounded inversion, 479–480 Windows, 488–490 Privileged instructions, batch systems, 58 Process control, 110–111, 126–140, 151–152 block, 110–111, 128–131, 134–135 creation, 136–137 execution modes, 135–136 identification, 130–131 information, 130, 133–134 operating system structures, 126–128 state information, 130–131 structures, 128–140 switching, 137–140 tables for, 127–128 UNIX SVR4, 151–152 Process identifier, 354 Process initiation denial, deadlock avoidance strategy, 274 Process management, 105–308, 736 concurrency, 106, 205–308 control, 105, 107–157 deadlock, 106, 213, 219, 262–308 description, 105, 107–157 Linux, 195–198, 289–295 microkernels, 106, 179–184 mutual exclusion, 106, 205–261 Solaris, 190–195, 295–298 starvation, 106, 207, 213, 219 Sun Cluster, 736 SVR4, 147–152 symmetric multiprocessors (SMP), 106, 175–179, 185–195 synchronization, 166–167, 205–261 threads, 106, 161–175, 185–198 UNIX, 147–152, 286–288 Windows and, 185–190, 298–301 Process/thread manager, Windows, 85 Processes, 65–68, 78–80, 105, 107–157, 383, 457–459 assignment to processors, 457–458 concepts of, 65–68, 108–111 control, 110–111, 126–140, 151–152 control block, 110–111, 128–131, 134–135 creation, 115–116, 136–137 description, 126–135, 149–151 dispatching, 458 errors, 66 execution, 67, 135–136, 140–143 identification, 130–131 image, 129 load control, 383 mode switching, 138–139 multiprocessor scheduling, 457–459 multithreading, 77–78 operating system execution, 140–143 program code, 109–111 scheduling, 458 security of, 143–147 set of data, 109–111 spawning, 115 states, 67–68, 110, 111–126, 130–131, 147–149 suspended, 121–126, 383 symmetric multiprocessing (SMP), 78–80 switching, 137–138 tables, 128 termination, 116–117 UNIX SVR4 management, 147–152 Processors, 8–26, 46–49, 57, 457–458 accumulator (AC), 13–14 assignment of processes to, 457–458 batch systems, 57 central processing unit (CPU), 8–9 execute stage, 12–15 fetch stage, 12–15 input/output (I/O), 13, 15 instruction execution and, 12–15, 17–20 instruction registers (IR), 11, 14 interrupts, 15–26 multiprocessor scheduling design, 457–458 multiprogramming on individual, 458 program counters (PC), 11, 14 registers, 9–12 stack, 10, 46–49 Program code, 109–111 Program counters (PC), 11, 14, 110 Program interrupts, 15 Program projects, 157–159, 447–451, 777–784 animation, 778–779 Ben-Ari Concurrent Interpreter (BACI), 783–784 developing a shell, 157–159 host dispatcher shell, 447–451 machine problems (MPs), 781 Nachos, 783–784 reading/report assignments, 782 research, 782 simulations, 779–780 textbook-defined, 780–781 writing assignments, 782 Program status word (PSW), 11, 131–133 Programmed I/O, 33–34, 497–498 Pseudocode, Pthread (POSIX thread) libraries, 197 Pushdown implementation, 46 Q Queues, 117–121, 222–224, 243, 248, 443–446, 528–529, 615–616 character, SVR4, 528–529 dispatching discipline for, 444 message passing, discipline for, 243, 248 multilevel scheduler, eCos, 615–616 multiserver, 445–446 process states and, 117–121 semaphores and, 222–224 single-server, 443–444 Queuing, 411–412, 424–427, 440–446 analysis, 424–427, 441–443 notation for, 443 Poisson arrival rate and, 446 priority, 411–412 scheduling, 411–412, 424–427, 440–446 systems, 440–446 R Race conditions, 207, 210, 751–758 RAID, 514–523, 535 data transfer capacity, 519 hardware, 535 I/O system management, 514–523 level (stripping), 516–519 level (mirroring), 516–517, 519–520 level (parallel access), 516–517, 520 level (parallel access), 516518, 520–521 level (independent access), 516, 518, 521–522 level (independent access), 516, 518, 522 level (independent access), 516, 518, 522–523 redundancy, 521 request rate, 519 software, 535 819 Windows, 535 Rate monotonic scheduling (RMS), 476–478 Reactive operation, embedded systems, 605 Reader-writer mechanisms, 292, 294, 301 concurrency and, 292, 294, 301 locks, 301 semaphores, 294 spinlocks, 292 Ready process state, 117, 187 Real-time operation, embedded systems, 605 Real-time scheduling, 452–453, 466–482, 493 deadline, 472–476 dynamic best-effort approaches, 471 dynamic planning-based approaches, 471 fail-safe operation for, 468–469 interrupt service routing (ISR), 467–468 Linux, 481–485 multiprocessors and, 452–453 non-real-time and, 485 operating system (OS) characteristics, 467–469 priorities, 472, 478–481, 484, 488–490 priority inversion, 478–481 processes, 469–472 rate monotonic (RMS), 476–478 static priority-driven preemptive approaches, 471 static table-driven approaches, 471 tasks for, 466–467 UNIX, 485–486 Receive primitives, 239–241 Records, 553–554, 568–570 blocking, 568–570 I/O file management, 553–554 Registers, 8–12 control and status, 9, 11–12 memory address (MAR), 8–9 memory buffer (MBR), 8–9 program status word (PSW), 11 user-visible, 9, 10–11 Relative address, 325, 328 Release of message contents attacks, 642 Remote procedure calls (RPC), 165–166, 724–728 asynchronous, 727 client/server binding, 726–727 object-oriented mechanisms, 727–728 parameters, 726 synchronous, 727 threads used for, 165–166 Replacement policies, 33, 322, 367–374, 375–381, 386–387, 390–391 algorithms, 33, 322 cache size and, 374 clock algorithm, 370–374 first-in-first-out (FIFO), 369–370 fixed allocation, 375–376 frame locking, 368–374 global, 375–377 least recently used (LRU), 33, 368–369 Linux algorithm, 390–391 local, 375–376, 377–381 optimal (OPT), 368–369 page buffering, 374 resident set management and, 375–381 scope, 375–376 two-handed clock algorithm, 386–387 UNIX, 386–387 variable allocation, 375–381 virtual memory management, 367–374, 386–387, 390–391 Replacement scope, 375–376 Replay attacks, 643 820 INDEX Resident monitor, 56 Resident set management, 347, 375–381 fixed-allocation replacement policies, 375–376 global replacement, 375–377 local replacement, 375–381 page fault frequency (PFF), 380 replacement scope, 375–376 size of sets, 375 variable-allocation replacement policies, 375–381 variable-interval sampled working set (VSWS), 380–381 working set strategy, 377–380 Resource allocation, 268–270, 275–279 deadlock and, 268–270, 275–279 denial, 275–279 graphs, 268–270 Resource management, 53–54, 71–73 kernel (nucleus), 53 operating system responsibilities, 53–54 round-robin technique, 73 scheduling and, 71–73 Response time, 411, 413, 438–440 ranges, 438–439 scheduling criteria of, 411, 413 system, 439–440 user, 439 Reusable resources, deadlock and, 267–268 Role-based access control (RBAC), 675, 679–680 Rootkits, 661–663, 691 classification of, 662 installation, 662 malware countermeasures, 691 system-level call attacks, 662–663 Rotational delay, 508 Rotational position sensing (RPS), 508 Round-robin techniques, 73, 117, 413, 417–419 multiprogramming, 73 processor operation, 117 scheduling, 413, 417–419 Running process state, 117, 189 Run-time defenses, 694–697 Run-time dynamic linking, 344 S Safe states, resource allocation, 275–277 Salt value of passwords, 669 SCAN policy, 511–514 Scanrate, 387 Scheduling, 55, 71–73, 404–493, 614–616, 627 See also Disk scheduling algorithms, 410–432 bitmap, 615–616 decision mode, 413 eCos, 614–616 embedded operating systems, 614–616, 627 fair-share, 429–432 feedback, 413, 423–424 first-come-first-served (FCFS) discipline, 413, 414–417 highest response ratio next (HRRN), 413, 422–423 Linux, 466–485, 487 long-term, 406–409 medium-term, 406–407, 49 multilevel queue, 615–616 multiprocessor, 452–493 non-real-time, 482–485 OS management, 71–73 performance comparison, 242–429 priority queues, 411–412 queuing, 411–412, 440–446, 424–427 real-time, 452–453, 466–482, 493 response time, 411, 413, 438–440 round robin, 413, 417–419 selection function, 412–413 serial processing problems, 55 shortest process next (SPN), 413, 418–422 shortest remaining time (SRT), 413, 422 short-term, 406–407, 409–411 simulation modeling, 426–429 SVR4, 485–486 tinyOS, 627 turnaround time (TAT), 411, 414 uniprocessor, 404–446 UNIX, 432–434 Windows, 487–490 Secondary memory, 29 Secondary storage management, 570–578 bit tables, 575–576 blocks and, 570–577 chained free portions, 576 disk allocation tables, 574 file allocation, 570–574 free block list, 576–577 free space management, 574–577 indexing approach, 576 reliability, 578 volume, 577 Security, 71, 85, 143–147, 331–335, 578–580, 593, 634–706 authenticity of information, 71, 637 access control, 146, 579–580, 675–680, 697–698 accountability, 637–638 authentication, 145–146, 668–675 availability, 636–637 buffer overflow (overrun) attacks, 331–335, 692–697 confidentiality, 636–637 countermeasures, 145–147 file management systems, 578–580 firewalls, 146–147 fuzzing, 334 integrity, 636–637 intrusion detection systems (IDSs), 145, 680–685 malware defense, 686–691 memory management, 331–335 New Technology File System (NTFS), 593 OS systems, 71 process, 143–147 reference monitor, Windows, 85 stack overflow, 332–334 system access, 143–145, 146 techniques, 634, 667–706 threats, 143–145, 634–666 Windows, 593, 696, 697–701 Security threats, 143–145, 634–666 assets and, 640–643 attacks, 642–643 bots (zombies), 659–661 communication lines, 641, 642–643 data, 641–642 deception, 638–639 disruption, 639–640 hardware, 641 intruders, 144–145, 643–647 malicious software (malware), 144–145, 647–651 rootkits, 661–663 software, 641 unauthorized disclosure, 638–639 usurpation, 639–640 viruses, 651–657 worms, 657–659 Seek time, 507–508 Segment pointers, 10 Segmentation, 312, 330–331, 348, 361–365 main (real) memory, 348 memory management, 312, 330–331 organization, 361–362 paging combined with, 362–364 protection and sharing policies for, 364–365 virtual memory, 348, 361–365 Selection function, 412–413 Semaphore objects, Windows, 300 Semaphores, 219–232, 246–247, 283–284, 287–288, 292–294, 297, 617, 751–764 barbershop problem using, 758–764 binary, 220, 221–222, 292–294 counting (general), 220–222, 292–294, 297 dining philosophers problem, solution using, 283–284 eCos, 617 first-in-first-out (FIFO) process, 222–224 Linux kernel concurrency and, 292–294 locks, 225 mutex compared to, 222 mutual exclusion and, 219–232, 246–247 producer/consumer problem, solution using, 226–232 queues for, 222–224 race conditions and, 751–758 reader-writer, 294 readers-writers problem, solution using, 246–247 Solaris, 297 solutions using, 224–226 strong, 222–223 thread synchronization, 297, 617 UNIX concurrency using, 287–288 weak, 223 send primitives, 239–241 Sensors for intrusion detection, 145, 681–682 Sequential files, 559, 560–561 Sequential search, 401 Serial processing, 55 Service processes, Windows, 85–86 Setup time, 55 Shadow copies, Windows, 535 Shared-memory multiprocessor, 176 Sharing files, 567–568 Shortest process next (SPN) scheduling, 413–416, 418–422 Shortest remaining time (SRT) scheduling, 413, 422 Shortest service time first (SSTF) policy, 511–513 Short-term scheduling, 406–407, 409–411 Signals, 98, 233–236, 288 concurrency and, 233–236, 288 Linux, 98 monitors and, 233–236 UNIX, 288 Simulation modeling for scheduling, 426–429 Simultaneous access for file sharing, 568 Single buffering, 504–506 Single instruction multiple data (SIMD) streams, 175–176 Single instruction single data (SISD) streams, 175 Single-server queues, 443–444 Slots (lines) of memory, 30–31 INDEX Smart cards, 672–673 Soft affinity policy, 190 Software, 365–383, 535, 641, 688–689, 739–740, 745–751 See also Malicious software behavior-blocking, 688–689 Beowulf, 739–740 Dekker’s algorithm, 745–750 mutual exclusion, approaches for, 745–751 Peterson’s algorithm, 750–751 RAID, 535 security threats, 641 virtual memory, 365–383 Solaris, 94, 190–195, 295–298, 383–389, 735–738 buddy systems algorithm, 387–389 condition variables, 297–298 kernel memory allocator, 387–389 mutex (mutual exclusion) lock, 296–297 paging system, 384–387 reader-writer lock, 297 semaphores, 297 Sun Cluster, 735–738 Symmetric multiprocessing (SMP) management, 190–195 thread management, 190–195 thread synchronization primitives, 295–298 two-handed clock page replacement algorithm, 386–387 UNIX operating system, 94 virtual memory management, 383–389 Spanned blocking, 568–569 Spatial locality, 42 Spawn state, 165 Special system processes, Windows, 85 Spin waiting technique, 218 Spinlocks, 207, 220, 289–292, 621 basic (plain), 291–292 concurrency and, 207, 220, 289–292 eCos, 621 Linux kernel concurrency mechanisms, 289–292 reader-writer, 292 thread synchronization, 621 Stackable modules, Linux, 96 Stacks, 10, 46–49, 332–334, 694 base, 47 frame, 48–49 implementation, 46–47 last-in-first-out (LIFO) implementation, 46 limit, 47 overflow, 332–334, 694 pointer, 10, 47 procedure calls and returns, 47–49 procedure control, 46–49 protection mechanisms, 694 pushdown implementation, 46 reentrant procedures, 49 Standard C Libraries, 614 Standby state, 188 Starvation, 106, 207, 213, 219 States, 67–68, 110, 111–126, 130–131, 147–149, 165–166, 187–189, 275–277 block, 165 blocked/waiting, 117 control information, 130–131 creation, 115–116 deadlock and, 275–277 exit, 118 finish, 165 five-state process model, 117–121 Microsoft Windows management, 187–189 new, 118 process, 67–68, 110, 111–126, 130–131, 147–149 queues for, 117–121 ready, 117, 187 remote procedure calls (RPCs), 165–166 resource allocation, 275–277 running, 117, 189 safe, 275–277 spawn, 165 standby, 188 suspended, 121–126 swapping, 121–125 termination, 116–117, 189 thread, 165–166, 187–189 trace of, 111–113 transition, 118–120, 189 two-state process model, 114–115 unblock, 165 UNIX SVR4, 147–149 unsafe, 275–277 waiting, 189 Stealth viruses, 655 Storage devices, 540–550 I/O disks, 540–550 magnetic disks, 540–545 optical memory, 544–550 Structured Query Language (SQL), 711, 714 Subclasses (child class), 769–770 Sun Cluster, 735–738 communication support, 736 global file system, 737–738 networking, 736–737 object support, 735–736 process management, 736 Superblocks, 585, 589–590 Superclasses (parent class), 769–770 Supervisor call, 138 Suspended process states, 121–126 Swap-use tables, 384–385 Swappable space, 281 Swapping process states, 121–125 Switching processes, 137–140 Symmetric multiprocessing (SMP), 78–80, 87, 106, 175–179, 185–195, 733 architecture, 175–177 clusters compared to, 733 memory management, 178 Microsoft Windows management, 87, 185–190 organization, 177–178 operating systems and, 78–80, 178–179 process management, 106, 175–179, 185–195 Solaris management, 190–195 Synchronization, 166–167, 178, 205–261, 453–457, 615, 617–621, 727 condition variables, 220, 233, 617–620 eCos, 615, 617–621 event flags, 220, 620 granularity for multiprocessor scheduling, 453–457 mailboxes, 220, 620–621 message passing, 239–241 mutexes, 296–297, 617–619 mutual exclusion and, 205–261 receive primitives, 239–241 remote procedure calls (RPC), 727 semaphores, 617 send primitives, 239–241 Solaris, 296–298 spinlocks, 621 thread, 166–167, 296–297, 615, 617–621 Synchronous I/O, Windows, 534–535 System access, 143–145, 146, 699 821 control, 146 control lists (SACL), 699 threats, 143–145 System bus, 8–9 System calls, Linux, 98–100 System mode, 135 System response time, 439–440 System V Release (SVR4), 93–94, 147–152, 383–389, 485–486, 526–529 buffer cache, 527–528 character queue, 528–529 I/O devices, 526–529 priority classes, 485–486 process control, 151–152 process management, 147–152 scheduling, 485–486 unbuffered I/O, 529 UNIX operating system, 93–94 virtual memory management, 383–389 T Tasks, 467, 473–478, 625 aperiodic, 467, 474–476 periodic, 467, 473–474, 476–478 tinyOS, 625 Temporal locality, 42 Termination of a process state, 116–117, 189 Thin client, 717 Thrashing, load control, 382 Threads, 77–79, 85, 87, 106, 161–175, 185–198, 295–298, 459–466, 613, 615, 617–621 Adobe PageMaker example of, 167–168 cloned () processes, 197–198 dedicated process assignment, 461, 463–465 dynamic scheduling, 461, 465–466 eCos, 613, 615, 617–621 execution, 192–194 functionality of, 165–167 gang scheduling, 461, 462–463 interrupts as, 194–195 kernel-level (KLTs), 168, 172–173, 191–192 lightweight processes (LPW}, 191, 191–192 Linux management, 195–198 load sharing, 460–462 many-to-many relationships, 173–174 Microsoft Windows management, 85, 87, 185–190 multiprocessor scheduling, 459–466 multithreading, 77–79, 161–165, 187, 191–192 objects, 186–188 one-to-many relationships, 174–175 primitives, 295–298 process management, 106, 161–175, 185–198 pthread (POSIX thread) libraries, 197 SMP support, 190 Solaris management, 190–195, 295–298 states, 165–166, 187–189 support for OS subsystems, 189–190 synchronization, 166–167, 295–298, 615, 617–621 three-level structure, 192 user-level (ULTs), 168–172, 191–192 Three-tier client/server architecture, 717–718 Throughput, 411, 413 Time-sharing systems, 62–64 Time slicing, 63, 138, 417, 484 Timer interrupts, 15 822 INDEX Timers, batch systems, 58 TinyOS, 622–631 components, 624–627 configuration, 627–629 goals, 623–624 interfaces, 629–631 scheduler, 627 wireless sensor networks, 622–623 Token-based authentication, 668, 672–673 Trace of a process, 111–113 Traffic analysis attacks, 642 Transfer time, 508–509 Transition of process states, 118–120, 189 Translation lookaside buffers (TLB), 355–358 Traps, 99, 138 Tree-structure file directory, 564–566 Trojan horse, 649–650 Turnaround time (TAT), 411, 414 Two-handed clock algorithm, 386–387 Two-level memory, 39–46 access efficiency, 43–45 characteristics of, 39–46 hit ratio (H), 44–45 operation of, 42–43 performance of, 43–46 spatial locality, 42 temporal locality, 42 Two-state process model, 114–115 U Unauthorized disclosure, 638–639 Unblocked state, 165 Unbuffered I/O, 529 Uniprocessor scheduling, 404–446 See also Scheduling algorithms, 410–432 types of, 406–409 UNIX, 432–434 Uniprogramming systems, 62 UNIX, 2, 4, 90–94, 147–152, 286–288, 383–389, 432–434, 485 -486, 526–529, 580–587, 671–672 See also Solaris; Sun Cluster; System V Release (SVR4) access control, 585–587 architecture, 91 Berkeley Software Distribution (BSD), 94 concurrency mechanisms, 286–288 file management, 580–587 history of, 90–91 I/O devices, 526–529 inodes, 581–583 kernel memory allocator, 387–389 kernel, 91–93 messages, 286–287 modern systems, 93–94 paging system, 384–387 password-based authentication, 671–672 pipes, 286 process management, 147–152 register context, 150 scheduling, 432–434, 485 -486 semaphores, 287–288 shared memory, 287 signals, 288 system-level context, 150 traditional systems, 90–92, 432–434 user-level context, 149–150 virtual memory management, 383–389 volume structure, 584–585 Unsafe states, resource allocation, 275–277 Unspanned blocking, 569 USENET newsgroups, User applications, Windows, 86 User identification (ID), 145–146, 585–586, 668–672 User interfaces, 51–53, 145, 682 User-level threads (ULTs), 168–172, 191–192 User-mode process, 58, 85–86, 135 User processes, execution within, 140–142 User response time, 439 User-visible registers, 9, 10–11 Usurpation, security threats of, 639–640 V Variable-allocation replacement policy, 375–381 Variable-interval sampled working set (VSWS) policy, 380–381 Virtual address, 69, 346 Virtual file system (VFS), 587–592 Virtual memory, 39–40, 69–71, 85, 98, 383–394 cleaning policy, 381 control structures, 346–365 fetch policy, 366 hardware for, 346–365 Linux management, 98, 389–391, 392 load control, 382–383 locality and, 348–349 main memory compared to, 346–348 management, 383–394 operating system management and, 69–71 operating system software for, 365–383 paging, 348–360, 362–363, 366 placement policies, 367 replacement policy, 367–374 resident set management, 375–381 segmentation, 348, 361–365 Solaris management, 383–389 two-level memory, as, 39–40 UNIX SVR4 management, 383–389 Windows management, 85, 391–394 Viruses, 651–657 classification of, 655–656 e-mail, 656–657 infection, 652, 654 kits, 656 macro, 655–656 nature of, 651–652 polymorphic, 655–656 security threats of, 651–657 stealth, 655 structure, 652–654 Volume, 577, 584–585, 593–595 file structure, 584–585, 593–594 master file table (MFT), 594–595 New Technology File System (NTFS), 593–595 partition boot sector, 594 secondary storage management, 577 UNIX, 584–585 W Wait functions, Windows, 298 Waitable timer object, Windows, 300 Waiting state, 189 Web resources, 4–5 Winchester disk, 543 Windows, 2, 4, 80–90, 103–104, 185–190, 289–301, 391–394, 487–490, 530, 533–536, 591–597, 696, 697–701, 733–735, 738 access control, 697–698 access tokens, 698 address map, 391–393 architecture, 83–84 asynchronous I/O, 534–535 cache manager, 533 client/server model, 86–87 Cluster Server (Wolfpack), 733–735, 738 concurrency mechanisms, 298–301 condition variables, 301 configuration database manager, 735 critical sections, 300–301 descriptors, 699–701 dispatcher objects, 89, 298–300 encryption, 535–536 event processor, 735 executive modules, 84–85 file management, 533–536, 591–597 file system drivers, 534 hardware device drivers, 534 history of, 80–82 I/O management, 84, 530, 533–536, 591–597 kernel-mode components, 84 Linux, comparison with, 103–104, 300, 392, 487, 530, 592, 738 management, 87, 185–190 network drivers, 534 New Technology File System (NTFS), 591–597 node manager, 734–735 objects, 85, 88–90, 186–188 operating system organization, 84–85 paging, 393–394 priorities, 488–490 RAID configurations, 535 reader-writer locks, 301 resource manager/failover manager, 735 scheduling, 487–490 security, 593, 696, 697–701 shadow copies, 535 single-user multitasking, 82–83 symmetric multiprocessing (SMP), 87, 185–190 synchronous I/O, 534–535 thread management, 85, 87, 185–190 user-mode processes, 85–86 virtual memory management, 391–394 Vista, 2, 4, 82 wait functions, 298 Word processors, 10 Working directory, 566 Working set strategy, 377–380 Worms, 657–659, 690–691 malware countermeasures, 690–691 network programs, 657–658 propagation model, 658 technology, 659 Write policy, cache memory, 33 Z Zombies, see Bots ... l1 + l2 r1 = l1Ts1; r2 = l2Ts2 r = r1 + r2 (b) No interrupts; exponential service times Tr1 = Ts1 + Tr2 = Ts2 + r1Ts1 + r2Ts2 - r1 Tr1 - Ts1 - r Ts = l1 l2 T + Ts2 l s1 l Tr = l1 l2 T + Tr2 l r1... 18 20 Mean FCFS Finish Time Turnaround Time (Tr) Tr /Ts 9 12 12 8.60 1.00 1.17 2. 25 2. 40 6.00 2. 56 20 15 RR q = Finish Time Turnaround Time (Tr) Tr /Ts 18 17 16 13 14 10.80 1.33 2. 67 3 .25 2. 80... Turnaround Time (Tr) Tr/Ts 20 16 18 12 13 10.00 1.33 3.00 3.00 2. 60 1.5 2. 29 20 14 FB q = 2i Finish Time Turnaround Time (Tr) Tr /Ts 17 18 15 14 14 10.60 1.33 2. 50 3.50 2. 80 3.00 2. 63 Another difficulty

Ngày đăng: 16/05/2017, 09:41

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w