Unit 3 Operating System
Total Page:16
File Type:pdf, Size:1020Kb
UNIT 3 OPERATING SYSTEM STRUCTURE 3.1 Objective 3.2 Programming Language 3.3 Operating System 3.3.1 Single User Operating system 3.3.2 Batch Operating System 3.3.3 Real time Operating system 3.3.4 Multi users operating system 3.3.5 Distributed Operating System 3.3.6 Embedded Operating System 3.3.7 Network Operating System 3.8 Local Area Network (LAN) 3.9 Wide Area Network (WAN) 3.10 Popular Operating Systems 3.10.1 Windows 3.10.2 Mac OS X 3.10.3 UNIX 3.10.4 Linux 3.11 Application Software 3.12 Virus and other destructive programmes 3.13 Don’ts while running software 3.14 Do’s while running of software 3.15 Future trends in operating system 3.16 Let us sum up 3.17 Model Answers to check your progress 3.1 OBJECTIVE In units 1 and 2, we have discussed about hardware components of the computer. This unit is about software component of computer. A computer is a dead machine without software. Software is the soul of computer. It brings life to computer and induces work environment conducive for users. After reading this unit, you will be able: 1 To explain role of software, To classify software on the basis of its functions, To understand functions of the operating system, and To understand different types of operating system 3.2 PROGRAMMING LANGUAGES Computer works on sequentially arranged instructions. Sequence of related instructions is called programme. Computer programmes are also known as software. Thus, the term software denotes predefined sequence of instructions used to execute specific tasks. Programmes are written with special languages understood by computer. Languages used to write programmes are called programming languages. Programming languages are classified into two categories i.e. high level and low-level languages. The low level programming languages provide little or no abstraction from computers’ instructions set architecture of a CPU. The Instructions set in low-level languages is highly depend on microprocessor’s architecture. Thus, programmes designed with low level language are not portable from one microprocessor to another. Programmes in low-level language are very lengthy. It is difficult to understand and amend these programmes. Many household electronic applications such as microwave ovens, washing machines, dishwashers etc are programmed on low-level languages. The instructions set of CPU is known as machine language. Programmes written in low-level languages are executed directly by the CPU. Thus, the execution of programme is fast, when it is designed in low-level languages. Therefore, low-level languages are used to design applications run in the real time mode. Applications, which function under the real time mode, are characterized by its ability to generate results within specific time limits. Low-level languages are also used for writing system programmes, these programmes control PC and attached peripherals. System programmes are discussed latter in this unit. Assembly language and machine codes are examples of the low-level language. Low-level language has poor presence in office environment. A high level programming language is based on strong abstraction. It is close to natural language used for human communication. Programmes written in high-level language are easy to read, write and edit. Plankalkul programming language designed by Konrad Zuse is considered as the first high level programming language. These languages hide the details of CPU’s architecture and memory management from programmers. Thus, programmes written in high language are portable from one computer to another. Ada, Algol, Basic, COBOL, FORTRAN and Pascal are example of the high-level language. High and low level languages are relative terms. Some decades ago, the C language was considered as high-level language. However many programmers, today, might refer C language as low-level language. Similarly, at one time, Assembly language was treated as high-level language, now it was treated as low-level language. Instruction set of microprocessor in the form of binary language is known as machine language of that microprocessor. Every instruction in machine language consists of two parts. The first part of each instruction is command to microprocessor to perform specific task. The second 2 component of instruction has detail about data being used in executing command reflected in the first part of the instruction. The second part may be address of memory location where data is stored or value of data directly. Programmes written in machine language run very fast as microprocessor directly executes programme without any interpreter. Machine language has no abstraction. It is difficult for human to remember instructions codes in the binary form. Programmes written in machine language are very lengthy. These Programmes have low portability across computers as these programmes are written for specific computer architecture or microprocessor. Machine language is used mainly to write system programmes to control devices because speed of execution is the first priority in writing such programmes. Programmers can easily remember instructions set in the form of codes rather as series of 0 and 1. We use symbols instead of binary numbers for first and second parts (command and address of data respectively) of instructions set of machine language. This abstraction is known as assembly language. Every microprocessor has its own assembly language, which is not portable to microprocessors of other families. Assembly languages of microprocessors of same family have certain resemblance. Assembly language of every new microprocessor is compatible with assembly languages of old microprocessors of the same family. Programmers can easily develop programmes in assembly language of new microprocessor, when its assembly language is compatible with well established assembly languages. Programmes designed for earlier microprocessors can be run of new microprocessor with slight modification due to this compatibility. Microprocessor converts programme written in assembly language in to machine language before executing it. The advantages and limitations of assembly language are similar to those of machine language. We have discussed in the unit 1 that computer execute programmes and instructions in binary form only. You may use high or low languages for writing programmes but computer understands and execute programmes written in the binary form. Programmes written in any other language is translated into binary language before execution. Programmes written in high- level languages are translated into low-level language with the help of compiler or interpreter before execution. Compiler converts the whole programme into low level before execution. Interpreter converts each line into low language and executes it and then converts next line and executes it. This process continues until the end of the programme. Compiler converts and stores programmes into low-level language. Compiler checks and converts programmes line by line from high to low language. Whenever, compiler notices any error in programme, compiler list- out errors on monitor or paper and halts the compilation of programme. Programmers remove the listed errors and start the compilation of programme from the beginning. This process is repeated until all errors in programmes are removed. Once all errors are removed, compiler generates and saves compiled copy of the programme. Computer will use the compiled version of programmes and execute it directly without any support from compiler and programme written in high-level language. However, interpreter converts programme written in high-level language into low level language; each time programme is executed. Thus, execution of programme with interpreter is time consuming. Interpreter is mainly used for debugging of the programme. Table 1 Comparison of Compiler and Interpreter Compiler Interpreter Scans the entire programme first for syntax Translates and run programme line by line. 3 errors in coding and then translates it into machine code. Converts the entire program to machine code; Programme is converted into low language before execution. The execution takes place and executed line by line from the beginning, only when all the syntax errors in the coding each time you run the programme. Every line are removed and entire programme is complied is checked for syntax error and then into low language converted into equivalent machine code before execution Debugging of programme is slow. Debugging Debugging of programme is fast. is a process of testing programmes for Programmes can be easily tested for errors robustness and syntax errors. It is conducted and robustness. Programmer’s prefer to use during the development phase of a software interpreter for debugging of programmes Execution time is less as programme is Execution time is more in using interpreter as compiled only once. Later, only compiled it converts and executes the entire version of the programme is used for programme line by line into machine execution. language each time you run the programme. 3.3 OPERATING SYSTEM Till 1960s, computers were built to execute single task like a calculator. Operating system was not needed to run computer at that time. Computer either completed task or crashed in case of error in the programme. As computer evolved, it was involved in processing multiple tasks at a time. Computer needed a programme to share and manage resources of computer among various applications running at a time. Programmes of this category are known as operating system or system programmes. Operating system is large size software capable of controlling the computer system independently. Operating system is an integral component of a computer. It is referred as the soul of the computer. Operating system can be defined as collection of programmes, which controls and manages operations of computer and connected peripherals. It manages memory, computation resources, input and output devices. Operating systems is like a manager of a store, who keeps proper account of inventory of the stock in the store, attends needs of customers, records financial transactions and places order to suppliers. A manager manages these activities without bothering to customers.