You are on page 1of 4

What is OS?

A program that controls the execution of application programs, and act as an interface between the application and the computer hardware. It has 3 objectives: o Convenience; makes computer more convenient to use. o Efficiency; allows us to use computer resources in an efficient manner. o Ability to evolve; allow for further development to allow to system functions.

OS as a user/computer interface

OS provides a variety of services in the following areas: 1. Program development: editors, debuggers they are tools supplied with the OS. 2. Program execution: automate a number of steps to execute a program. 3. Access to I/O devices: act as a faade to I/O devices. 4. Controlled access to files: provide protection mechanism to control access to files. 5. System access: protect system data and resources from unauthorized users. 6. Error detection and response: detect program and hardware errors so as to clear the error condition with the least impact on the running applications. 7. Accounting: monitoring system resources and collect usage statistics, help in judging whether to upgrade the resources or it is efficient enough.

OS as a Resource Manager

Memory allocation is controlled by the OS and the MMU (Memory Management Unit). The OS decides when I/O device can be used by a program in execution. Control access to and use of files. The processor operation itself is controlled by the OS, that OS decides how much time the processor can spend on a particular program.

What makes OS evolve ?


1. Hardware upgrades and new types of hardware: New types of hardware require that the OS be able to deal with it, so OS should be built with support for that hardware. 2. New services: OS offers new services demanded by the users or system managers. 3. Bug Fixes: Bugs appear over time, and detected by users, so OS should be fixed for this bugs, and sometimes fixing a bug raise another bug.

OS Evolution

In the dark ages, when there was no OS from late 1940s to mid-1950s (I call this years: before OS, abbreviated BOS like BC) the programmer had to deal directly with the computer hardware, These computers were run from a console consisting of display lights, toggle switches, some form of input device.

Serial Processing:
o

o o

This systems presented two main problems 1. Scheduling: users had to sign-up sheet to reserve computer time, users couldnt`t know precisely how long it will take to finish their program. 2. Setup time: A single program called a job had to be installed before used with its compiler and code, saving the object program and linking and so on to run the program. Users have access to computer in series. Simple Batch Systems
Monitor: a software program that handle executing the jobs provided by

the user on tapes or disks.

Multiprogrammed Batch Systems


o o

o o

The I/O devices are much slower than the processor, leaving the processor idle most of the time waiting for the I/O devices to finish their operations. Uniprogramming: the processor starts executing a certain program and when it reaches an I/O instructions, it must wait until that I/O instructions is fully executed before proceeding. Multiprogramming: in contrast to the uniprogramming, when a job needs to wait for an I/O instruction, the processor switches to another job executing it until the first job finishes its waiting I/O instructions, the processor continue to swap between jobs as it reaches an I/O operation. Multiprogramming batch system must rely on certain hardware capabilities such as process switching when swapping between program execution. Interrupt-driven I/O or DMA helps a lot in multiprogramming environments, allowing the processor to issues an I/O command and proceed executing another program.

Time-Sharing Systems
o

As multiprogramming allows processor to handle multiple batch jobs at time, it can allow the processor to handle multiple interactive jobs at time, through time sharing. Time Slicing: there is a system clock that generates interrupts at a constant rate, allowing the OS regain control and assign the processor to another process.

Time sharing and multiprogramming raise a host for new problems


If multiple jobs are in memory they must be protected from interfering with each other. File systems must be protected from access by unauthorized users.

The programs contention for resources (mass storage, printer, ) must be handled by the OS.

Major Achievements in OS

The Process o Possible Definitions: A program in execution. An instance of a program running on a computer. o The interrupt helped programmers in developing early multiprogramming and multiuser interactive systems. o Errors caused by handling more than one process at time is:
1.

Improper synchronization Failed mutual exclusion: allow only one routine at a time to perform an update against the file. Non-determinate program operation: programs may interfere with each other when they share memory and their process is interleaved by the processor. Deadlocks: 2 programs hung up waiting for each others to release a resource.

The execution context or the process state is the internal data by which the OS is able to control the process. o The context contains the content of the processor registers, as with information to use by the OS as the priority of the process. Memory Management o Process Isolation: OS should prevent independent processes from interfering with each other. o Automatic allocation and management: Programs should be dynamically allocated, and allocation should be transparent to the programmer. o Support of modular programming: Programmers should be able to write their own programs and create, destroy and alter the size of it dynamically. o Long-term storage: saving information for extended periods of time. o Protection and access control. Information Protection and Security o the use of time-sharing systems, computer networks has brought concern for the protection of information. o We are concerned with the problem of controlling access to the computer system. o Work in this area can be grouped in:
o

Availability: protect the system against interruption. Confidentiality: users cannot read data for which access is unauthorized.

Data integrity: protection of data from unauthorized modification. Authenticity: verification of the identity of the users and validity messages. Scheduling and Resource Management o Any resource allocation and scheduling policy must consider:

Fairness: jobs of the same class competing for a resource are to be given equal and fair access to that resource. Differential responsiveness. Efficiency: OS should maximize processor utilization, minimize response time, and accommodate as many users as possible. OS elements involved in the scheduling of process and the allocation of resources in a multiprogramming environment:

Short-term queue: contains processes in the main memory and are ready to run as soon as the processor is made available. Short-term scheduler: decides which process in the short-term queue to use the processor, a common strategy is to give each process some time in term (round-ribbon) technique. Long-term queue: list of all new jobs waiting to use the processor, the OS adds jobs to the system by transferring process from the long-term queue to the short-term queue. I/O queues: each device has a queue for the processes waiting to use that device; it is the OS that decide which process to assign to an available I/O device.

You might also like