• Home
  • Queen's University
  • Operating Systems
  • Introduction to Operating Systems and Computer-System Organization

Introduction to Operating Systems and Computer-System Organization

1.1 What Operating Systems Do - Computer divided into four components: Hardware, OS, application programs and a user - OS can be viewed as a resource allocator. It manages CPU time, memory space, storage space, I/O devices etc. Facing numerous and conflicting requests for resources, the OS must decide how to allocate them to specific programs and users so that it can operate the computer system efficiently - OS can also be viewed as a control program. A control program manages the execution of user programs to prevent errors and improper use of the computer. It is especially concerned with the operation and control of I/O devices - A common definition is that the OS is the one program running at all times on the computer - usually called the kernel - There are two types of programs along with the kernel: System programs, which are associated with the OS but are not necessarily part of the kernel, and application programs, which include all programs not associated with operation of the system - OS often include not only a core kernel but also middleware, a set of software frameworks that provide additional services to application developers - In summary, the OS includes the always running kernel, middleware frameworks and system programs that aid in managing the system while it is running 1.2 Computer-System Organization - A modern general-purpose computer system consists of one or more CPUs and a number of device controllers connected through a common bus that provides access between components and shared memory - Each device controller is in charge of a specific type of device ffifor example, a disk drive, audio device, or graphics display). - A device controller maintains some local buffer storage and a set of special-purpose registers. - The device controller is responsible for moving the data between the peripheral devices that it controls and its local buffer storage. - Typically, operating systems have a device driver for each device controller. This device driver understands the device controller and provides the rest of the operating system with a uniform interface to the device - The CPU and the device controllers can execute in parallel, competing for memory cycles. To ensure orderly access to the shared memory, a memory controller synchronizes access to the memory. - Hardware may trigger an interrupt at any time by sending a signal to the CPU, usually by way of the system bus. - When the CPU is interrupted, it stops what it is doing and immediately transfers execution to a fixed location. The fixed location usually contains the starting address where the service routine for the interrupt is located. The interrupt service routine executes; on completion, the CPU resumes the interrupted computation. - The interrupt routine is called indirectly through the table, with no intermediate routine needed. Generally, the table of pointers is stored in low memory ffithe first hundred or so locations). These locations hold the addresses of the interrupt service routines for the various devices. This array,