Home | | Operating Systems | Computer System Organization

Computer System Organization - | Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail |

Chapter: Operating Systems - Process and Threads

Computer System Organization

1. Operating System Structure 2. Operating-System Operations

COMPUTER SYSTEM ORGANIZATION


1. Operating System Structure

 

1.1 MS-DOS System Structure

 

ü MS-DOS written to provide the most functionality in the least space.

 

ü Not divided into modules.

 

ü Although MS-DOS has some structure, its interfaces and levels of functionality are not well separated.

 

1.2 Unix System Structure

 

Ø UNIX limited by hardware functionality, the original UNIX operating system had limited structuring. The UNIX OS consists of two separable parts.

 

Ø Systems programs use kernel supported system calls to provide useful functions such as compilation and file manipulation.

 

Ø The kernel - Consists of everything below the system-call interface and above the physical hardware

 

Ø Provides the file system, CPU scheduling, memory management, and other operating-system functions; a large number of functions for one level.

 

1.3 Layered Approach

 

ü The operating system is divided into a number of layers (levels), each built on top of lower layers. The bottom layer (layer 0), is the hardware; the highest (layer N) is the user interface.

 

ü An OS layer is an implementation of an abstract object that is the encapsulation of data and operations that can manipulate those data. These operations (routines) can be invoked by higher-level layers. The layer itself can invoke operations on lower-level layers.

 

ü Layered approach provides modularity. With modularity, layers are selected such that each layer uses functions (operations) and services of only lower-level layers.

 

ü Each layer is implemented by using only those operations that are provided lower level layers.

 

ü The major difficulty is appropriate definition of various layers.

 

1.4 Microkernel System Structure

 

ü Moves as much from the kernel into “user space.

 

ü Communication takes place between user modules using message passing.

 

v Benefits:

 

Ø Easier to extend a microkernel

Ø Easier to port the operating system to new architectures

 

Ø More reliable (less code is running in kernel mode)

 

Ø More secure

 

2. Operating-System Operations

 

ü If there are no processes to execute, no I/O devices to service, and no users to whom to respond, an operating system will sit quietly, waiting for something to happen. Events are almost always signaled by the occurrence of an interrupt or a trap.

 

ü A trap (or an exception) is a software-generated interrupt caused either by an error (for example, division by zero or invalid memory access) or by a specific request from a user program that an operating-system service be performed. The interrupt-driven nature of an operating system defines that system’s general structure.

 

ü Without protection against these sorts of errors, either the computer must execute only one process at a time or all output must be suspect. A properly designed operating system must ensure that an incorrect (or malicious) program cannot cause other programs to execute incorrectly.

 

 

 

 

2.1 Dual-Mode and Multimode 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).

ü A bit, called the mode bit, is added to the hardware of the computer to indicate the current mode: kernel (0) or user (1). With the mode bit, we can distinguish between a task that is executed on behalf of the operating system and one that is executed on behalf of the user.

 

2.2Timer

 

ü 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).

 

ü A variable timer is generally implemented by a fixed-rate clock and a counter.

 

ü The operating system sets the counter. Every time the clock ticks, the counter is decremented. When the counter reaches 0, an interrupt occurs. For instance, a 10-bit counter with a 1-millisecond clock allows interrupts at intervals from 1 millisecond to 1,024 milliseconds, in steps of 1 millisecond.

 

Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail


Copyright © 2018-2021 BrainKart.com; All Rights Reserved. (BS) Developed by Therithal info, Chennai.