(XI) Ch-3 Computer Software and Operating System

3.1 Concept of Software

3.1.1 Definition of Software

Software is the collection of computer programs, procedures and documentation that performs different tasks on a computer system. The types of software are system software and application software.


3.1.2 Categories of Software

  • System Software

  • Application Software


System Software

System software is a form of computer software designed to operate the computer hardware, and to provide a platform for running application software. It helps the computer hardware and the computer system to run. System software is a collection of operating systems, device drivers, servers, windowing systems and utilities. Some common type of system software is given below:

  • Operating System

  • Utility software

  • Language processor


  1. Operating System
    The operating system is the most important program that runs on a computer. Every  general-purpose computer must have an operating system to run other programs.Operating systems perform basic tasks. It is the first program loaded into memory; when the computer is turned on and brings life to the computer hardware. Without it, you cannot use your word processing software, spreadsheet software or any other applications.

    Without an operating system, you cannot communicate With your computer. When you give the computer a command, the operating system relays the instructions to the “brain” of the computer, called the microprocessor or CPU. You cannot speak directly to the CPU because it only understands machine language. When you are working in an application software program, such as Microsoft Word, the commands that you give the applications are sent through the operating system to the CPU. Windows 2000, Windows 95/98, Mac OS, UNIX and DOS are all the examples of operating systems.
    Some functions of OS are given below. 

  • Recognize the input from the keyboard. 

  • Send output to the display screen. 

  • Keep track of the files and directories on the disk. 

  • Control peripheral devices such as disk drives and printers. 

  • Provide security and back up. 

  • Provide interface between hardware and software. 

  • Manage memory. 

  • Schedule processes. 


  1. Utility Software

Utility programs help to manage, maintain and control computer resources. These programs are available to help you with the day-to-day chores associated with person computing and to keep your system running at peak performance. 


Some examples of utility programs include: 

Virus Scanning Software is the utility program designed to protect your computer from computer viruses.


Backup software is the software that assists you in backing up your files and even the entire computer hard drive. It is important for you to back up your files regularly. 


Scandisk is a utility provided with Windows computers. Scandisk scans your disks to see if there are any potential problems on the disk, such as bad disk areas. Since the disks are magnetic media, all the disks, including your hard drive can be corrupted. 


Disk Defragmenter software assists you in reorganizing your disk drives, After files are saved, deleted and resaved again, the disk can become fragmented -the available space is in the small blocks located throughout the disk. Disk defragmenters gather those free spots and put them together to enable you to continue and save your data in the most efficient manner.

 

  1. Language processor

It is a special type of computer system software that can be used to translate the program written in one language into another language. It is most compulsory for the low level language and high level language. The types of language translator are given below.

  • Compiler 

  • Interpreter 

  • Assembler


Application Software

It enables the users to accomplish certain specific tasks. Similarly, it can be used to solve the application type of problem. Business software, databases and educational software are some forms of application software. Other application software is word processors, spreadsheet, presentation packages etc. Application software utilizes the capacities of a computer directly to a dedicated task. Application software is able to manipulate text, numbers and graphics. It can be in the form of software focused on a certain single task like Word processing, spreadsheet or playing of audio and video files.


Types of Application Software 

  • Package software 

  • Tailored software 


  1. Package Software: Package software is mainly designed by software companies to generalize the tasks. They are general purpose software. Some common types of package software are given below.
    Word Processing Software: This software enables the users to create and edit documents. The most popular examples of this type of software are MS-Word, WordPad, Notepad and some other text editors.

    Database Software: Database is a structured collection of data. A computer database relies on database software to organize the data and enable the database users to achieve database operations. Database software allows the users to store and retrieve data from databases. Examples are Oracle, MS Access, etc.

    Spreadsheet Software: Excel, Lotus 1-2-3 and Apple Numbers are some examples of spreadsheet software. Spreadsheet software allows the users to perform calculations. They simulate paper worksheets by displaying multiple cells that make up a grid.

    Multimedia Software: They allow the users to create and play audio and video media. They are capable of playing media files. Audio converters, players, burners, video encoders and decoders are some forms of multimedia software. Examples of this type of software include Real Player and Media Player.

    Presentation Software: The software that is used to display information in the form of a slide show is known as presentation software. This type of software includes three functions, namely, editing that allows insertion and formatting of text, methods to include graphics in the text and a functionality of executing the slide shows. Microsoft PowerPoint is the best example of presentation software.

    Web Based Software: The software that is based on the web is called web based software. This type of software can be used with the internet only. Web based software, (or a web based application) is a software that runs on a server (computer connected to the Internet), while the users connect to it from their computers with an Internet browser. Therefore, web based software is accessible from any part of the world. Some examples of web based software include Facebook, Google, eBay, Amazon.


  1. Tailored Software: Tailored software is specific purpose software. It is also called a small type of software. These types of software are developed for specific tasks. They are written in high level languages such as JAVA, C, C++, COBOL (Common Business. Oriented Language) etc. Examples are banking software, hospital software, hotel reservation software, billing software etc. 


Mobile Apps

Apps are a form of software which is used to display information. Mobile Apps means software that is used on mobile devices such as smartphones and tablets. They are also known as mobile applications. In other words, a mobile app is a software application developed specifically for use on small, wireless computing devices, such as smartphones and tablets. This type of software is specific purpose software. Examples of such software are Gaming apps, Hotel reservation apps, E-commerce apps, Bill payment apps.

3.2 Concept of Operating System

3.2.1 Introduction to Operating System 

An operating system (OS) is a large collection of system software, which manages the resources of computer systems such as memory, storage, processor, I/O devices- alongside acting as an interface between machine and user. Moreover, it also performs the basic tasks such as reorganization of peripheral devices, sending- receiving information to the external sources keeping tasks of files, folders on the disk and other different utility tasks.


On the other hand, the OS also acts as an interface between the hardware and the users. It is designed to handle the basic elements of computer operation such as sending instructions to hardware devices such as disk drives and computer screens with the help of the interface provided by the OS. Therefore, the OS understands both the languages: human language that is high level language and the language of machine that is machine language. It also allocates system resources such as memory to different software applications being run. Therefore, it becomes the interpreter between the computer hardware and the user. For example, suppose we have to save any message or information to any storage device, then our duty is simply to give command to the OS. Then, we don't know "how to write" or "where to write" inside the storage device. now it's the job of the OS to tell storage devices what to do exactly.


Examples of popular modern operating systems are Linux, Mac OS, Microsoft Windows and UNIX etc. 


The organization or architecture of the OS deal with the internal structure of OS, mainly it is divided into 3 layers as shown in figure below: 

 

Application Software

Utility Software

Kernel

Hardware

                              Figure: Architecture of operating system

  1. OS Kernel: A main part of the OS always remains in the main memory during the running of a computer, called OS kernel. It is the main controlling part of the OS which controls all the running programs and the hardware resources. It can directly communicate with the hardware as well as the upper layers.

  2. Utility Software: Outside this layer, there is a set of utility programs which are used as system management tools, also known as housekeeping works of the OS. The main purpose of these tools is to make the system up to date and efficient. For example, take the way, scan-disk ,disk-cleanup, disk defragmenter, device drivers, file compression, backup-recovery, antivirus, web browser and other different network and internet utilities work. 

  3. OS Application: Application software is developed in order to fulfil the user requirements. Different application software is available in the market as readymade software. Some of them are developed on the user's demand called tailored software. Basic application software is also provided by the OS such as Notepad, WordPad, Paint and Simple Games etc. 


3.2.2 Role of Operating System

The OS software must keep track of each hardware resource, determine who gets what, determine when the user will have access to the resource, allocate how much of the resource the user will be given, and terminate access at the end of the use period. 

The primary purpose of an OS is to maximize the productivity of a computer system by operating it in the most efficient manner and minimizing the amount of human intervention required. Some of the roles of OS are as follows: 

  • It acts as an intermediary between the programs and the computer hardware.

  • Operating system loads programs in the memory when the power is turned on.

  • It performs basic operations that recognize the input from the keyboard and after processing, sending the output to the display screen.

  • It manages data, tracks of files and memory such as primary, secondary etc.

  • It manages scheduling processes and provides the tasks to different peripheral devices.

  • Operating system also allows the users to share the data and software among themselves.

  • It prevents the system from unauthorized users, hackers, crackers, computer viruses etc.


3.2.3 Functions of an Operating System(Important Questions)

The functions of operating systems are:

  1. Input/Output (I/O) management : OS manages the input and output of a computer. This applies to the flow of data among the computers, terminals and other devices such as monitors, printers etc. Application programs use the operating system extensively to handle the input and output devices as needed. 

  2. Command interpreter : The command interpreter takes a command from the user and then the OS translates it into a detailed meaningful instruction, which the computer can understand easily. For this reason, the main function of command interpreters is to get and execute the user specified command. In the MS-DOS, command.com is a command interpreter.

  3. Data management : The OS also manages the storage and retrieval of the data. As the system software handles many of the details associated with the process, such details are not primary concerns for users or programmers writing application programs. 

  4. File management : File management creates a mechanism of files and directories by making a table of each file and directories in the storage device, so as to keep track of each element. Then, it implements different types of efficient searching mechanism of files. Therefore, this module is responsible for handling the way the data is stored and retrieved for use in the computer.

The operating system such as windows manages the disk with FAT, FAT 32 or NTFS file systems. FAT is the short form of File allocation table. The FAT has the information about the filename, file size, date and time creation and allocation on the disk spaces. NTFS stands for New Technology File System. It has several improvements over FAT, and supports the use of advanced data structures to improve the performance, reliability, and disk space utilization, plus additional extensions, such as security. 

  1. Memory management : Computer systems include a number of storage devices, say, for example, registers, cache memory, primary memory, secondary memory etc. Wherever, the processor needs some data or instructions, it is first searched in the registers and then after the cache memory; if it isn't available there, then, it looks into the primary memory (RAM). If still not available, then the data is brought into the main memory from the hard disk. Thus, the way of loading, accessing and removing the data from these devices are managed by the operating system. 

  2. Job management: It recognizes the jobs, identifies their priorities, determines whether the appropriate main memory and the secondary memory capability they require are available or not. Then, the operating system schedules the job and finally runs each job at the appropriate format with scheduling.

The technique of maximum utilization of the processor is termed as CPU scheduling. In this system, several jobs are kept in the memory at one time. When one job has to wait, the OS takes the CPU away from the job and gives it to another job. This method continues. Every time one job has to wait, another job may take over the use of the CPU. Some scheduling algorithms are First come First Serve, Shortest Job First, Priority scheduling, Round Robin scheduling etc. 

  1. Process management : A process is a program, which is currently in a ready/ running / blocked state (that is currently loaded in the main memory). There can be only one program, but there may be multiple processes of the same program. For example, there is only one program of MS Word on the hard disk, but we can open two different MS Word documents (processes) at a single time.

When multiple processes are running, some processes may demand the input/output devices. In such a case, the process goes to the blocked state until the device is available. When the concurrent processes are under execution, the CPU time can be given to a single process at a time. The process which gets the CPU time is in the running state. The process which is waiting for CPU time is in the ready state.

One of the major tasks of an OS module is to manage and schedule the task effectively, which is performed by the processor. Therefore, the main activities of the process management are job queuing, job scheduling, keeping track of the status of each process etc.

  1. User interface : An interface is a set of commands or menus through which a user communicates with a program. A command-driven interface is the one in which you enter commands whenever, by using menu-driven, you can select commands from various menus displayed on the screen. Therefore, it determines how easily you can make the program what you want. Generally, there are two types of user interfaces: GUI (Graphical User Interface) and CUI (Command User Interface), which will discuss later in this chapter. 

  2. Interrupt-handling : Interrupt is an event that alters the sequence in which the processor executes instructions.

The OS provides a feature “interrupter handler” which are the routines that are called when an interrupt is detected.

Types of Interrupt:

  • Internal interrupts : Internal interrupts arise from the illegal use of an instruction or data. 

  • External interrupts arise from the I/O devices, timing device, circuit generated by power supply.

  • Hardware interrupts: Many pieces of hardware send interrupt signals to the CPU. When the CPU notices that signal, it does a hardware interrupt. It is caused by hardware devices such as keyboard, printer, chips etc. 

  • Software interrupts: A software interrupt is generated by the processor executing a specific instruction. It is caused by programs or software devices such as ROM BIOS.

  1. Deadlock prevention : Sometimes, during a process, a situation arises in which the resource either hardware or software, shared by two or more processes (for example, printer) cannot continue because the resource required by a process is held by another resource. In this situation, both jobs are conflict by the resources. And, such a type of situation or condition is called a deadlock

“In an operating system, a deadlock is a situation which occurs when a process enters a waiting state because a resource requested by it is being held by another waiting process which in turn is waiting for another resource.”

For example, if program “A” captures the hard disk and asks for the printer to print, and the program “B” captures the printer and asks for the hard disk to write, then such condition creates a deadlock. Such conditions are posed by the OS. For that, it takes a suitable action by careful allocation of resources. 

  1. Security management : One of the major tasks of an OS is to secure the data and program while loaded into the memory. An operating system protects the resources and information of a computer against destruction and unauthorized access. It protects the hardware and software from improper use. Some operating systems provide various methods such as backup, password, scandisk etc. for security. 

  2. Virtual storage management : As we know, in multiprogramming, more than one job is loaded in main memory at a time. But, if the program is larger than the main memory (RAM), then the entire job cannot be loaded at once inside the memory. In this case, the OS uses the free space of the secondary memory, which is known as virtual memory

With this software, it is possible to increase the capacity of the main memory without actually increasing its size. This is accomplished by breaking a job into sequences of instructions, called pages or segments, of RAM and keeping only a few of this in memory at a time. Then, the remainder memory is kept on the secondary storage devices.

For virtual storage management, the following techniques are used:

  • Paging : As the entire job cannot be loaded at once inside the memory due to the large size of the programs, the OS follows a different strategy to manage such problems. The most widely used mechanism is paging. In paging, the primary memory is partitioned into fixed size called page frame and the job so partitioned into the same size is called page. Instead of loading the entire job at once, few pages are loaded into the page-frame of the memory.

  • Swapping: Swapping is a memory management technique. If the memory is not enough to hold the entire program and data, swapping is needed to provide the memory to all the programs on the 

basis of priority. In this technique, the high priority process is swapped in the main memory and the low priority process from the main memory is swapped out. When the high priority process is completed, the low priority process swaps again.

3.2.4 Operating System Terminology 

  1. Multiprogramming: Multiprogramming allows execution of two or more programs in a main memory of the computer. In this environment, the processor processes several programs simultaneously. 

“Maximum utilization of CPU keeping it busy is called Multiprogramming or Concurrent Programming.”

All the programs are kept in the job pool of the mass storage device and these programs are ready for processing but the CPU is busy, so these programs wait their turns. When one processing is completed, the next ready program is fetched from the main memory for processing. Different forms of multiprogramming OS are multitasking, multiprocessing, multi-user.

  1. Multitasking: A system able to process a number of tasks (programs) at a time is called multitasking. It allows more than one program to run concurrently. 

In multitasking, only one CPU is involved, but it switches from one program to another so quickly that it gives the appearance of executing all of the programs at the same time. In this system, more than one task is performed on the priority basis, a high priority task interrupts a low priority task. There are two basic types of multitasking.

  • Pre-emptive

  • Non-Preemptive

In Pre-emptive multitasking, the OS allows the CPU time slices to each program. OS/2, Windows 95, Windows NT and UNIX use pre-emptive multitasking. Reversely, in non-pre-emptive multitasking, each program can control the CPU for as long as it needs. It a program is not using the CPU, however, it can allow another program use it temporarily. It is also called cooperative multitasking. Microsoft Window 3.x and MultiFinder (for Macintosh computers) use cooperative multitasking. 

  1. Multiprocessing: The CPU of any computer is called a processor. Multiprocessing operating system is one which runs on the computer having more than one processor and all these processors share some or all of the same memory. Such OS simultaneously executes two or more jobs at a single time.

Multiprocessing systems are much more complicated than single-process systems, because the OS must allocate resources to competing processes in a reasonable manner. This is also called parallel processing. MVS (Multiple Virtual System/ Storage) and UNIX are two most commonly used multiprocessing operating systems.

  1. Network and Distributed System: Network operating system is used when a number of computers are connected in a network. It works under client/server principle. The server provides services such as mail, database, printing etc. and client computer take services provided by the server. In a network operating system, the users are aware of existence of multiple computers. Each machine runs its own local users. They are useful for communication between users, sharing resources and for backup and recovery.

A distributed operating system manages a group of independent computers and makes them appear to be a single computer. The processor in a distributed system may be varying in size and function. They may include small microprocessors, workstations, minicomputers and large general purpose computer systems. For example, computer A can run a program on a computer B, using a file located elsewhere on the network, without the user being aware of where execution is taking place or where the files are physically located.