You are on page 1of 8

Unit2, Operating system, Photoshop 7.

UNIT-2
OPERATING SYSTEM

An operating system is a program that manages the computer hardware. It also provides the basic for application program and acts as an intermediary between a user of a computer and computer hardware. An operating system is a very important part of almost every computer system. A computer system can be divided roughly into four major components. Hardware. Operating system. Application program Users Abstract view of the components of a computer system:-

Application Software
Spreadsheets Database Computer Games Internet Browser Word Processors

Operating System

System Software Hardware Utilities


CPU, Disks, Mouse, Printer, etc

The operating system controls and coordinates the use of hardware among the various application programs for the various users, manages system resources and supervises interaction between the system and its users. Definition: An operating system is a software program that is designed to act as an interface between a user of the computer and the computer hardware. The operating system is the first program loaded into the computer as it boots and it remains in memory at all time there after. Purpose (System Goals) The purpose of an operating system is to provide an environment in which a user can execute program.

Unit2, Operating system, Photoshop 7.0 The primary goal of an operating system is to make the computer system convenient to use. The secondary goal is to use the computer hardware in an efficient manner. Users view The user view of the computer varies by the interface being used. Most users sit in front of a PC. In this case, the operating system is designed mostly for ease of use. Some attention is paid to performance and none towards resource utilization. Some users sit at a terminal connected to mainframe or minicomputer. Other users are accessing the same computer through other terminals. These user share resources and may exchange information. The operating system in this case is designed to maximize resource utilization to assure that all available CPU time, memory and I/O are used efficiently and that no individual user takes more than his/her fair share. Systems view From the computer point of view the operating system is the program that is most intimate with the hardware. An operating system can be viewed as resource allocator. A computer system has many resources the OS acts as a manager of these resources like CPU time, memory space, file storage space, I/O device etc. FUNCTION OF OPERATING SYSTEM Command interpreter Peripheral manager Memory manager Process manager

Command interpreter The OS interprets the command typed by the users and translate it to the machine language. In the same way it also translates the result of command in the language which the user understands. This is called command interpreter. Peripheral manager The OS manages the devices attached to system. The OS manages how the input is taken from the keyboard and how the output goes to the monitor and printer. This is called peripheral management. Memory manager Within a computer there may be several different processes which require memory. The decision to allocate memory for a particular process is taken by the OS and it is called memory management. Process manager

Unit2, Operating system, Photoshop 7.0 Also there may be several different processes going on simultaneously within a computer. The amount of time spent on a process by CPU is also decided by OS .This is called process management. TYPES OF OPERATING SYSTEM Mainframe System Mainframe computer system ware the first computer used to handle many commercial and scientific applications The growth of mainframe system was through the following stages 1. Batch system 2. Multiprogrammed system 3. Time shared system 1. Batch system Early computers ware physically large machine. The common input devices were card readers and tape drives. The common output devices were line printers, tape drives and card punches. The user did not interact directly with the computer system instead the user prepared a job which consisted of the program data and some control information and submitted it to the computer operator, At some later time the output appeared. The operating system in these computers are very simple, its main task is to transfer control automatically from one job to the next. The operating system always resides in memory. To speed up processing operators batched together jobs with similar needs and run them together as a group. Disadvantage In this execution environment the CPU is often sit idle because the speed of I/O devices are much slower than those of CPU. 2. Multiprogrammed system Single CPU executes a number of independent programs concurrently. Multiprogramming increasing CPU utilization by organizing jobs so that the CPU always has one job to execute. The idea is as follows The operating system keeps several jobs in memory simultaneously. The OS picks and begins to execute one of the jobs in memory. In case the job may have to wait for some task like I/O operation, the CPU simply switches and executes another job and so on. As long as there is at least one job to be executed, the CPU is never idle. All jobs that enter the system are kept in the job pool. This pool consists of all process residing on disc awaiting allocation of main memory. 3

Unit2, Operating system, Photoshop 7.0 If several jobs are ready to be brought in to memory and if there is not enough space for all of them then the system must select any one of them, making the decision is known as scheduling. When OS selects a job from the job pool, it loads that job in to memory for execution. Having several programs in memory at the same time requires some from of memory management. If several jobs are ready to run at the same time the system must choose, among them. And making this decision is known as CPU scheduling. Disadvantage It does not provide user interaction with the computer system during this program execution. 3. Time-sharing system Time sharing (or multi tasking) is logical extension of multiprogramming. The CPU executes multi jobs by switching among them, but the switches occur so frequently that the user can interact with each program while it is running. An interactive (or hands on) computer system provides direct communication between the user and the system. The user gives instruction to OS or to a program directly using keyboard or mouse and with for immediate results so the response time should be short. It allows many users to share the computer simultaneously. Since each action in this system is short only a little CPU time is needed for each user. The system switches rapidly from one user to the next so each user feels as if the entire computer system is dedicated to his use, even though it is being shared by many users. Disadvantages It is more complex than multiprogrammed OS. The system must have memory management and protection since several jobs are kept in memory at the same time. Time sharing system must also provide a file system, so disc management is required. It provides mechanism for concurrent execution which requires complex CPU scheduling schemes. Personal Computer System/Desktop systems Personal computer appeared in 1970s. They are microcomputers that are smaller and less expensive than mainframe system. Instead of maximizing CPU and peripheral utilization, the system opt for maximizing user convenience and responsiveness.

Unit2, Operating system, Photoshop 7.0 At first file protection was not necessary in a personal machine, but when other computers and other users can access the files on a PC file protection becomes necessary. The lack of protection made it easy for malicious programs to destroy data on such systems. These programs may be self replicating and they spread via worm or virus mechanisms. They can disrupt entire companies or even worlds wide network. Ex- Windows 98, Windows 2000, Linux. Microprocessor System/Parallel System Tightly coupled systemThese systems have more than one processor in close communication which shares the computer bus, clock, memory and peripheral devices. Ex- Unix, Linux. Advantage Multiprocessor systems have three main advantages Increased throughput- no. of processes completed per unit time. By increasing the No. of processors more work can be done in less time. Increased reliability-If function can be properly distributed among several processors then the failure of one process will not halt the system, but slow it down. This ability to continue to operate in spite of failure makes the system fault tolerant. Economic: - Multiprocessor system can save money as they can share peripherals storage and power supplies. Types of multiprocessing:It is of 2 types:(i)Symmetric multiprocessing Each processor runs an identical copy of the operating system and these copies communicate with one another as required. (ii)Asymmetric multiprocessing Each processor is assigned a specific task. A master processor controls the system and schedules. Distributed System/loosely coupled System In contrast to tightly coupled systems, the processors do not share memory or a clock. Instead each processor has it own local memory. The processors communicate with each other by various, communication lines such as high speed buses or telephone lines. Distributed systems depend on network for their functionality. By being able to communicate distributed tasks and provide a rich set of feature to the users. Networks vary by the protocols used, the distance between the nodes and transport media. TCP/IP is the most common network protocol. 5

Unit2, Operating system, Photoshop 7.0 The processors in a distributed system may vary in size and function. It may include microprocessors, workstations, mini computers and large general purpose computers. Network types are based on the distance between the nodes LAN WAN MAN Advantages Resource sharing Computation speed up Reliability Communication Real time System Real time system is used when there are rigid time requirement on the operation of a processor or flow of data. Sensors bring data to the computers. The computer analyzes data and adjusts controls to modify the sensor inputs. System that control scientific experiments, medical imaging systems, industrial control systems and some display systems are real time systems. Disadvantages A real system is considered to function correctly only if it returns the correct result within the time constraints. Secondary storage is limited or missing instead data is stored in short term memory or ROM. Advanced OS features are absent Types:It is of two types Hard real time system It guarantees that critical task complete in time. Certain tasks must take place at certain instant of time. Soft real time system It is less restrictive type of real time system where critical tasks get priority over the tasks and retains that priority until it completes. Those have more limited utility than hard real time systems. Missing an occasional deadline is acceptable.

FEATURES OF DOS
DOS stands for Disk Operating System There are certain functions, which DOS does automatically; while there are others which you can get DOS to do for you. Some other tasks that can be performed by DOS: Create new files 6

Unit2, Operating system, Photoshop 7.0 Delete old ones Give files new name Give a list of all the files that are stored on a disk Double the storage capacity of disks Format a new floppy disk Searches and destroys viruses. Task DOS does automatically Get information from keyboard Display information on the monitor Allocate memory to program Controls the operation of peripheral devices The interfaces and levels of functionality of Ms-DOS are not well separated. Application programs can access I/O routines to write directly on disk, VDU, etc. Which allows programs to corrupt users systems without their knowledge. Application Program Memory resident part of Ms-DOS Ms-DOS device drivers ROM BIOS device drivers (Structure of Ms-DOS operating system)

Types of command
DOS commands are of two types Internal command These commands do not require any special files for being executed. The internal commands are loaded into memory when system is booted. These commands are always available for our use although not seen when disk directory of file names are displayed on the screen e.g. COPY, DEL, DIR, CD, MD, CLS, DATE, TIME and PATH. External command

Unit2, Operating system, Photoshop 7.0 These are the command which require certain special DOS files for being executed. These commands are conventional program files. This filenames are displayed in the directory listing of the disk e.g. FORMAT, CHKDSK, XCOPY, PRINT, ATTRIB, TREE, and DISKCOPY etc. You may not necessarily have all these files in your system.

Command to use 1. DEL, ERASE 2. TYPE 3. EDIT 4. DOSKEY 5. DEL, ERASE 6. DELTREE 7. APPEND, PATH 8. DIR 9. MOVE 10. REN, RENAME 11. ATTRIB 12. CD, CHDIR 13. DATE 14. CLS 15. DISCOPY, COPY, 16. MD, MKDIR 17. COPY CON 18. RD, RMDIR 19. COPY, REPLACE, RESTORE, XCOPY 20. EXIT 21. TIME 22. MODE 23. GOTO 24. SORT 25. MODE

Function Delete a file Display the contents of a file Edit files Edit DOS line command Erase a file Erase an entire disk or directory Find files in other subdirectories List files on a disk or subdirectories Move files to a different subdirectory Change a file name Change file attributes Change the current subdirectory Change the date Clear the screen XCOPY Copy files Create a new subdirectory Create an file Remove an empty subdirectory Restore data from backups Return from a secondary processor Set the time Set a new screen length or width Shift the screen display right or left Skip lines in a batch file Sort data Speed up or slow down key response