os and its functions

13
SUBJECT NAME:-OPERATING SYSTEM SUBJECT CODE: - 140702 . UNIT-1 Content of Unit-1 What is an OS? Evolution of OS OS Services Types of OS Concepts of OS Different view of OS Concepts of OS 1

Upload: sharad-kumbharana

Post on 06-Sep-2015

219 views

Category:

Documents


5 download

DESCRIPTION

It describes about OS and Its functions

TRANSCRIPT

  • SUBJECT NAME:-OPERATING SYSTEM SUBJECT CODE: - 140702

    .

    UNIT-1Content of Unit-1

    What is an OS?

    Evolution of OS

    OS Services

    Types of OS

    Concepts of OS

    Different view of OS

    Concepts of OS

    1

  • SUBJECT NAME:-OPERATING SYSTEM SUBJECT CODE: - 140702

    What is an OS?Operating System:-Operating System is Program that Manage the Computer Hardware

    An Operating System is Interface between User and Hardware.

    The OS coordinates multiple applications and users (multiple processes) in a fair and efficient manner.

    The goal in OS development is to make the machine convenient to use (a software engineering problem) and efficient (a system and engineering problem)

    An operating system is the most important software that runs on a computer. It manages the computer's memory, processes, and all of its software and hardware. It also allows you to communicate with the computer without knowing how to speak the computer's "language." Without an operating system, a computer is useless.

    Operating System also Provides a Basis of for application program and acts as an intermediary between the computer user and computer hardware.

    Operating System is large and complex ,it must be created piece by piece .Each of These pieces should be a well delineated portion of system ,with carefully defined Input ,outputs and function .

    OS FUNCTIONS

    At the simplest level, an operating system does two things:1. It manages the hardware and software resources of the system. In a desktop computer, these resources include such things as the processor, memory, disk space and more (On a cell phone, they include the keypad, the screen, the address book, the phone dialer, the battery and the network connection). 2. It provides a stable, consistent way for applications to deal with the hardware without having to know all the details of the hardware.

    2

  • SUBJECT NAME:-OPERATING SYSTEM SUBJECT CODE: - 140702

    The first task, managing the hardware and software resources, is very important, as various programs and input methods compete for the attention of the central processing unit (CPU) and demand memory, storage and input/output (I/O) bandwidth for their own purposes. In this capacity, the operating system plays the role of the good parent, making sure that each application gets the necessary resources while playing nicely with all the other applications, as well as husbanding the limited capacity of the system to the greatest good of all the users and applications.

    The second task, providing a consistent application interface, is especially important if there is to be more than one of a particular type of computer using the operating system, or if the hardware making up the computer is ever open to change. A consistent application program interface (API) allows a software developer to write an application on one computer and have a high level of confidence that it will run on another computer of the same type, even if the amount of memory or the quantity of storage is different on the two machines.

    Even if a particular computer is unique, an operating system can ensure that applications continue to run when hardware upgrades and updates occur. This is because the operating system -- not the application -- is charged with managing the hardware and the distribution of its resources. One of the challenges facing developers is keeping their operating systems flexible enough to run hardware from the thousands of vendors manufacturing computer equipment. Today's systems can accommodate thousands of different printers, disk drives and special peripherals in any possible combination.

    Evolution of OSOperating system has been Evolving through the years. we can distribute the evolution in up to 4th generation.

    3

  • SUBJECT NAME:-OPERATING SYSTEM SUBJECT CODE: - 140702

    The first computersused batch operating systems, in which the computer ran batches of jobs without stop. Programs were punched into cards that were usually copied to tape for processing. When the computer finished one job, it would immediately start the next one on the tape.

    Professional operators, not the users, interacted with the machine. Users dropped jobs off, then returned to pick up the results after their jobs had run. This was inconvenient for the users, but the expensive computer was kept busy with a steady stream of jobs.

    In the 1960s, time-shared operating systems began replacing batch systems. Users interacted directly with the computer via a printing terminal like the WesternElectric Teletype shown here.

    Several users shared the computer at the same time, and it spent a fraction of a second on each one's job before moving on to the next. A fast computer could work on many user's jobs at the same time, while creating the illusion that they were receiving its full attention.

    Printing terminals required that programshad character orcommand-

    4

  • SUBJECT NAME:-OPERATING SYSTEM SUBJECT CODE: - 140702

    line user interfaces (CLI), in which the user typed responses to prompts or typed commands. The interaction scrolled down a roll of paper.

    Printing terminals were later replaced by video terminals that could only display fixed size characters. Some could be used to create forms on the screen, but many simply scrolled like a "glass Teletype."

    Personal computers became affordable in the mid 1970s. TheAltair 8800, shown here, was the first commercially viable personal computer marketed to individuals. Beginning in January 1975, the Altair was sold to hobbyists in kit form. The Altair did not have an operating system, since it had only toggle switches and light-emitting diodes for input and output.

    people soon connected terminals and floppy disk drives to Altairs. In 1976, Digital Research introduced the CP/M operating system for the Altair and computers like

    5

  • SUBJECT NAME:-OPERATING SYSTEM SUBJECT CODE: - 140702

    it. CP/M and later DOShad CLIs that were similar to those of the time-shared operating systems, but the computer was dedicated to a single user, not shared.

    As hardware prices fell, personal computers with bit-mappeddisplays that could control individual pixels were developed. These made personal computer with graphical user interfaces(GUIs) possible.

    The first commercial success was the Apple Macintosh which was introduced in 1984. The initial Macintosh pushed the state of the hardware art, and was restricted to a small, monochrome display.

    As hardware continued to evolve, larger, color Macs were developed and Microsoft introduced Windows, their GUI operating system.

    6

  • SUBJECT NAME:-OPERATING SYSTEM SUBJECT CODE: - 140702

    The Macintosh operating system was based on decades of research on graphically-oriented personal computer operating systems and applications.

    This photo of shows Ivan Sutherland's pioneering programSketchpad in the early 1960s. Sketchpad foreshadowed many of the characteristics of a modern GUI, but the hardware cost millions of dollars and filled a room. After many generations of research projects on large computers and improvement in hardware, the Macintosh became economically feasible.

    Research prototypes like Sketchpad are still being developed at universities and in research labs. They will form the basis of future products.

    OS ServicesFollowing are the five services provided by an operating systems to the convenience of the users.

    (1) Program Execution

    The purpose of a computer systems is to allow the user to execute programs. So the operating systems provides an environment where the user can conveniently run programs. The user does not have to worry about the memory allocation or multitasking or anything. These things are taken care of by the operating systems.

    7

  • SUBJECT NAME:-OPERATING SYSTEM SUBJECT CODE: - 140702

    Running a program involves the allocating and deallocating memory, CPU scheduling in case of multiprocess. These functions cannot be given to the user-level programs. So user-level programs cannot help the user to run programs independently without the help from operating systems.

    (2)I/O Operations

    Each program requires an input and produces output. This involves the use of I/O. The operating systems hides the user the details of underlying hardware for the I/O. All the user sees is that the I/O has been performed without any details. So the operating systems by providing I/O makes it convenient for the users to run programs.

    For efficiently and protection users cannot control I/O so this service cannot be provided by user-level programs.

    (3)File System Manipulation

    The output of a program may need to be written into new files or input taken from some files. The operating systems provides this service. The user does not have to worry about secondary storage management. User gives a command for reading or writing to a file and sees his her task accomplished. Thus operating systems makes it easier for user programs to accomplished their task.

    This service involves secondary storage management. The speed of I/O that depends on secondary storage management is critical to the speed of many programs and hence I think it is best relegated to the operating systems to manage it than giving individual users the control of it. It is not difficult for the user-level programs to provide these services but for above mentioned reasons it is best if this service s left with operating system.

    (4)Communications

    There are instances where processes need to communicate with each other to exchange information. It may be between processes running on the same computer or running on the different computers. By providing this service the operating system relieves the user of the worry of passing messages between processes. In

    8

  • SUBJECT NAME:-OPERATING SYSTEM SUBJECT CODE: - 140702

    case where the messages need to be passed to processes on the other computers through a network it can be done by the user programs. The user program may be customized to the specifics of the hardware through which the message transits and provides the service interface to the operating system.

    (5) Error Detection

    An error is one part of the system may cause malfunctioning of the complete system. To avoid such a situation the operating system constantly monitors the system for detecting the errors. This relieves the user of the worry of errors propagating to various part of the system and causing malfunctioning.

    This service cannot allowed to be handled by user programs because it involves monitoring and in cases altering area of memory or de allocation of memory for a faulty process. Or may be relinquishing the CPU of a process that goes into an infinite loop. These tasks are too critical to be handed over to the user programs. A user program if given these privileges can interfere with the correct (normal) operation of the operating systems.

    Types Of OS An operating system is the single most important software when you run a computer, it is what takes care of pretty much everything on a computer system, while the majority of computers we see happen to be using one type of operating system performing the same functions, operating systems can be branched into several different types as well.

    (1) Batch Processing Operating System

    In a batch processing operating system interaction between the user and processor is limited or there is no interaction at all during the execution of work. Data and programs that need to be processed are bundled and collected as a batch and executed together.Batch processing operating systems are ideal in situations where:- There are large amounts of data to be processed. - Similar data needs to be processed. - Similar processing is involved when executing the data.

    9

  • SUBJECT NAME:-OPERATING SYSTEM SUBJECT CODE: - 140702

    The system is capable of identifying times when the processor is idle at which time batches maybe processed. Processing is all performed automatically without any user intervention.

    (2) Real-time Operating System

    A real-time operating system processes inputs simultaneously, fast enough to affect the next input or process. Real-time systems are usually used to control complex systems that require a lot of processing like machinery and industrial systems.

    (3) Single User Operating System

    A single user OS as the name suggests is designed for one user to effectively use a computer at a time.

    (4) Multi-Tasking Operating System

    In this type of OS several applications maybe simultaneously loaded and used in the memory. While the processor handles only one application at a particular time it is capable of switching between the applications effectively to apparently simultaneously execute each application. This type of operating system is seen everywhere today and is the most common type of OS, the Windows operating system would be an example.

    (5) Multi-User Operating System

    This type of OS allows multiple users to simultaneously use the system, while here as well, the processor splits its resources and handles one user at a time, the speed and efficiency at which it does this makes it apparent that users are simultaneously using the system, some network systems utilize this kind of operating system.

    (6) Distributed Operating System

    In a distributed system, software and data maybe distributed around the system, programs and files maybe stored on different storage devices which are located in different geographical locations and maybe accessed from different computer terminals.While we are mostly accustomed to seeing multi-tasking and multi-user operating systems, the other operating systems are usually used in companies and firms to power special systems

    10

  • SUBJECT NAME:-OPERATING SYSTEM SUBJECT CODE: - 140702

    Different Views Of OSThere are two views for OS .one is from user side and another is from System Side

    User's View

    The user view of the computer varies by the interface being used. Most computer users sit in front of a PC, consisting of a monitor, keyboard, mouse and system unit. Such a system is designed for one user to monopolize its resources, to maximize the work that the user is performing. In this case,the operating system is designed mostly for ease of use, with some attention paid to performance, and none paid to resource utilization.

    Some users sit at a terminal connected to a mainframe or minicomputer. Other users are accessing the same computer through other terminals. These users share resources and may exchange information. The operating system is designed to maximize resource utilization.

    Other users sit at workstations, connected to networks of other workstations and servers. These users have dedicated resources at their disposal, but they also share resources such as networking and servers.

    Recently, many varieties of handheld computers have come into fashion. These devices are mostly standalone, used singly by individual users. Some are connected to networks, either directly by wire or through wireless modems. Due to power and interface limitations they perform relatively few remote operations. These operating systems are designed mostly for individual usability, but performance per amount of battery life is important as well.

    Some computers have little or no user view. For example, embedded computers in home devices and automobiles may have numeric keypad, and may turn indicator lights on or off to show status, but mostly they and their operating systems are designed to run without user intervention.

    Systems View

    We can view an operating system as a resource allocator. A computer system has many resources - hardware and software - that may be required to solve a problem. The operating system acts as the manager of these resources.

    11

  • SUBJECT NAME:-OPERATING SYSTEM SUBJECT CODE: - 140702

    An operating system can also be viewed as a control program that manages the execution of user programs to prevent errors and improper use of the computer. It is especially concerned with the operation and control of I/O devices.

    We have no universally accepted definition of what is part of the operating system. A simple viewpoint is that it includes everything a vendor ships when you order the operating system.

    A more common definition is that the operating system is the one program running at all times on the computer (usually called the kernel), with all else being application programs. This is the one that we generally follow.

    Operating System Concepts(1)Processes:-Program which is in Execution is known as process. A Key Concepts in all Operating System is process. Each process is its address space, a list of memory location from 0 to some maximum, which the process can read or write.

    The address Space Contains executable program, the programs data and its stack.

    A process is fundamentally a container that holds all the information needed to run the program. the details of process we will see in next chapter.

    (2)Address Spaces:-Every Computer has some main memory that it use to hold executing programs. In a Very Simple operating system, only one program at a time is in memory .to run a second program, the first one has to be removed and second placed in memory.

    More sophisticated operating system allows multiple programs to be in memory at a same time. to keep them for interfacing with one another ,some kind of protection mechanism is needed. While this mechanism has to be in hardware and its controlled by the operating system.

    12

  • SUBJECT NAME:-OPERATING SYSTEM SUBJECT CODE: - 140702

    Address space is the amount of memory allocated for all possible addresses for a computational entity, such as a device, a file, a server, or a networked computer. Address space may refer to a range of either physical or virtual addresses accessible to a processor or reserved for a process

    . As unique identifiers of single entities, each address specifies anentity's location (unit of memory that can be addressed separately). On a computer, each computer device and process is allocated address space, which is some portion of the processor's address space. A processor's address space is always limited by the width of its address bus and registers

    (3)Files:-Anothor key concepts of operating System are File. and we will briefly discuss it in File management Chapter.

    (4)The Shell: - The outermost layer of a program. Shell is another termfor interface. Operating and applications sometimes provide an alternative shell to make interaction with the program easier. For example, if the application is usually command driven, the shell might be a menu-driven system that translates the user's selections into the appropriate commands.Sometimes called command shell, a shell is the processor interface. The command processor is the program that executes operating system commands. The shell, therefore, is the part of the command processor that accepts commands. After verifying that the commands are valid, the shell sends them to another part of the command processor to be executed.UNIX systems offer a choice between several different shells, the most popular being the Cshell, the Bourne shell, and the Korn shell. Each offers a somewhat different command language

    13