Monday, November 16, 2009

Operating System basic terms definition


 

Process state

New         = process is being created

Running     = instructions are being executed

Waiting     = process is waiting for some event to occur

Ready         = process is waiting to be assigned to a processor

Terminated    = process has finished execution


 

Context switch

  • when cpu switch to another process, system must save the state of the old process & load the saved state for new process
  • context switch time is overhead, the system does no useful work while switching
  • time dependent on hardware support


 

Batch processing ( jobs )

  • one jobs is executed at a time
  • programs is a job are executed sequentially
  • Programs are collected together in a batch before processing starts.
  • Each piece of work for a batch processing sys is called a job.
  • Jobs are stored in job queues until computer is ready to process them.


 

Real-time ( processes )

  • OS interleaves execution of processes in an application program to meet it's deadline
  • Used when there are rigid time require on the operation of a processor.
  • Use as a control device in a dedicated sys. (medical imaging)


 

Operating System

  • program that acts as an intermediary between a user of a computer & the computer hardware


 

OS tasks

  • maintain list of authorized users
  • construct a list of all resources in the system
  • initiate execution of programs
  • perform scheduling
  • maintain information for protection
  • handle requests made by users & their programs


 

Virtual memory

  • separation of user logical memory from physical memory
  • allow add spaces to be shared by several processes
  • allow for more efficient process creation
  • can be implemented via:-
    • demand paging
    • demand segmentation


 


 

Paging

  • logical address space of a process can be noncontiguous
    • process is allocated physical memory whenever the latter is available
  • divide physical memory into fixed-sized blocks called FRAMES (size is power of 2, between 512 byte & 8192 byte)
  • divide logical memory into blocks of a same sized called PAGES
  • internal fragmentation


 

CPU scheduling


 

Preemptive 

Non-preemptive 

  • round-robin
  • shortest job first
  • FIFO
  • FCFS
  • SJF
  • Server can be switched to the processing of a new request before completing the current request
  • a server always processes a schedules request to completion
  • depends on reordering of requests to achieve an improvement in user service or system performance


 

Sunday, November 15, 2009

What is a real-time executive?

The core of all operating systems is called a REAL TIME EXECUTIVE (also known as the kernel). Some of the functions that it performs are

  • switching between programs
  • hardware device control and programming
  • memory management
  • process management
  • scheduling (deciding what programs to run)
  • inter-process communication
  • processing of exceptions and interrupts

Our simple security monitoring system would not have all of the above, as it would probably be a single task system, running only one program. As such, it would not need to perform scheduling of more than one program or allow communication to take place between programs (called inter-process communication). Memory management would be unnecessary, as the program would easily fit into the available memory of the computer. An operating system designed to handle a large number of people would need a real-time executive that performs all of the above. User programs are generally stored on disk, thus need to be loaded into memory before being executed. This presents the need for memory management, as the memory of the computer would need to be searched for a free area in which to load a person's program into. When the user was finished running the program, the memory consumed by it would need to be freed up and made available for another user when required.

Process scheduling and management is also necessary, so that all programs would be executed and run fairly. There is no point if a program by a specific user runs to such an extent that it denies the running of any other programs, making every other user wait. In addition, some programs might need to be executed more frequently than others, for example, checking network communications or printing. Some programs may need to be temporarily halted, and then restarted again later, so this introduces the need for inter-program communication.

What are the various parts of an Operating System?


 

In this section we look at that part of the operating system that is responsible for running programs, called the real-time executive or kernel. An operating system for a large-scale computer that is used by many people at once is a very complex system. It contains many millions of lines of instructions (commands that the computer executes) written by programmers. To make operating systems easier to write, they are constructed as a series of modules (programs), each module responsible for one function. Typical modules in a larger multi-user operating system could be:

  • Kernel (also known as the executive)
  • Process manager
  • Scheduler
  • File manager


 

TBC…

Azmi..

Introduction to Operating System


 

Definition:

    An operating system (OS) is a collection of system programs that together control the operation of a computer system.

 
 

Needs of operating system in Computer:
An operating system controls the way in which the computer system functions. In order to do this, the operating system includes programs that:

 
 

Where are operating systems found?
There are many types of operating systems, the complexity of which varies depending upon what type of functions are provided, and what the system is being used for. Some systems are responsible for managing many users on a network. Other operating systems do not manage user programs at all. These are typically found in hardware devices like petrol pumps, airplanes, video recorders, washing machines and car engines.


 

 What are Input and Output devices?
Input and output devices are components that form part of the computer system. These devices are controlled by the operating system.

Input devices provide input signals such as commands to the operating system. These commands received from input devices instruct the operating system to perform some task or control its behavior. Typical input devices are a keyboard, mouse, temperature sensor, air-flow valve or door switch. In the previous example of our simple security control system, the input devices could be door switches, alarm keypad panel and smoke detector units.

Output devices are instruments that receive commands or information from the operating system. Typical output devices are monitor screens, printers, speakers, alarm bells, fans, pumps, control valves, light bulbs and sirens.

 
 


 
 


 

 What is a single-user operating system?
We are all familiar with the concept of sitting down at a computer system and writing documents or performing some task such as writing a letter. In this instance there is one keyboard and one monitor that you interact with.

Operating systems such as Windows 95, Windows NT Workstation and Windows 2000 professional are essentially single user operating systems. They provide you the capability to perform tasks on the computer system such as writing programs and documents, printing and accessing files.

Consider a typical home computer. There is a single keyboard and mouse that accept input commands, and a single monitor to display information output. There may also be a printer for the printing of documents and images.

In essence, a single-user operating system provides access to the computer system by a single user at a time. If another user needs access to the computer system, they must wait till the current user finishes what they are doing and leaves.

Students in computer labs at colleges or University often experience this. You might also have experienced this at home, where you want to use the computer but someone else is currently using it. You have to wait for them to finish before you can use the computer system.

 
 

 What is a multi-user operating system?
A multi-user operating system lets more than one user access the computer system at one time. Access to the computer system is normally provided via a network, so that users access the computer remotely using a terminal or other computer.

In the early days of large multi-user computers, multiple terminals (keyboards and associated monitors) were provided. These terminals sent their commands to the main multi-user computer for processing, and the results were then displayed on the associated terminal monitor screen. Terminals were hard-wired directly to the multi-user computer system.

Today, these terminals are generally personal computers and use a network to send and receive information to the multi-user computer system. Examples of multi-user operating systems are UNIX, Linux (a UNIX clone) and mainframes such as the IBM AS400.


The operating system for a large multi-user computer system with many terminals is much more complex than a single-user operating system. It must manage and run all user requests, ensuring they do not interfere with each other. Devices that are serial in nature (devices which can only be used by one user at a time, like printers and disks) must be shared amongst all those requesting them (so that all the output documents are not jumbled up). If each user tried to send their document to the printer at the same time, the end result would be garbage. Instead, documents are sent to a queue, and each document is printed in its entirety before the next document to be printed is retrieved from the queue. When you wait inline at the cafeteria to be served you are in a queue. Imagine that all the people in the queue are documents waiting to be printed and the cashier at the end of the queue is the printer.

 
 

 Operating system utilities
The operating system consists of hundreds of thousands of lines of program code and stored on hard disk. Portions of the operating system are loaded into computer system memory (RAM) when needed. Utilities are provided for

 
 

 Operating System Interfaces
In addition, the operating system provides each user with an interface that accepts, interprets and executes user commands or programs. This interface is commonly called a SHELL or command line interpreter (CLI). In some systems this might be a simple text mode line-by-line entry using keywords (such as MSDOS or UNIX), in other systems it might be highly graphical using windows and a pointing device such as a mouse (such as X-Windows).

 
 

 Advantages and problems of multi-user operating systems
The advantage of having a multi-user operating system is that normally the hardware is very expensive, and it lets a number of users share this expensive resource. This means the cost is divided amongst the users. It also makes better use of the resources. Since the resources are shared, they are more likely to be in use than sitting idle being unproductive.

One problem with multi-user computer systems is that as more users access it, the performance becomes slower and slower. Another disadvantage is the cost of hardware, as a multi-user operating system requires a lot of disk space and memory. In addition, the actual software for multi-user operating systems tend to cost more than single-user operating systems.

 
 

 What is a multi-tasking operating system?
A multi-tasking operating system provides the ability to run more than one program at once. For example, a user could be running a word processing package, printing a document, copying files to the floppy disk and backing up selected files to a tape unit. Each of these tasks the user is doing appears to be running at the same time.

A multi-tasking operating system has the advantage of letting the user run more than one task at once, so this leads to increased productivity. The disadvantage is that more programs that are run by the user, the more memory that is required.

 
 

Introduction

This blog are purposely done to accomplish the Operating System Assignment in class july 2009 by Mr. Murali.

hope this blog will give some info to the new student.

thanks
azmi.