My Blog List

Search This Blog

Friday, 25 March 2011

operating system unit one notes

Operating system
Introduction
What is an operating system?
1. It is a program that acts as an intermediary b/w a user of computer and computer h/w. The purpose of an operating system is to provide an environment in which a user can execute programs in a convenient &  efficient manner.
2. The OS must ensure the correct operating system. To prevent user programs from interfering with the proper operation of the system, the h/w must provide appropriate mechanisms to ensure such proper  behavior.
3. OS attempt to schedule computational activities to ensure good performance of the computing system.
COMPONENTS OF A COMPUTER SYSTEM
A computer system can be divided into four components:
1. The h/w
2. OS
3. Application programs
4. The users
1. The h/w is the central processing unit, the memory and the i/o devices etc are the h/w devices & provides the basic computing resource.
2. The OS controls & coordinates the use of the h/w among various applications programs for various  users.
3. The Application programs such as MS access, database system s, games 7 business programs, define the way in which these resources are used to solve computing problems of the users.

OS CAN BE VIEWED AS:
1. Resource allocator: Manage & allocates resources.
2. Control programs: It manages the execution of user programs to prevent errors improper use of the computer. It is especially concerned with the operation & control of I/O devices.
3. Kernel: The one program running at all times.

TYPICAL SERVICES PROVIDED BY THE OS:
1. Program Creation
2. Program execution
3. Access to I/O devices.
4. Controlled access to files
5. System access
6. Error detection & response
7. Accounting

OS CONCEPTS:
1. Processes: It is a program in execution. Has main three components:
 An executable program.
 Associated data need by the program.
 Execution context, it includes the information that the OS needs to manage the process & that the processor needs to properly execute the process.
MEMORY MANAGEMENT

User needs a computing environment that supports flexible use of data, efficient & orderly control of storage allocation. An OS has five principle storage management responsibilities as follows:
(a) Process isolation: OS must prevent independent process from interfering with data & memory of each other.
(b) Automatic Allocation & Management: Programs should be dynamically allocated memory. OS can achieve efficiency by assigning memory to jobs only as needed.
(c) Support of modular programming
(d) Protection & access control.
(e) Long term storage: Many users & applications require means for storing information for extended periods.
SCHEDULING & RESOURCE MANAGEMENT
One of the key task of the OS is to manage various resources available to it( Main Memory, I/O devices, processors) & to schedule their use by various active processes.

INFORMATION PROTECTION & SECURITY

OS support a variety of protection & security mechanism to computer system & the information storage in them. Some of the policies are:
(a) No sharing: processes are totally isolated from each other.
(b) Controlled Information Dissemination: In some systems, security classes are defined to enforce a particular dissemination policy.
(c) Access control: In concerned with regulating user access to the total system, the data & regulating process & access to various resources & objects within the system.
(d) Information flow control: Regulates the flow of data within the system & its delivery to the users.
SIMPLE BATCH SYSTEMS
The OS in the early computers was fairly simple. Its major task was to transfer control automatically from one job to the next. The OS was always in memory.
To speed up processing, jobs with similar needs were batched together & were run through the computer as a group. Thus the programmers would leave their programs with the operator. The operator would sort programs into batches with the operator. The operator would sort programs into batches with similar requirements, & as the computer become available, would run each batch.
1. System allowed automatic job sequencing by a resident OS & greatly improved the overall utilization of the computer.
2. In batch system there is lack of interaction b/w the user & the job while the job is executing.
3. The CPU utilization was still low. In this execution environment the CPU is often idle. This idleness occurs because the speed of the mechanical I/O devices are intrinsically slower than those of electronic devices.
4. Batch systems are appropriate for executing large jobs that need little interaction.
5. SPOOLING: the name is an acronym for simultaneous peripheral operation on line. It allows the CPU to overlap the input of one job with the computation & output of the other jobs.
6. Spooling uses the disk as a huge buffer for reading as far ahead as possible on input devices & for storing output files until the output devices are able to accept them.
7. The spool is a buffer that holds output for other devices, such as a printer, that cannot accept interleaved data streams.
Although a printer can serve only one job at a time, several applications may wish to print there output concurrently, without having their output mixed together.
The OS solves this problem by intercepting as output to the printer. Each applications output is spooled to a separate disk file.
When an application finishes printing the spooling system queue picks the next spooled file for input to the printer.
The spooling system copies the queued spool files to the printer one at a time.
(a) Spooling over laps the I/O of one job with the computation of other jobs.
Even in a simple system, the spooler may be reading the input of one job while printing the output of a different job.
(b) Spooling can keep both the CPU and the I/O devices working at much higher rates.

MULTI PROGRMMED SYSTEMS

1. A job pool on the disk consists of a number of jobs that are ready to be executed. Subsets of these jobs reside in the memory for execution.
2. The OS picks & executes one of the jobs in memory.
3. When this job in execution needs an I/O operation to complete, instead of waiting for the job to complete the I/O, it switches to the subset of jobs waiting for CPU.
4. In a non multi programming systems the OS simple switches to & executes another job.
5. If several jobs are ready to be brought into memory and there is not enough room for all of them, then the system must choose among then. Making this decision is job scheduling.

Time Sharing System (Multitasking)
1. Time sharing or multitasking is a logical extension of multiprogramming. Multiple jobs are executed by the CPU switching between them, but the switches occur is frequently that the users may interact with each program while it is running.
2. An interactive computer system provides direct communication b/w the user & the system. the user gives instruction to the OS or to a program directly & receives an immediate response.
3. A time shared oprating system uses CPU scheduling & multiprogramming to provide each user with a small portion of a time shared computer.
4.A time shared OS allows the many users to share the computer simultaneously. Since each action or command in a time shared system tends to be short, only a little CPU time is needed for each user. As the system switches rapidly from one user to the next, each user is given the impression that she has her own computer, whereas actually one one computer shared among many users.

Parallel systems (multiprocessors)


1. Multiprocessor system have more than one processor in close communication, sharing the computer bus, the clock & sometimes memory & peripheral devices. These systems are referred to as tightly coupled systems.
2. One advantage of building this kind of system is increased throughput. By increasing the number of processers we hope to get more work done in a shorter period of time.
3. Multiprocessor can save memory because the processors can share peripherals, cabinets & power supplies. In several programs are to operate on the same set of data, it is cheaper to store those data on one disk & to have all the processors share them, rather than to have many computers with local disks & many copies of data.
4. Another advantage is increased reliability.
5. If functions can be distributed properly among several processors, then the failure of one processor will not halt the system, but rather will only slow it down.
6. The ability to continue providing service proportional to the level of surviving hardware is called graceful degradation. Systems that are designed for graceful degradation also called fault tolerant.
7. Symmetric multiprocessing model: in this each processor runs an identical copy of the OS & these copies communication with one another as needed.
8. Asymmetric multiprocessing: in this each processor is assigned a specific task. A master processor controls the system, the other processors either look to master for instruction or have predefined tasks. This scheme defines a master slave relationship. The master processor schedules & allocates work to the slave processors.

Distributed systems

1. The processors do not share memory or clock; instead each processor has its own local memory. The systems are also referred as loosely coupled systems.
2. Resource sharing: if a number of different sites are connected to one another than a user at one site may be able to use the resources available at another.
3. Computation speedup: if a particular computation can be partitioned into a number of sub computations that can run concurrently then a distributed system may allow us to distribute the computation among the various sites to run that computation concurrently.
4. Reliability: If one site fails in a distributed system, the remaining sites can potentially continue operating.
5. Communication: When many sites are connected to one another by a communication network, the processes at different sites have the opportunity to exchange information.
REAL TIME SYSTEM

1. Used when there are rigid time requirements on the operating of a processor or the flow of data.
2. System that control scientific experiments, medical imaging systems, industrial control systems, & some display systems are real time systems.
3. A real time operating system has well defined, fixed time constraints. Processing must be done within the defined constraints, or the system will fail.
4. Two types of real time systems:
1. A HARD REAL TIME SYSTEM
Guarantees that critical tasks completed on time. This goal requires that all delays in the system be bounded from the retrieval of stored data to the time that it takes the OS to finish any request made of it. Kernel delays need to be bounded.
2. SOFT A HARD REAL TIME SYSTEM
A less restrictive type of real time system is a soft real time system, where a critical real time task gets priority over other tasks, & retains that priority until it completes. Soft real time is an achievable goal that can be mixed with other types of systems. However they have more limited utility than do hard real time system. Given their late of deadline support they are risky to use for industrial control & robotics.

No comments:

Post a Comment