For each type of interrupt separa segments of code in the operating system

For each type of interrupt separa segments of code in

This preview shows page 15 - 16 out of 16 pages.

system defines that system’s general structure. For each type of interrupt, separate segments of code in the operating system determine what action should be taken. An interrupt service routine is provided that is responsible for dealing with the interrupt. 1.5.1 Dual-Mode Operation In order to ensure the proper execution of the operating system, we must be able to distinguish between the execution of operating-system code and user- defined code. The approach taken by most computer systems is to provide hardware support that allows us to differentiate among various modes of execution. At the very least, we need two separate modes of operation: user mode and kernel mode (also called supervisor mode , system mode , or privileged mode ). Figure 1.10: Transition from user to kernel mode. 1.5.2 Timer We must ensure that the operating system maintains control over the CPU. We cannot allow a user program to get stuck in an infinite loop or to fail to call system services and never return control to the operating system. To accomplish this goal, we can use a timer . A timer can be set to interrupt the computer after a specified period. The period may be fixed (for example, 1/60 second) or variable (for example, from 1 millisecond to 1 second). 15
Image of page 15
Operating Systems I- Lecture Lecturer: Dr. Sura Z. Alrashid 1.6 Process Management 1.7 Memory Management 1.8 Storage Management To make the computer system convenient for users, the operating system provides a uniform, logical view of information storage. The operating system abstracts from the physical properties of its storage devices to define a logical storage unit, the file . The operating system maps files onto physical media and accesses these files via the storage devices. 1.8.1 File-System Management 1.8.2 Mass-Storage Management 1.8.3 I/O Systems 1.8.4 Caching Caching is an important principle of computer systems. Information is normally kept in some storage system (such as main memory). As it is used, it is copied into a faster storage system—the cache—on a temporary basis. When we need a particular piece of information, we first check whether it is in the cache. If it is, we use the information directly from the cache; if it is not, we use the information from the source, putting a copy in the cache under the assumption that we will need it again soon. Because caches have limited size, cache management is an important design problem. Main memory can be viewed as a fast cache for secondary storage. 1.9 Protection and Security 1.10 Distributed Systems A distributed system is a collection of physically separate, possibly heterogeneous computer systems that are networked to provide the users with access to the various resources that the system maintains. Access to a shared resource increases computation speed, functionality, data availability, and reliability. 16
Image of page 16

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture