Menus

Jun 4, 2016

Unit 1: Introduction to Operating System

 Unit 1: Introduction to Operating System
Introduction
An operating system (OS) is a collection of software that manages computer hardware resources and provides common services for computer programs i.e. a system program that manages all the application programs in a computer system. It provides the means for proper use of the resources in the operation of computer system. The operating system is an essential component of the system software in a computer system.
The OS masks the details of the hardware from the programmer and provides the programmer with a convenient interface
for using the system.

History
The history of windows operating system is summarized in following table.
SN
Windows
Release Date
Remarks
1
Windows 1.0
1985 AD
Introduction of first version of MS Paint
2
Windows 2.0
1987 AD
Introduction of Excel and Word
3
Windows 3.0
1990 AD
Introduction of virtual memory, improved graphics and ability to multitask
4
Windows 3.1

Improved font
5
Windows 95
1995 AD
Increased compatibility and user friendliness.
6
Windows 4.0
1996 AD
Follow-up to windows 3.0
7
Windows 98
1998 AD
Improved hardware and hardware drivers, internet explorer, internet connection sharing.
8
Windows 2000
200 AD
Number of plug and play devices, offering the system recovery tool
9
Windows XP
2001 AD
Offers user help through comprehensive help center, ability to consume a number of different types of media
10
Widows Vista
2006 AD
High system requirements and suffered performance and security issues, tended to drain laptop batteries, considered as a flop in technology
11
Windows 7
2009 AD
Eliminates the draw barrack of windows vista. A speedy, stability and minimal system requirements.
12
Windows 8

Redesigned metro-style user interface and windows store, integrated antivirus protection, a virtual hard disk, faster boot time, touch screen, compatibility and the ability to create bootable USB flash drive.

Objectives (Resource manager and extended machine)
Operating Systems have been developed for two main purposes:
·         To schedule computational activities to ensure good performance of the computing system i.e. it allows the computer system resources to be used in an efficient manner (Resource Manager)
·         To provide a convenient environment for the development and execution of the programs i.e. user (extended) machine.
OS as a Resource manager:
A computer consists a set of resources for the movement, storage, and processing of data and for the control of these functions. The OS is responsible for managing these resources. Many resources can be conflicted while requested by various users; the OS is responsible how to allocate them to specific programs and users so that it can operate the computer system efficiently and fairly i.e. To manage the computer resources most effectively the OS decides which program should run at what time, how much memory should be allocated for an execution of a program, where to save the file so that disk space can be optimally utilized etc
Summary:
·         The primary task of OS is to keep track of who is using which resource, to grant resource requests, to mediate conflicting requests from different programs etc.
·         Users often need to share not only hardware, but information (File, Database) as well.
OS as a user (Virtual) Machine:

A computer system consists of one or more processors, main memory and many types of I/O devices such as disk, tapes, terminals, network interfaces, etc. Writing programs for using these hardware resources correctly and efficiently is an extremely difficult job, requires depth knowledge of functions of such resources. Hence to make computer systems usable by a large number of users, OS provides a mechanism to shield programmers and other users from the complexity of hardware resources. This problem is solved by putting a layer of software on top of the bare hardware. This layer of hardware manages all hardware resources of the system, and presents the user with an interface or virtual machine that is easier, safer and efficient to program and use i.e. an OS hides details of hardware resources from programmers and other users.  It provides a high level interface to low-level hardware resources, making it easier for programmers and other users to use a computer system.
        In above figure, OS layer surrounds hardware resources. Then a layer of other system software (such as compiler, interpreter, editors, utilities, etc) and a set of application software (such as commercial data processing applications, scientific and engineering applications, entertainment and educational applications, etc) surrounds OS layer. Finally end users view the computer in terms of the user interfaces of the application programs.
Types of operating system
Operating systems have been evolving through the years.  There are various types of operating systems and some of them are:
Serial Processing
In earlier computer system, the programmer interacted directly with the computer hardware, because there was no operating system. A single group of people designed, built, programmed, operated and maintained each machine. These machines were run from a console consisting of display lights, toggle switches, some form of input device and a printer. Programs in machine code were loaded with the input device (e.g. card reader). If an error halted the program, the error condition was indicated by the lights. The programmer could proceed to examine register and main memory to determine the cause of the error. If the program proceeded to a normal completion, the output appeared on the printer.
Those earlier system has two major problems:
·         Scheduling: Most installation used a sign-up sheet to reserve machine time. Typically, a user could sign up for a multiple of half an hour. Let us consider, if a user might sign up for an hour ad finish in 45 minutes, this will result in wasted computer idle time. On the other hand if the job doesn’t finish in the allotted time, and be forced to stop before resolving the problem.

·         Setup time: a single program could involve loading the compiler and the high level language program (source program) into memory, saving the compiled program (object program), and then loading and linking together the object program and common function. Each of these steps could involve mounting or dismounting tapes or setting up card decks. If an error occurred the hapless user typically had to go back to the beginning of the setup sequence that means considerable amount of time was spent, just in setting up the program to run.

Early machine were very expensive and therefore it was important to maximize machine use. The wasted time caused by scheduling and setup time was unacceptable.

Simple batch system
To overcome the problems of serial processing batch operating system was developed. The first batch operating system was developed in the mid 1950s by General Motors for use on an IBM701.
In such system, a user doesn’t have direct access to the machine. The user submits the job on cards or tape to a computer operator, who batches the jobs together sequentially ad places the entire batch on an input device for the use by the monitor (a piece of software that controls sequence of events). Each program is constructed to branch back to the monitor when it completes processing, at which point the monitor automatically begins loading the next program.
In such system the processor is often idle. The problem is that I/O devices are slow compared to the processor.

Multiprogramming (Third Generation, 1965 – 1980)
Multiprogramming allows the processor to handle multiple batch jobs at a time, multiprogramming can be used to handle multiple interactive jobs.

Time Sharing
The basic technique for a time sharing system is to have multiple users simultaneously using the system through terminals, with the OS interleaving the execution of each user program in a short burst, or quantum of computation.
The first time sharing operating system to be developed was Compatible Time sharing System (CTSS), developed at MIT by a MAC (Machine Aided Cognition, Multiple Access Computers) project. It was developed for the IBM 70 in 1961 and later transferred to an IBM 7094.
Distributed operating System
Distributed systems use multiple central processors to serve multiple real time application and multiple users. Data processing jobs are distributed among the processors accordingly to which one can perform each job most efficiently. The processors communicate with one another through various communication lines (such as high-speed buses or telephone lines). These are referred as loosely coupled systems or distributed systems. Processors in a distributed system may vary in size and function. These processors are referred as sites, nodes, and computers and so on.
Network operating System
Network Operating System runs on a server and provides server the capability to manage data, users, groups, security, applications, and other networking functions. The primary purpose of the network operating system is to allow shared file and printer access among multiple computers in a network, typically a local area network (LAN), a private network or to other networks. Examples of network operating systems are Microsoft Windows Server 2003, Microsoft Windows Server 2008, UNIX, Linux, Mac OS X, Novell NetWare, and BSD.


Function of operating system
Operating system works as a resource manager to manage the resources efficiently in a computer such as processor, memory, input/ output devices etc. To decide about which resources are used by which running programs and how to administer them, is known as the resource management. Operating system assigns the computer resources to processes for an efficient use; therefore, it plays an important role as a resource manager while ensuring the user satisfaction.
To manage the computer resources most effectively the OS decides which program should run at what time, how much memory should be allocated for an execution of a program, where to save the file so that disk space can be optimally utilized etc. Below given are some of the important services performed by operating system as a resource manager:
 
1.   Process Management
In multiprocessing environment, operating system allows more than one application (or process) to run simultaneously. Process management is a part of an operating system which manages the processes in such a way that system performance can be enhanced. The operating system deals with other types of activities also that includes user programs and system programs like as printer spooling virtual memory, swapping etc.
A process is an activity that needs certain resources to complete its task. Various computer resources are CPU time, main memory, and I/O devices. These resources are allocated to the processes and based on decision that which process should be assigned for the allocation of resource and this decision is taken by process management implementing the process scheduling algorithm.
It is important to note that a process is not a program. A process is only ONE instant of a program in execution. There are many processes running the same program.
The five major activities of an operating system in regard to process management are:
·         Creation and deletion of user and system processes.
·         Suspension and re-activation of processes.
·         A mechanism for process synchronization.
·         A mechanism for process communication.
·         A mechanism for deadlock handling.

2.   Main-Memory Management
Memory management is the most important part of an operating system that deals directly with both the primary (known as main memory) memory and secondary memory. The main memory is a large array of bytes and each byte has its own address. Main memory provides the storage for a program that can be accessed directly by the CPU for its exertion. So for a program to be executed, the primary task of memory management is to load the program into main memory.

Memory management performs mainly two functions, these are:
·         Each process must have enough memory in which it has to execute.
·         The different locations of memory in the system must be used properly so that each and every process can run most effectively.
Operating system loads the instructions into main memory then picks up these instructions and makes a queue to get CPU time for its execution. The memory manager tracks the available memory locations which one is available, which is to be allocated or de-allocated. It also takes decision regarding which pages are required to swap between the main memory and secondary memory. This activity is referred as virtual memory management that increases the amount of memory available for each process.

The major activities of an operating system in regard to memory-management are:
·         Keep track of which part of memory are currently being used and by whom.
·         Decide which processes should be loaded into memory when the memory space is free.
·         Allocate and de-allocate memory spaces as and when required.

3.   File Management
A file is a collection of related information defined by its creator. Computer can store files on the disk (secondary storage), which provide long term storage. Some examples of storage media are magnetic tape, magnetic disk and optical disk. Each of these media has its own properties like speed, capacity, and data transfer rate and access methods.

A file system is normally organized into directories to make ease of their use. These directories may contain files and other directories. Every file system is made up of similar directories and subdirectories. Microsoft separates its directories with a back slash and its file names aren't case sensitive whereas Unix-derived operating systems (including Linux) use the forward slash and their file names generally are case sensitive.

The main activities of an operating system in regard to file management are creation and deletion of files/ folders, support of manipulating files/ folders, mapping of files onto secondary storage and taking back up of files.

4.   I/O device Management
Input/ Output device, management is a part of an operating system that provides an environment for the better interaction between system and the I/O devices (such as printers, scanners tape drives etc.). To interact with I/O devices in an effective manner, the operating system uses some special programs known as device driver. The device drivers take the data that operating system has defined as a file and then translate them into streams of bits or a series of laser pulses (in regard with laser printer).

A device driver is a specific type of computer software that is developed to allow interaction with hardware devices. Typically this constitutes an interface for , communicating with the I/O device, through the specific computer bus or communication subsystem that the hardware is connected with. The device driver is a specialized hardware dependent computer program that enables another program, typically an operating system to interact transparently with a hardware device, and usually provides the required interrupt handling necessary for the time dependent hardware interfacing.

5.   Secondary-Storage Management
A computer system has several levels of storage such as primary storage, secondary storage and cache storage. But primary storage and cache storage can not be used as a permanent storage because these are volatile memories and its data are lost when power is turned off Moreover, the main memory is too small to accommodate all data and programs. So the computer system must provide secondary storage to backup the main memory. Secondary storage consists of tapes drives, disk drives, and other media.
The secondary storage management provides an easy access to the file and folders placed on secondary storage using several disk scheduling algorithms.
The four major activities of an operating system in regard to secondary storage management are:
·         Managing the free space available on the secondary-storage device.
·         Allocation of storage space when new files have to be written.
·         Scheduling the requests for memory access.
·         Creation and deletion of files.

6.   Network Management
An operating system works as a network resource manager when multiple computers are in a network or in a distributed architecture. A distributed system is a collection of processors that do not share memory, peripheral devices, or a clock. The processors communicate with one another through communication lines called network. The communication-network design must consider routing and network strategies, and the problems with network and security.
Most of today's networks are based on client-server configuration. A client is a program running on the local machine requesting to a server for the service, whereas a server is a program running on the remote machine providing service to the clients by responding their request.

7.   Protection / Security (User Authentication)
Protection refers to mechanism for controlling the access of programs, processes, or users to the resources defined by a computer system i.e. It is an ability to authenticate the users for an illegal access of data as well as system. It is the most demanding feature of an operating system.
Operating system provides various services for data and system security by the means of passwords, file permissions and data encryption. Generally computers are connected through a network or Internet link, allowing the users for sharing their files accessing web sites and transferring their files over the network. For these situations a high level security is expected. E.g. software firewalls.
If a computer system has multiple users and allows the concurrent execution of multiple processes, then the various processes must be protected from one another's activities.

8.   Command Interpreter System
A command interpreter is an interface of the operating system with the user. The user gives commands which are executed by operating system (usually by turning them into system calls). The main function of a command interpreter is to get and execute the user specified command.
Command-Interpreter is usually not a part of the kernel, since multiple command interpreters may be supported by an operating system, and they do not really need to run in kernel mode. There are two main advantages of separating the command interpreter from the kernel.
If you want to change the way the command interpreter looks, i.e., you want to change the interface of command interpreter, then you can do that if the command interpreter is separate from the kernel. But if it is not then you cannot change the code of the kernel and will not be able to modify the interface. If the command interpreter is a part of the kernel; it is possible for an unauthenticated process to gain access to certain part of the kernel. So it is advantageous to have the command interpreter separate from kernel.
Different views of OS

Operating systems have been evolving through the years. The history of OS is closely tied to the architecture of the computers on which they run.

Serial Processing (First Generation, 1945-55)
In earlier computer system, from the late 1940s to the mid 1950s, the programmer interacted directly with the computer hardware, because there was no operating system. A single group of people designed, built, programmed, operated and maintained each machine. These machines were run from a console consisting of display lights, toggle switches, some form of input device and a printer. Programs in machine code were loaded with the input device (e.g. card reader). If an error halted the program, the error condition was indicated by the lights. The programmer could proceed to examine register and main memory to determine the cause of the error. If the program proceeded to a normal completion, the output appeared on the printer.
Those earlier system has two major problems:
Scheduling: Most installation used a sign-up sheet to reserve machine time. Typically, a user could sign up for a multiple of half an hour. Let us consider, if a user might sign up for an hour ad finish in 45 minutes, this will result in wasted computer idle time. On the other hand if the job doesn’t finish in the allotted time, and be forced to stop before resolving the problem.

Setup time: a single program could involve loading the compiler and the high level language program (source program) into memory, saving the compiled program (object program), and then loading and linking together the object program and common function. Each of these steps could involve mounting or dismounting tapes or setting up card decks. If an error occurred the hapless user typically had to go back to the beginning of the setup sequence that means considerable amount of time was spent, just in setting up the program to run.

Early machine were very expensive and therefore it was important to maximize machine use. The wasted time caused by scheduling and setup time was unacceptable.

Simple batch system (Second Generation, 1955-65)
To overcome the problems of serial processing batch operating system was developed. The first batch operating system was developed in the mid 1950s by General Motors for use on an IBM701.
In such system, a user doesn’t have direct access to the machine. The user submits the job on cards or tape to a computer operator, who batches the jobs together sequentially ad places the entire batch on an input device for the use by the monitor (a piece of software that controls sequence of events). Each program is constructed to branch back to the monitor when it completes processing, at which point the monitor automatically begins loading the next program.
In such system the processor is often idle. The problem is that I/O devices are slow compared to the processor.

Multiprogramming (Third Generation, 1965 – 1980)
Multiprogramming allows the processor to handle multiple batch jobs at a time, multiprogramming can be used to handle multiple interactive jobs.

Time Sharing
The basic technique for a time sharing system is to have multiple users simultaneously using the system through terminals, with the OS interleaving the execution of each user program in a short burst, or quantum of computation.
The first time sharing operating system to be developed was Compatible Time sharing System (CTSS), developed at MIT by a MAC (Machine Aided Cognition, Multiple Access Computers) project. It was developed for the IBM 70 in 1961 and later transferred to an IBM 7094.

Type of Operating System Services
1)  Program Execution 
The purpose of computer system is to allow the users to execute programs in an efficient manner. The operating system provides an environment where the user can conveniently run these programs. The user does not have to worry about the memory allocation or de-allocation or any other thing because these things are taken care of by the operating system.
To run a program, the program is required to be loaded into the RAM first and then to assign  CPU time for its execution. Operating system performs this function for the convenience of the user. It also performs other important tasks like allocation and de-allocation of memory, CPU scheduling etc.

2)  I/O Operations  
Each program requires an input and after processing the input submitted by user it produces output. This involves the use of I/O devices. The operating system hides the user from all these details of underlying hardware for the I/O. So the operating system makes the users convenient to run programs by providing I/O functions. The I/O service cannot be provided by user-level programs and it must be provided by the operating system.

3)  File System Manipulation
While working on the computer, generally a user is required to manipulate various types of files like as opening a file, saving a file and deleting a file from the storage disk. This is an important task that is also performed by the operating system.
Thus operating system makes it easier for the user programs to accomplish their task by providing the file system manipulation service. This service is performed by the 'Secondary Storage Management' a part of the operating system.

4)  Communication
Operating system performs the communication among various types of processes in the form of shared memory. In multitasking environment, the processes need to communicate with each other and to exchange their information. These processes are created under a hierarchical structure where the main process is known as parent process and the sub processes are known as child processes.

5)  Error Detection
Operating system also deals with hardware problems. To avoid hardware problems the operating system constantly monitors the system for detecting the errors and fixing these errors (if found). The main function of operating system is to detect the errors like bad sectors on hard disk, memory overflow and errors related to I/O devices. After detecting the errors, operating system takes an appropriate action for consistent computing.

This service of error detection and error correction cannot be handled by user programs because it involves monitoring the entire computing process. These tasks are too critical to be handed over to the user programs. A user program, if given these privileges; can interfere with the corresponding operation of the operating systems.

6)  Resource allocation
In the multitasking environment, when multiple jobs are running at a time, it is the responsibility of an operating system to allocate the required resources (like as CPU, main memory, tape drive or secondary storage etc.) to each process for its better utilization. For this purpose various types of algorithms are implemented such as process scheduling, CPU scheduling, disk scheduling etc.

7)  Accounting
Operating system keeps an account of all the resources accessed by each process or user. In multitasking, accounting enhances the system performance with the allocation of resources to each process ensuring the satisfaction to each process.

8)  Protection System
If a computer system has multiple users and allows the concurrent execution of multiple processes, then the various processes must be protected from one another's activities.

1 comment:

  1. Hi Just Imagine: Unit 1: Introduction To Operating System >>>>> Download Now

    >>>>> Download Full

    Hi Just Imagine: Unit 1: Introduction To Operating System >>>>> Download LINK

    >>>>> Download Now

    Hi Just Imagine: Unit 1: Introduction To Operating System >>>>> Download Full

    >>>>> Download LINK

    ReplyDelete

Contact Form

Name

Email *

Message *