Software
Software is a collection of programs to do some specific tasks. A set of programs form software. It is the software that gives hardware its capability.
Types of software
The software can be of three types-
- System Software
- Application Software
- Utility Software
System Software
The system software is a type of software designed to provide a platform for other software (Application Software). It is also responsible for manage hardware.
Example: Operating system and Language Processor.
Language Processor
A language processor is system software that can perform tasks such as convert High-level language to Machine level language (Low-level language) or vice versa and Assembly language to Low-level language or vice versa.
The language processors can be of the following three types-
- Assembler
- Compiler
- Interpreter.
Assembler
The Assembler is used to translate the program written in Assembly language into machine code. The input of Assembler is a source program that contains assembly language instructions. The output generated by the assembler is the object code or machine code understandable by the computer.
Compiler
The language processor that translates the complete source program at once into machine code is called a compiler. Some of the examples are C and C++ Compilers. The program translated into machine code is called the object code. The source code is translated to object code successfully if it is free of errors. If there are any errors in the source code, the compiler specifies the errors at the end of compilation with line numbers. The errors must be removed before the compiler can successfully recompile the source code again.
Interpreter
The language processor that translates a single statement of source program into machine code and executes it immediately before moving on to the next line is called an Interpreter. If there is an error in the statement the interpreter terminates its translating process at that statement and displays an error message. Only after removal of the error, the interpreter moves on to the next line for execution.
Operating System and its need
An Operating system is the most important system software. It is a set of programs that control and supervise the hardware of a computer and also provide services to application software, programmers, and users. It manages all hardware and software, input, output, and processing activities within the computer system, the flow of information to and from the processor, sets priorities for handling different tasks, and so on. Without an operating system, a computer cannot do anything useful. When a computer is switched on, the operating system is the first program that is loaded onto its memory. A user cannot communicate directly with the computer hardware, so the operating system acts as an interface between the user and the computer hardware. Some of the popular operating systems used in personal computers are DOS, Windows, Unix, Linux, Solaris, etcFunctions of an Operating System
An operating system has many functions to perform. Some basic functions can be described as-Processor Management
This deals with the management of the Central Processing Unit (CPU). The operating system takes care of the allotment of CPU time to different processes. This is called scheduling. Two types of scheduling techniques are employed by an operating system:
- Priority Scheduling:- In this scheduling technique, Each task is given CPU time according to the priority assigned to that task. The program with higher priority will be given CPU time before a program with lower priority. The CPU executes the task till it is completed or there is some interrupt request made. The major drawback of Priority scheduling is that even a small job has to wait for a long time when a long duration job with higher priority is being executed.
- Round Robin Scheduling:- This type of scheduling technique is also known as Time-Sharing Scheduling. In this scheduling technique, each program or task is given a fixed amount of time to execute. The CPU continues with the execution till either the allotted time is over or there is some interrupt request made or the task is completed before the allotted time. If the task is not completed at the end of the allotted time, then the task is put at the end of the queue. So each task gets its allotted share of CPU time. This scheduling technique improves response time and provides an interactive environment.
Device Management
The Operating System responsible to maintain balance between CPU and all attached hardware devices. This is important because the CPU processing speed is much higher than the attached I/O devices. For optimizing the CPU time, the operating system employs two techniques - Buffering and Spooling.
- Buffering:- In this technique, the temporary storage of input and output data is done in Input Buffer and Output Buffer.
Once the signal for input is sent to the CPU, the operating system moves the data from the input device to the input buffer through the controller.
And once the output signal is sent from the CPU to the output device the operating system moves the data from the output device to the output buffer.
In the case of input, if the input buffer is full, the operating system sends a signal to the program which processes the data stored in the buffer. When the buffer becomes empty, the program informs the operating system which reloads the buffer and the input operation continues.
Similarly for output when the program being executed has to display some output, it fills the buffer and then informs the operating system. Thereafter the operating system empties the buffer by sending data to the output device. - Spooling: This is a device management technique used for processing of different tasks on the same input/output device.
For example, there are various users on a network sharing the same printer. At one point of time, more than one user might give print command. The speed of the printer is very slow as compared to CPU processing speed. So the operating system temporarily stores the data of every user on the hard disk of the computer to which the printer is attached. The individual users don't need to wait for the printing process to be complete. Instead, the operating system sends the data from the hard disk to the printer one by one.
Memory management
In a computer, both the CPU and the I/O devices interact with the memory. The common memory management techniques used by the operating system are Partitioning and Virtual Memory.
- Partitioning: The total memory is divided into various partitions of the same size or different sizes. This helps to accommodate the number of programs in the memory. This causes less wastage of memory.
- Virtual Memory: This is a technique used by the operating system by virtue of which the user can load the programs which are larger than the main memory of the computer. In this technique, the program is executed even if the complete program is not loaded on to the main memory.The operating system divides the main memory into equal sizes called pages. A part of the program resides in the main memory and is called the active set. The rest is in the secondary storage device in the form of tracks/sectors or blocks. With the help of Page Map Tables (PMT), the operating system keeps track that which page of main memory is storing which block of secondary memory. Hence virtual memory allows more programs and even larger programs to be executed in the main memory.
File Management
The operating system manages the files and folders on a computer. Any data on a computer is stored in the form of files and the operating system keeps the information about all of them using File Allocation Table (FAT). The FAT stores general information about files like filename, type, size, and access mode. The file manager of the operating system helps to create, edit, copy, allocate memory to the files, and also updates the FAT. The operating system also takes care that files are opened with proper access rights to read or edit them.
0 Comments:
Post a Comment
If you have any queries or suggestions, please let me know!