1 / 123

Understanding Operating Systems Sixth Edition

Understanding Operating Systems Sixth Edition. Chapter 15 Windows Operating System s. Learning Objectives. After completing this chapter, you should be able to describe: The design goals for Windows operating systems The role of MS-DOS in early Windows releases

duy
Télécharger la présentation

Understanding Operating Systems Sixth Edition

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Understanding Operating Systems Sixth Edition Chapter 15Windows Operating Systems

  2. Learning Objectives After completing this chapter, you should be able to describe: • The design goals for Windows operating systems • The role of MS-DOS in early Windows releases • The role of the Memory Manager and Virtual Memory Manager • The use of the Device, Processor, and Network Managers • System security challenges • The Windows user interface Understanding Operating Systems, Sixth Edition

  3. Windows Development • The first Windows product used a graphical user interface (GUI) as its primary method of communication with the user and needed an underlying operating system so it could translate the users’ requests into system commands. • Windows 1.0 (1985) ran on microcomputers with the MS-DOS OS. The first Windows application was not a true operating system. • It was an interface between the actual MS-DOS OS and the user. • It was notable because it was the first menu-driven interface for desktop computers that were compatible with the IBM PC. Understanding Operating Systems, Sixth Edition

  4. Early Windows Products • Windows 1.0 was followed by increasingly sophisticated GUIs designed to run increasingly powerful desktop computers as shown in Table 15.1. • Windows 3.1 featured a standardized look and feel similar to the one made popular by Apple’s Macintosh computer. • Windows 3.1 became the entry-level product for single-user installations or small-business environments. Understanding Operating Systems, Sixth Edition

  5. Early Windows Products (cont'd.) • Windows for Workgroups • The first Windows product to accommodate the needs of network users by including programs and features for small LANs. • A Windows for workgroups system could easily share directories, disks, and printers among several interconnected machines. • It allowed personal intercommunication: e-mail, chat programs. Understanding Operating Systems, Sixth Edition

  6. Operating Systems for Home and Professional Users • Before the release of the Windows 95 OS, all Windows products were built to run on top of the MS-DOS OS. • MS-DOS was the true OS but took its direction from the Windows program being run on it. • Although it helped Windows gain market share among MS-DOS users, this layering technique proved to be a disadvantage: • MS-DOS: • Had little built-insecurity; • Couldn’t perform multitasking; • Had no interprocess communication capability; • Because MS-DOS was written to work closely with microcomputer’s hardware, it was difficult to move to other platforms. Understanding Operating Systems, Sixth Edition

  7. Operating Systems for Home and Professional Users • To respond to these needs, Microsoft developed and released a succession of Windows Oss to appeal to home and office users (Table 15.2). • The company also began developing more powerful networking products, beginning with Windows NT (new Technology) • Unlike the single-user Oss, Windows NT never relied on MS-DOS for support. Understanding Operating Systems, Sixth Edition

  8. Operating Systems for Home and Professional Users (cont'd.) Understanding Operating Systems, Sixth Edition

  9. Operating Systems for Networks • In the fall of 1988, Microsoft hired David Cutler to lead the development of the Windows NT OS. • As an experienced architect of minicomputer systems, Cutler identified the primary market requirements for this new product: • Portability; • Multiprocessing capabilities; • Distributed computing support; • Compliance with government procurement requirements; • Government security certification. • The finished product has evolved as shown in Table 15.3. Understanding Operating Systems, Sixth Edition

  10. Operating Systems for Networks (cont'd.) Understanding Operating Systems, Sixth Edition

  11. Operating Systems for Networks (cont'd.) • In 1999, Microsoft changed the Oss name from Windows NT to Windows 2000 which was available in four packages: • Windows 2000 Professional • Windows 2000 Server • Windows 2000 Advanced Server • Windows 2000 Datacenter Server • The Datacenter server was a new product designed for large data warehouses and other data-intensive business applications, and supported up to 64GB of physical memory. Understanding Operating Systems, Sixth Edition

  12. Operating Systems for Networks (cont'd.) • Windows Server 2003 was also released with these same four packages plus a Web edition. • Windows Server 2008 Release 2 was launched in 2009 to coincide with the launch of Windows 7 and offered: • Improved support for multiple cores, up to 64; • Reduced power consumption; • Increased virtualization capabilities. Understanding Operating Systems, Sixth Edition

  13. Design Goals • For the OS to fulfill its marketing requirements, certain features such as security had to be incorporated from the outset. • The designers of Windows assembled a set of software design goals to facilitate decision making as the coding process evolved. • When they were designed, Windows networking Oss were influenced by several OS models, using already-existing frameworks while introducing new features. • They used and object model to manage OS resources and to allocate them to users in a consistent manner Understanding Operating Systems, Sixth Edition

  14. Design Goals (cont'd.) • They use symmetric multiprocessing (SMP) to achieve maximum performance from multiprocessor computers. • To accommodate the various needs of its user community, and to optimize resources, the Windows team identified five design goals (goals that Microsoft has met with varying levels of success): • Extensibility • Portability • Reliability • Compatibility • Performance Understanding Operating Systems, Sixth Edition

  15. Extensibility • Knowing that Oss must change over time to support new hardware devices or new software technologies, the design team decided that the OS had to be easily enhanced. • This feature is called extensibility. • In an effort to ensure the integrity of the Windows code, the designers separated OS functions into two groups: • Privileged executive process • Nonprivileged processes “protected subsystems” Understanding Operating Systems, Sixth Edition

  16. Extensibility (cont’d) • The term privileged refers to a processor’s mode of operation. • Most processors have: • A privileged mode (in which all machine instructions are allowed and system memory is accessible) ; • A nonprivileged mode (in which certain instructions are not allowed and system memory isn’t accessible). • In Windows terminology, the privileged processor mode is called the kernel mode and the nonprivileged processor mode is called user mode. • Usually OS execute in kernel mode only and application programs execute in user mode only. • Except when they call OS services. • In Windows, the protected subsystems execute in user mode as if they were applications, which allows protected subsystems to be modified or added without affecting the integrity of the executive process. Understanding Operating Systems, Sixth Edition

  17. Extensibility (cont'd.) • In addition to protected subsystems, Windows designers included several features to address extensibility issues: • A modular structure so new components can be added to the executive process; • A group of abstract data types called objects that are manipulated by a special set of services allowing system resources to be managed uniformly. • A remote procedure call that allows an application to call remote services regardless of their location on the network. Understanding Operating Systems, Sixth Edition

  18. Portability • Refers to the OS ability to operate on different machines that use different processors or configurations with a minimum amount of recoding. • To address this goal, Windows system developers used a four-prong approach: • They wrote it in a standardized, high-level language. • Available in all machines • The system accommodated the hardware to which it was expected to be ported (32-bit, 64-bit, etc.). • Code that interacted directly with the hardware was minimized to reduce incompatibility errors. • All hardware-dependent code was isolated into modules that could be modified more easily whenever the OS was ported. Understanding Operating Systems, Sixth Edition

  19. Portability(cont'd.) • Windows is written for ease of porting to machines that use 32-bit or 64-bit linear addresses and provides virtual memory capabilities. • Most Windows Oss have shared the following features: • The code is modular. • The code that must access processor-dependent data structures and registers is contained in small modules that can be replaced by similar modules for different processors. Understanding Operating Systems, Sixth Edition

  20. Portability(cont'd.) • Most Windows Oss have shared the following features (cont’d): • Much of Windows is written in C, a programming language that’s standardized and readily available. • The graphic component and some portions of the networking user interface are written in C++. • Assembly language code is used only for those parts of the system that must communicated directly with the hardware. • Windows contains a hardware abstraction layer(HAL): • A dynamic-link library that provides isolation from hardware dependencies furnished by different venders. • The HAL abstracts hardware, such as caches, with a layer of low-level software so that higher-level code need not change when moving from one platform to another. Understanding Operating Systems, Sixth Edition

  21. Reliability • Refers to the robustness of a system. • Its predictability in responding to error conditions, even those caused by hardware failures. • It also refers to the OS’s ability to protect itself and its users from accidental or deliberate damage by user programs. • Structured exception handling is one way to capture error conditions and respond to them uniformly. • Whenever such an event occurs, either the OS or the processor issues an exception call, which automatically invokes the exception handling code that’s appropriate to handle the condition, ensuring that no harm is done to either user programs or the system. Understanding Operating Systems, Sixth Edition

  22. Reliability (cont’d) • In addition, the following features strengthen the system: • A modular design that divides the executive process into individual system components that interact with each other through specified programming interfaces. • If it becomes necessary to replace the Memory Manager with a new one, Then the new one will use the same interfaces. • A file system called NTFS (NT file system), which can recover from all types of errors including those that occur in critical disk sectors. • To ensure recoverability, NTSF uses redundant storage and a transaction-based scheme for storing data. Understanding Operating Systems, Sixth Edition

  23. Reliability (cont’d) • In addition, the following features strengthen the system (cont’d): • A security architecture that provides a variety of security mechanisms, such as user logon, resource quotas, and object protection. • A virtual memory strategy that provides every program with a large set of memory addresses and prevents one user from reading or modifying memory that’s occupied by another user unless the two are explicitly sharing memory. Understanding Operating Systems, Sixth Edition

  24. Compatibility • An OS’s ability to execute programs writtenfor other operating systems or for earlier versions of the same system. • Through the use of protected subsystems, Windows provides execution environments for applications that are different from its primary programming interface. • The Win32 application programming interface (API); • Windows also provides source-level compatibility with POSIX applications that adhere to the POSIX OS interfaces, defined by the IEEE. Understanding Operating Systems, Sixth Edition

  25. Compatibility (cont’d) • POSIX is the Portable Operating System Interface for UNIX, an operating system API that defines how a service is invoked through a software packages. • POSIX was developed by the IEEE to increase the portability of application software. • In addition to compatibility with programming interfaces, recent versions of Windows also support already-existing file systems, including the: • MS-DOS file allocation table (FAT); • The CD-ROM file system (CDFS); • The NTFS. Understanding Operating Systems, Sixth Edition

  26. Compatibility (cont’d) • Windows comes with built-in verification of important hardware and software. • The upgrade setup procedures include a check-only mode that examines the system’s hardware and software for potential problems and produces a report that lists them. • The procedure stops when it can’t find drivers for critical devices, such as hard-disk controllers, bus extensions, and other items that are sometimes necessary for a successful upgrade. Understanding Operating Systems, Sixth Edition

  27. Performance • The OS should respond quickly to CPU-bound applications. • To do so, Windows is built with the following features: • System calls, page faults, and other crucial processes are designed to respond in a timely manner. • A mechanism called the local procedure call (LPC) is incorporated into the OS so that communication among the protected subsystems doesn’t restrain performance. • Critical elements of Windows’ networking software are built into the privileged portion of the OS. • These components can be loaded and unloaded from the system dynamically, if necessary. Understanding Operating Systems, Sixth Edition

  28. Memory Management • Every OS has own view of physical memory and requires its applicationprograms to access memory in specified ways. • In Figure 15.1, each process’s virtual address space is 4GB, with 2GB each allocated to program storage and system storage. • When physical memory becomes full, the Virtual Memory Manager pages some of the memory contents to disk, freeing physical memory for other processes. • The challenge for all Windows Oss, especially those running in a network, is to run application programs written for Windows or POSIX without crashing into each other in memory. Understanding Operating Systems, Sixth Edition

  29. Memory Management (cont'd.) • In recent versions of Windows, the OS resides in high virtual memory and the user’s code and data reside in low virtual memory (Figure 15.1). • User’s process can’t read or write system memory directly. • All user-accessible memory can be paged to disk, as can the segmen t of system memory labeled paged pool. • The segment of system memory labeled nonpaged pool is never paged to disk because its used to store critical objects, such as the code that does the paging, as well as major data structures. Understanding Operating Systems, Sixth Edition

  30. Memory Management (cont'd.) Understanding Operating Systems, Sixth Edition

  31. User-Mode Features • The Virtual Memory (VM) Manager allows user-mode subsystems to share memory and provides a set of native services that a process can use to manage its virtual memory in the following ways: • Allocate memory in two stages: • First by reserving memory and then by committing memory, as needed. • This two-step procedure allows a process to reserve a large section of virtual memory without being charged for it until it’s actually needed. • Provide read and/or write protection for virtual memory, allowing processes to share memory when needed. Understanding Operating Systems, Sixth Edition

  32. User-Mode Features (cont’d) • Lock virtual pages in physical memory. • This ensures that a critical page won’t be removed from memory while a process is using it. • A database application that uses a tree structure to update its data may lock the root of the tree in memory, thus minimizing page faults while accessing the database. • Retrieve information about virtual pages. Understanding Operating Systems, Sixth Edition

  33. User-Mode Features (cont’d) • Protect virtual pages. • Each virtual page has a set of flags associated with it that determines the types of access allowed in user mode. • In addition, Windows provides object-based memory protection. • Each time a process opens a section object, a block of memory that can be shared by two or more processes, the security reference monitor checks whether the process is allowed to access the object. • Rewrite virtual pages to disk. • If an application modifies a page, the VM Manager writes the changes back to the file during its normal paging operations. Understanding Operating Systems, Sixth Edition

  34. Virtual Memory Implementation • The VM manager relies on address space management and paging techniques. • Address space management • As shown in Figure 15.1, the upper half of the virtual address space is accessible onlyto kernel-mode processes. • Code in the lower part of this section (kernel code and data) is never paged out of memory. • The addresses in this range are translated by the hardware, providing exceedingly fast data access. Understanding Operating Systems, Sixth Edition

  35. Virtual Memory Implementation • Address space management (cont’d) • The lower part of the resident OS code is used for sections of the kernel that require maximum performance. • The code that dispatches units of execution (threads of execution), in a processor. • When users create a new process, they can specify that the VM Manager initialize their virtual address space by duplicating the virtual address space of another process. • This allows environment subsystems to present their client processes with views of memory that don’t correspond to the virtual address space of a native process. Understanding Operating Systems, Sixth Edition

  36. Virtual Memory Implementation (cont'd.) • Paging • The part of the VM Manager that transfers pages between page frames in memory and disk storage. • It’s a complex combination of both software policies and hardware mechanisms. • Software policies determine when to bring a page into memory and where to put it. • Hardware mechanisms include the exact manner in which the VM Manager translates virtual addresses into physical addresses. Understanding Operating Systems, Sixth Edition

  37. Virtual Memory Implementation (cont'd.) • Paging (cont’d) • Because the hardware features of each system directly affect the success of the VM Manager, implementation of VM varies from processor to processor. • This portion of the OS isn’t portable and must be modified for each new hardware platform. • To make the transition easier, Windows keeps this code small and isolated. • The processor chip that handles address translation and exception handling looks at each address generated by a program and translates it into a physical address. Understanding Operating Systems, Sixth Edition

  38. Virtual Memory Implementation (cont'd.) • Paging (cont’d) • If the page containing the address isn’t in memory, then the hardware generates a page fault and issues a call to the pager. • The translation look-aside buffer (TLB) is a hardware array of associative memory used by the processor to speed memory access. • As pages are brought into memory by the VM Manager, it creates entries for them in the TLB. • If a virtual address isn’t in the TLB, it may still be in memory. • In that case, virtual software rather than hardware is used to find the address, resulting in slower access time. Understanding Operating Systems, Sixth Edition

  39. Virtual Memory Implementation (cont'd.) • Paging policies • Dictate, in a VM system, how and when paging is done and are composed of the following policies: • Fetch policy: • Determines when the pager copies a page from disk to memory. • The VM Manager uses a demand paging algorithm with locality of reference (clustering) to load pages into memory. • This strategy attempts to minimize the number of page faults that a process encounters. Understanding Operating Systems, Sixth Edition

  40. Virtual Memory Implementation (cont'd.) • Paging policies (cont’d) • Placement policy: • Determines where the virtual page is loaded in memory. • If memory isn’t full, The VM Manager selects the first page frame from a list of three pages frames. • This list is called the page frame database, and is an array of entries numbered from 0 through n X 1, with n equaling the number of page frames of memory in the system. Understanding Operating Systems, Sixth Edition

  41. Virtual Memory Implementation (cont'd.) • Paging policies (cont’d) • Placement policy (cont’d): • Each entry contains information about the corresponding page frame, which can be in one of six states at any given time: valid, zeroed, free, standby, modified, or bad. • Valid and modified page frames are those currently in use. • Those zeroed, free, or on standby represent available page frames. • Bad frames can’t be used. Understanding Operating Systems, Sixth Edition

  42. Virtual Memory Implementation (cont'd.) • Paging policies (cont’d) • Placement policy (cont’d): • Of the available page frames, the page frame database links together those that are in the same state, thus creating five separate homogeneous lists. • Whenever the number of pages in the zeroed, free, and standby lists reaches a preset minimum, the modified page write is activated to write the contents of the modified pages to disk and link them to the standby list. • If the modified page list becomes too short, the VM Manager shrinks each process’s working set to its minimum working set size and adds the newly freed pages to the modified or standby lists to be reused. Understanding Operating Systems, Sixth Edition

  43. Virtual Memory Implementation (cont'd.) • Paging policies (cont’d) • Replacement policy: • Determines which virtual page must be removed from memory to make room for a new page. • The VM Manager uses a local FIFO replacement policy and keeps track of the pages currently in memory for each process (the process’s working set). • The FIFO algorithm is local to each process, so that when a page fault occurs, only page frames owned by a process can be freed. • When it’s created, each process is assigned a minimum working-set size, which is the number of pages the process is guaranteed to have in memory while it’s executing. Understanding Operating Systems, Sixth Edition

  44. Virtual Memory Implementation (cont'd.) • Paging policies (cont’d) • Replacement policy (cont’d): • If memory isn’t very full, the VM Manager allows the process to have the pages it needs up to its working set maximum. • If the process requires even more pages, the VM Manager removes one of the process’s pages for each new page fault the process generates. • Certain parts of the VM Manager are dependent on the processor running the OS and must be modified for each platform. • These platform-specific features include page table entries, page size, page-based protection, and virtual address translation. Understanding Operating Systems, Sixth Edition

  45. Processor Management • A process is the combination of an executable program, a private memory area, and system resources allocated by the OS as the program executes. • A process requires a fourth component before it can do any work – at least one thread for execution. • A thread is the entity within a process that the kernel schedules for execution. • It could be roughly equated to a task. • Using multiple threads (multithreading) allows a programmer to break up a single process into several executable segments and also to take advantage of the CPU power available in computers with multiple processors. Understanding Operating Systems, Sixth Edition

  46. Processor Management • Windows Server 2008 Release 2 can coordinate processing among 64 cores. • Windows is a preemptive-multitasking, multithreaded operating system. • By default, a process contains one thread, which is composed of the following: • A unique identifier; • The contents of a volatile set of registers indicating the processor’s state; • Two stacks used during the thread’s execution; • A private storage area used by subsystems and dynamic-link libraries. Understanding Operating Systems, Sixth Edition

  47. Processor Management (cont'd.) • Threads (cont’d) • These components are called the thread’s context. • The actual data forming this contextvaries from one processor to another. • The kernel schedules threads for execution on aprocessor. • When you use the mouse to double-click an icon in the Program Manager, the OS creates a process, and that process has one thread that runs the code. • The process is like a container for the: • Global variables; • Environment strings; • The heap owned b y the application; • The thread. Understanding Operating Systems, Sixth Edition

  48. Processor Management (cont'd.) • Threads (cont’d) • The thread is what actually executes the code. • Figure 15.2 shows a diagram of a process with a single thread. Understanding Operating Systems, Sixth Edition

  49. Processor Management (cont'd.) Understanding Operating Systems, Sixth Edition

  50. Processor Management (cont'd.) • Multithreading using multitasking • For systems with multiple processors, a process can have as many threads as there are CPUs available. • The overhead incurred by a thread is minimal. • In some cases, it’s actually advantageous to split a single application into multiple threads because the entire program is then much easier to understand. • The creation of threads isn’t as complicated as it may seem. • Although each thread has its own stack, all threads belongingto one process share its global variables, heap, and environment strings (Figure 15.3). Understanding Operating Systems, Sixth Edition

More Related