Computer Architecture - DFC10263 PDF
Document Details
Tags
Summary
These lecture notes cover computer architecture, focusing on operating systems, memory management, and networking. The document includes diagrams and explanations of various concepts related to computer systems.
Full Transcript
COMPUTER ARCHITECTURE DFC10263 CHAPTER Fundamental of 3 Operating System and Network OPERATIN G SYSTEM A collection of computer Definition programs that integrate the hardware resources of the of computer and make those Operating resources...
COMPUTER ARCHITECTURE DFC10263 CHAPTER Fundamental of 3 Operating System and Network OPERATIN G SYSTEM A collection of computer Definition programs that integrate the hardware resources of the of computer and make those Operating resources available to a user System and the user’s programs, in a way that allows the user access to the computer in a productive, timely, and efficient manner. In other words, the operating system acts as an intermediary between the user and the user’s programs and the Definition hardware of the computer. It makes the resources available to the of user and the user’s programs in a Operating convenient way, on the one hand, and controls and manages the hardware, on System the other. In serving as an intermediary between the users of computer services and the computer’s resources, the operating system provides 3 basic types of services. 1 : It accepts and processes commands and requests from the user and the user’s programs and presents appropriate output results. Basic types 2 : It of manages, loads, and executes services programs.provided by operating system 3 : It manages the hardware resources of the computer, including the interfaces to networks and other external parts of the system. Modern Integrated Computer Environmen t Figure 1 :The relationship between the various components of a computer system Simplified diagram of operating system services Figure 2 : Diagram showing the relationships between the different components of an operating system. 3.1 Explain the operating system concept Describe operatin g system compone nt A : User Interface and Command Execution services B : File Management C : Input/Output Services D : Process Operating Control Management E : Memory System Management F : Scheduling Compone and Dispatch G : Secondary Storagent Management H : Network and Communication Support Services I : Security and Protection Services J : System Administration Support To the user, the most important and visible service A provided by the operating system is the user interface and the capability that it provides to execute commands. Some systems do not consider the user interface and command processor to be a part of the operating system kernel, even though much of it is likely to be memory resident. Instead, these systems consider the user interface as a separate shell that is provided with the operating system and that interacts with the kernel User to provide the necessary user command capabilities. Theoretically, a different shell could be used that Interface provides different command capabilities. In Linux, for and example, three different GUI shells, KDE, Unity, and Gnome, and three different text-based shells, bash, Command csh, and zsh are in common use, and many other shells for Linux are available. Each of these shells Execution provides different features and command structures and capabilities. services A Different types of user interfaces exist. The most common are the graphical user interface (GUI), and the command line interface (CLI). The graphical user interface accepts commands primarily in the form of icons, drop-down menus or tabbed ribbons, on-screen buttons, mouse or finger movements, and mouse or finger clicks. The command line interface relies on typed commands. Underneath the very different appearances of these interfaces, however, similar commands are being executed. Some commands are built directly into the operating system. User They remain in memory for immediate access. These are known as resident commands. Other commands are loaded Interface only as they are needed. These are called non resident commands. and Most modern operating systems provide some capability for combining computer commands into pseudo-programs, Command commonly called shell scripts. Batch-oriented systems also make it possible to combine individual commands into a Execution sequence of control statements, which will be interpreted and executed one at a time without user intervention to services control the processing of a multistep “job”. Each step in the job performs an individual task. On large IBM systems, for example, the set of commands used for this purpose form a language known as Job Control Language (JCL). A The simplest Windows scripts are based on a command set that evolved from MS-DOS. These scripts are commonly called.BAT files. Recent versions of Windows also include a more powerful scripting facility called Windows PowerShell. PowerShell is based on an object oriented language similar to C# and can manipulate both text and graphical objects. PowerShell 3.0 is integrated into Windows 8. User There are a number of scripting languages that are Interface designed to work independently of the particular and operating system in use. The most popular of these include perl, python, PHP, Ruby, and JavaScript. Command Command and scripting languages extend the power and flexibility of the operating system and Execution simplify use of the system for less sophisticated services users. The file management system provides and B maintains the mapping between a file’s logical storage needs and the physical location where it is stored. The file management system identifies and manipulates files by the names provided by their users. It determines the physical requirements of the file, allocates space for it, stores it in that space, and maintains the information about the file so that it may be retrieved, partially or in full, later. The file management system keeps track of the available space on each device connected to the File management system. The user and the user’s programs need not be aware of the underlying physical storage issues. Users and programs simply access the files by name, and the file management system handles the details. B The file management system provides and maintains: Directory structures for each I/O device in the system and tools to access and move around these structures. The directory structure allows the retrieval and storage of files by name, keeps track of the mappings, allocates and frees space, allows the mounting and unmounting of file structures, and provides other functions required to File maintain the structures of the file system. Provisions are made to move easily from one structure to another. managemen Tools that copy and move files from one I/O device to another and from one directory to another, merge files, create and delete files and t directories, and undertake other basic file manipulations. Information about each file in the system and tools to access that information. Typically, information about a file might include its name, type of file, size, date and time of creation, date and time of the most recent update, and protection and backup characteristics. Security mechanisms to protect files and control and limit file access to authorized users. Most modern systems also provide encryption protection and journaling, a technique which assures the currency and integrity of files when system failures occur during file changes. C Programs that implement of the concept of interrupts and showed the various techniques for handling I/O are known as I/O device drivers. It would be awkward to require each program to provide its own I/O services. Input/ Output I/O device drivers are important because they are available to serve every program that will be Services executed on the system and provide a standard methodology for the use of each device. Even more important, the use of standard I/O drivers within the operating system limits access and centralizes control of the operations for each device. for each device installed on the system. These drivers provide services to the file management system and are also available, through the API, to other programs for their use. The I/O device drivers accept I/O requests and C perform the actual data transfers between the hardware and specified areas of memory. In addition to the I/O device drivers provided by the operating system, modern systems provide certain I/O drivers with minimal functionality in ROM, to assure access to critical devices, such as the keyboard, display, and boot disk during the system start-up process. The ROM-based drivers are Input/ replaced or integrated with other I/O drivers during normal system operation. On IBM-type PCs, these drivers Output are stored in the system BIOS (basic input/output system). Services Device drivers for newly installed devices are added and integrated into the operating system at the time of installation. On some systems, the process is manual. On many systems, the Apple Macintosh, for example, this process is completely automatic. In Windows, this capability is known as plug-and-play. Many modern systems even make it possible to add and modify devices on the fly, without shutting down the system. USB provides this capability. C Every operating system, large or small, provides input/output services for each device in the system. The use of one set of I/O services for each device assures that multiple programs will not be competing for the device and assures that the use of each device will be managed through a single point Input/ of control. Multiple access can cause serious conflict in multitasking systems. Output For example, a user would not be pleased to Services discover that parts of the printouts from two different programs were intermingled on the pages, even more so if the outputs belonged to two different users! The operating system assigns and schedules I/O devices appropriately to each process to eliminate this problem. D Briefly, a process is an executing program. It is considered the standard unit of work within a computer system. Every executing program is treated as a process. This includes not only application programs, but the programs within the operating system itself. The process concept considers the program, together with the resources that are assigned to it, including memory,I/O devices, time for execution, and the like. When admitted to the system, each programis assigned memory space and the various resources that it initially requires to complete its work. Process As the process executes, it may require additional resources, or it may release resources that it no longer needs. The operating Control system performs various functions with processes, including scheduling and memory management, by providing the various Management services that we have discussed in this chapter. Processes must often be synchronized, so that processes sharing a common resource do not step on each other’s toes by altering critical data or denying each other needed resources. Systems also provide communication capability between different processes. Processes may cooperate with each other by sending messages back and forth using interprocess messaging services. Other services include functions such as setting process priorities and calculating billing information. Process control management keeps track of D each process in memory. It determines the state of each process: whether it is running, ready to run, or waiting for some event, such as I/O to be completed, in order to proceed. It maintains tables that determine the current program counter, register values, assigned files and I/O resources, and other parameters for each process in Process memory. It coordinates and manages message handling and process Control synchronization. Management Most modern systems further break the process down into smaller units called threads. A thread is an individually executable part of a process. It shares memory and other resources with all other threads in the same process,but can be scheduled to run separately from other threads. The purpose of the memory management E system is to load programs and program data into memory in such a way as to give each program loaded the memory that it requires for executions. Each program that is being executed must reside in memory. For multitasking to occur, multiple programs will Memory occupy memory simultaneously, with each program in its own memory space. Management The memory management system has three primary tasks. It attempts to perform these tasks in a way that is fair and efficient to the programs that must be loaded and executed. E It keeps track of memory, maintaining records that identify each program loaded into memory together with the space being used and also keeps track of available space. It 1 allocates additional space for running programs as required. It prevents programs from reading and writing memory outside their allocated space, so that they cannot accidentally or intentionally damage other programs. Memory If necessary, it maintains one or more queues of programs waiting to be loaded into memory as space Management 2 becomes available, based on such program criteria as priority and memory requirements. When space is available, it allocates memory to the programs that are next to be loaded. This situation is rare in modern computer systems. It deallocates a program’s memory space when it 3 completes execution. The deallocated space is made available for other programs. E Older systems used a variety of algorithms to divide up the available memory space. Except for special-purpose embedded systems, every modern computer system provides virtual storage, a method of utilizing memory which includes hardware support for sophisticated memory management capability. Virtual storage creates the illusion of a memory space that is potentially much larger than the actual amount of physical storage installed in the computer system; its development was a major breakthrough in Memory system capability. Management Where virtual storage is available, the memory management module of the operating system works directly with the hardware and provides the software support to create an integrated memory management environment that takes maximum advantage of the features of virtual storage. F The operating system is responsible for the allocation of CPU time in a manner that is fair to the various programs competing for time, as well as maximizing efficient utilization of the system overall. 1 There are 2 levels of scheduling: One level of scheduling determines which jobs will be admitted to the system and in what order. Admission to the system means that a job will be placed into a queue, based on some order of priority, and ultimately assigned memory space and other Scheduling resources, which will allow the program to be loaded into memory and executed. (Some operating systems divide this operation into two separate tasks, one for admittance to the system, the other to assign and 2 memory.) This scheduling function is sometimes known as high-level scheduling. Dispatch The other level of scheduling is known as dispatching. Dispatching is responsible for the actual selection of processes that will be executed at any given instant by the CPU. The dispatch component of the operating system makes concurrency possible by allocating CPU time in such a way as to make it appear that several processes are executing simultaneously. For those systems that allow the division of processes into threads, dispatch is done at the thread level, instead of at the process level. In modern systems, with their extensive facilities and F capabilities, high-level scheduling is relatively straightforward. Most of the time, new processes will simply be admitted to the system and given memory space if it is available, or held until space is available, then admitted. Selecting the appropriate candidate for CPU time at any given instant is much more important and difficult, since the capability of the dispatcher directly affects the ability of the users to get their work done. A single program cannot be allowed to “hog” the machine; Scheduling therefore, the dispatcher must interrupt whatever process is running periodically and run itself to determine the status of the machine’s resources and to and reassign CPU resources to assure that every user and task is receiving what it needs. Dispatch Since a single CPU can process only one instruction at a time, the simultaneous execution of two or more programs is obviously impossible with a single processor. Instead, the dispatcher acts as a controller to provide concurrent processing. There are various ways in which multitasking can be achieved with concurrent processing, but mostly these methods take advantage of two simple strategies: F Since a single CPU can process only one instruction at a time, the simultaneous execution of two or more programs is obviously impossible with a single processor. Instead, the dispatcher acts as a controller to provide concurrent processing. There are various ways in which multitasking can be achieved with concurrent processing, but mostly Scheduling these methods take advantage of two simple strategies: and Dispatch 1 Sharing the CPU during the I/O Breaks 2 Time- Sharing the CPU 1 F Sharing the CPU during the I/O Breaks While one program is waiting for I/O to take place, another can be using the CPU to execute instructions. This strategy is shown in figure below. Figure shown that I/O could be performed efficiently without tying up the instruction executing capability of the CPU. We further showed that most of the time, the CPU was idle, since I/O represents such a large percentage of a typical program’s execution. This suggests that the idle time Scheduling can be used to execute other programs, as an effective way to increase utilization of the CPU. and Dispatch 2 Time-Sharing the CPU F The CPU may be switched rapidly between different programs, executing a few instructions from each, using a periodic clock-generated interrupt. This strategy will slow down execution of each program, since each program must split its time with other programs. There is also some operating system overhead, as a dispatcher must be invoked at each interrupt to select the next program to receive CPU Scheduling time. In most cases the CPU is so powerful compared to the requirements of the programs that the slowdown and is not even noticeable. This technique is called time- slicing. Dispatch F The algorithms used by the dispatcher combine these two methodologies, taking into account such issues as fairness to each program, the priorities of the different programs, quick response for critical situations, such as displaying a user’s cursor movement or displaying streaming video, the number of CPUs available for dispatching, and other Scheduling criteria. The operation of the dispatcher is dependent on the and nature of the system and on the nature of the programs that the system is running. The dispatcher Dispatch can be preemptive or nonpreemptive. G The file management system keeps track of free secondary storage space and maintains the file system and its directories. The input/output control system provides device drivers that actually control the transfer of data between memory and the secondary storage devices. On large multitasking systems there may be many programs requesting I/O services from a secondary Secondary storage device at one time. The order in which these requests are fulfilled affects the ability of the different Storage programs to get their work completed, since the programs must usually stop and wait for their I/O requests to be completed before proceeding. Although it Manageme would be simplest to process I/O requests in the order received, it may be more efficient to process the nt requests out of order, particularly if the blocks requested are scattered all over the disk. This is true because the disk seek time (i.e., the time to move from track to track) is long compared to other times within the system. H With the exception of some specialized embedded systems, nearly all computers today are interconnected, directly or indirectly, into networks. Communications services within the operating system also provide the interface between the communication software and the OS I/O control system that provides access to the network. The I/O control system includes the software drivers for modems, network interface cards, wireless Network communication cards, and other devices that are used to connect the computer physically and electrically to the and network or networks. Network and communication services within the operating Communication system provide the communication software necessary to implement the features and facilities of Wi-Fi, wired Support Ethernet, and TCP/IP. Most systems also implement a substantial set of TCP/IP applications and extensions, Services including e-mail, remote login, Web services, streaming multimedia, voice over IP telephony (VoIP), secure networking across theInternet (called a virtual private network, or VPN), and more. Most modern systems also provide Bluetooth capability. H Network and Communications services within the operating system also provide the interface between the communication software and the OS I/O control system that provides access to the network. The I/O control system includes the software drivers for modems, network interface cards, wireless Communicatio communication cards, and other devices that are used to connect the computer physically and n Support electrically to the network or networks. Services It is certainly no surprise to anyone that modern systems I require security and protection services to protect the operating system from user processes, to protect processes from each other, and to protect all processes from the outside world. Without protection, a buggy or malicious program, for example, could unintentionally or intentionally modify or destroy the program code or data in the memory space belonging to the operating system or to another process. It is also important to protect the system and user processes from unauthorized entry Security to the system, and against unauthorized use of the system, even by authorized users. and In most modern systems, executing processes are limited to the execution of instructions and access to data within their own Protection memory space, sometimes referred to as a sandbox. All other services, such as file management and I/O, must be Services requested by the process from the operating system, using the service requests provided by the OS for that purpose. This methodology is fundamental to the security of the system. In this way, the operating system, the file system, and other processes are protected from unauthorized use or operations, protecting the integrity of the system as a whole. I The operating system also provides login and password services that can help to prevent entry from unauthorized users and access control facilities that allow users to protect their individual files at various levels of availability to other users and outsiders. The modern operating system includes firewall protection, which, artfully administered, can make it more difficult for outsiders to penetrate the system, but is not foolproof; the need for security must be carefully Security balanced with the needs of the users to get their work done. and Despite all the protection offered by a modern system, bugs, viruses, and vulnerabilities within the operating Protection system, poor configuration of firewalls and other security features, and poor user management policies Services such as weak password enforcement can make a system vulnerable to attack by outsiders. The design and deployment of effective security and prevention services is an important ongoing concern in operating system design. J The system administrator, or sysadmin, for short, is the person who is responsible for maintaining the computer system or systems. In a large organization, the sysadmin may support hundreds, or even thousands, of computers, including those of the employees. Some of the important administrative tasks managed by a system administrator include: System configuration and setting group configuration policies Adding and deleting users Controlling and modifying user privileges to meet the changing needs of the users Providing and monitoring appropriate security System Managing, mounting, and unmounting file systems Administratio Managing, maintaining, and upgrading networks Providing secure and reliable backups n Support Providing and controlling software, installing new software, and upgrading software as required Patching and upgrading the operating systems and other system software Recovering lost data Tuning the system for optimum availability and performance Monitoring system performance and recommending system modifications and upgrades when necessary to meet user requirements NETWORK 3.2 Explain the network concept 3.2.1 Describe the network computer system component A : Network Topology Network B :Computer Network Architecture System Componen t C : Network Interconnection Network topology describes the A fundamental configuration, or layout, of a network. Topology is an important characteristic of all networks, large and small. It defines the path, or paths, between any two points in the network, which, in turn, defines the links between nodes that we Network have previously discussed. Topology The topology of a network affects the performance of the network, particularly in terms of availability, speed, and traffic congestion. A BASIC TOPOLOGY 1 Mesh Topology 2 Bus Topology Network 3 Star Topology Topology 4 Ring Topology 1 MESH TOPOLOGY A Mesh networks provide multiple paths between end nodes. The failure of an individual intermediate node will slow, but not stop network traffic as long as an alternative path is available. As you will see shortly, large networks are usually made up of a mixture of local area networks, links, and connecting nodes, with switches and routers connecting the different networks and links together. Network By default, the result is usually a mesh network. It is also possible to create a mesh network intentionally by Topology design to meet the physical constraints of a particular organization 2 BUS TOPOLOGY A Each node is tapped into the bus along the bus. To communicate, a sending node “broadcasts” a message which travels along the bus. Every other node receives the message. Each node compares its address to that of the message; therefore the message is ignored by every node except that of the desired recipient. Each end of the bus is equipped with a terminator to prevent signals from echoing. Branches can be added to a bus, expanding it into a tree. Messages are still broadcast through the tree. Terminators are placed at the ends of each branch in the tree. Network Bus topology is the easiest to wire. It is only necessary to run a single pair of wires from one end of the network space to the other. Topology Bus topology also has the advantage of low cost, however, traffic congestion is a major issue with bus topology. 3 STAR TOPOLOGY A This topology is used primarily for local area networks, although it is sometimes used in metropolitan and wide area networks to connect individual centers of activity to a central office. In this configuration, all nodes are connected point-to- point to a central device. Nodes communicate through the central device. Switching in the central device connects pairs of nodes together to allow them to communicate directly and Network steers data from one node to another as required. Most modern switches allow multiple pairs of nodes to Topology communicate simultaneously. The switch itself is usually not considered to be a node; once set, it is transparent to the data flowing through it. 4 RING TOPOLOGY A A ring topology consists of a point-to-point connection from each node on the network to the next. The last node on the network is connected back to the first to form a closed ring. Each node retransmits the signal that it receives from the previous node to the next node in the ring. Packets are placed on the loop at a node, and travel Network from node to node until the desired node is reached. Although the ring is inherently unidirectional (data Topology passes through it in one direction), it is possible to build a bidirectional ring network. B Definition of network architecture Network architecture defines the structured interaction between network services, devices, and clients to meet their connectivity requirements. Network architecture refers to the specific design and framework of a particular network. This includes how network devices and services are Network structured to cater to the connectivity requirements of the network’s users. Architectur It lays out the network’s structure, from hardware components like network routers and switches to e protocols and services like DHCP and DNS. It’s about network design and constructing the network itself, focusing on efficient communication, secure data transfer, and performance optimization. C Network Definition A physical or virtual communications link between two or more networks operated by different organizations or operated Interconnectio within the same organization but n within different authorization boundaries. Interconnection networks play a major role in the performance of modern parallel computers. Performance requirements Factors that may affect the choice of an Processes executing in different processors synchronize and appropriate interconnection communicate through the interconnection network. network for C the underlying parallel computer. 1 Scalability A scalable architecture implies that as more processors are added, their memory bandwidth, I/O bandwidth, and network bandwidth should increase proportionally. 2 Incremental expandability Network Customers are unlikely to purchase a parallel computer with a full set of processors and memories. Interconnecti on Partitionability 3 Parallel computers are usually shared by several users at a time. 4 Simplicity Simple designs often lead to higher clock frequencies and may achieve higher performance. 5 Distance span Factors that may affect the choice of an This factor may lead to very different implementations. appropriate interconnection network for C the underlying parallel computer. Reliability and repairability 6 An interconnection network should be able to deliver information reliably. 7 Expected workloads Users of a general-purpose machine may have very different Network requirements. Interconnecti Physical constraints on devices. 8 An interconnection network connects processors, memories, and/or I/O Cost constraints 9 Finally, it is obvious that the “best” network may be too expensive. 1 3.2.2 Illustrate type of computer network A : Local Area Network (LAN) B : Metropolitan Area Network (MAN) Type of Computer Network C : Wide Area Network (WAN) LOCAL AREA NETWORK (LAN) A A local area network (LAN) is a network that connects computers and other supporting devices over a relatively small localized area, typically a room, the floor of a building, a building, or multiple buildings within close range of each other. Usually, most of the computers in a LAN are personal computers or workstations, although there may be larger server computers present, and, sometimes, mobile devices as well. It may be wired or wireless. Most commonly, a LAN will conform to a star or bus topology. Supporting devices might include printers, LAN external storage devices, and routers. Routers, and perhaps gateways, will be used to connect the LAN to other networks LOCAL AREA NETWORK A (LAN) LAN METROPOLITAN AREA B NETWORK (MAN) A metropolitan area network (MAN) is usually defined as a network larger in geographical scope than a local area network, but generally within a range of less than 30 miles or 50 kilometers. A MAN would be used to connect several buildings in an area together or, perhaps, connect a company’s buildings in a city or region together. Some communities have built or plan to build MANs, both for their own use, and as a service utility for their residents and businesses. When the area is relatively small, it may be possible to implement a MAN almost entirely with a combination of LANs and one or MAN more backbone networks, plus some easy-to-manage form of Internet access. More commonly, there is a desire to create network links to connect properties over areas that would require right-of-way access, that is, permission to run wires through somebody else’s property. To obtain right-of-way access, a company generally requires services from a service provider (SP) or other public carrier, and the infrastructure of the MAN begins to resemble that of a wide area network. METROPOLITAN AREA B NETWORK (MAN) MAN WIDE AREA C NETWORK (WAN) Wide area networks are networks designed to facilitate communications between users and applications over large distances—between the various corporate offices of an international organization that are located in cities all over the world, for example. There are two primary compelling reasons for designing and building wide area network capabilities: WAN 1 An organization requires data communication links between widely spread facilities and between an organization and its business partners, customers, and suppliers. 2 An organization requires fast access to the Internet, either as a consumer or as provider of Internet services, or both. WIDE AREA NETWORK C (WAN) WAN Thank you