Programming in C: Unit I (a): Introduction to Programming

Classification of Computer Software

Computer software can be broadly classified into two groups: system software and application software.

CLASSIFICATION OF COMPUTER SOFTWARE

Computer software can be broadly classified into two groups: system software and application software.

• System software [according to Nutt, 1997] provides a general programming environment in which programmers can create specific applications to suit their needs. This environment provides new functions that are not available at the hardware level

System software represents programs that allow the hardware to run properly. System software is transparent to the user and acts as an interface between the hardware of the computer and the application software that users need to run on the computer. Figure 1.2 illustrates the relationship between application software, system software, and hardware.

• Application software is designed to solve a particular problem for users. It is generally what we think of when we say the word 'computer programs'. Examples of application software include spreadsheets, database systems, desktop publishing systems, program development software, games, web browsers, among others. Simply put, application software represents programs that allow users to do something besides simply running the hardware.

System Software

System software is software designed to operate the computer hardware and to provide and maintain a platform for running application software.

The most widely used system software are discussed in the following sections:

Computer BIOS and Device Drivers

The computer BIOS and device drivers provide basic functionality to operate and control the hardware connected to or built into the computer.

BIOS or Basic Input/Output System is a de facto standard defining a firmware interface. BIOS is built into computer and is the first code run by the computer when it is switched on. The key role of BIOS is to load and start the operating system.

When the computer starts, the first function that BIOS performs is to initialize and identify system devices such as the video display card, keyboard and mouse, hard disk, CD/DVD drive, and other hardware. In other words, the code in the BIOS chip runs a series of tests called POST (Power On Self Test) to ensure that the system devices are working correctly.

BIOS then locates software held on a peripheral device such as a hard disk or a CD, and loads and executes that software, giving it control of the computer. This process is known as booting.

 BIOS is stored on a ROM chip built into the system and has a user interface like that of a menu (Figure 1.3) that can be accessed by pressing a certain key on the keyboard when the computer starts. The BIOS menu can enable the user to configure hardware, set the system clock, enable or disable system components, and most importantly, select which devices are eligible to be a potential boot device and set various password prompts.

To summarize, BIOS performs the following functions:

• Initializes the system hardware

• Initializes system registers

• Initializes power management system

• Tests RAM

• Tests all the serial and parallel ports

• Initializes CD/DVD drive and hard disk controllers

• Displays system summary information

Operating System

The primary goal of an operating system is to make the computer system (or any other device in which it is installed like a cell phone) convenient and efficient to use. An operating system offers generic services to support user applications.

From users' point of view the primary consideration is always the convenience. Users should find it easy to launch an application and work on it. For example, we use icons which give us clues about applications. We have a different icon for launching a web browser, e-mail application, or even a document preparation application. In other words, it is the human-computer interface which helps to identify and launch an application. The interface hides a lot of details of the instructions that perform all these tasks.

Similarly, if we examine the programs that help us in using input devices like keyboard/mouse, all the complex details of the character reading programs are hidden from users. We as users simply press buttons to perform the input operation regardless of the complexity of the details involved.

An operating system ensures that the system resources (such as CPU, memory, I/O devices) are utilized efficiently.

For example, there may be many service requests on a web server and each user request needs to be serviced. Moreover, there may be many programs residing in the main memory. Therefore, the system needs to determine which programs are currently being executed and which programs need to wait for some I/O operation. This information is necessary because the programs that need to wait can be suspended temporarily from engaging the processor. Hence, it is important for an operating system to have a control policy and algorithm to allocate the system resources.

Utility Software

Utility software is used to analyse, configure, optimize, and maintain the computer system. Utility programs may be requested by application programs during their execution for multiple purposes. Some of them are as follows:

• Disk defragmenters can be used to detect computer files whose contents are broken across several locations on the hard disk, and move the fragments to one location in order to increase efficiency.

• Disk checkers can be used to scan the contents of a hard disk to find files or areas that are either corrupted in some way, or were not correctly saved, and eliminate them in order to make the hard drive operate more efficiently. • Disk cleaners can be used to locate files that are either not required for computer operation, or take up considerable amounts of space. Disk cleaners help users to decide what to delete when their hard disk is full.

• Disk space analysers are used for visualizing the disk space usage by getting the size for each folder (including subfolders) and files in a folder or drive.

• Disk partitions utilities are used to divide an individual drive into multiple logical drives, each with its own file system. Each partition is then treated as an individual drive.

• Backup utilities can be used to make a copy of all information stored on a disk. In case a disk failure occurs, backup utilities can be used to restore the entire disk. Even if a file gets deleted accidentally, the backup utility can be used to restore the deleted file.

• Disk compression utilities can be used to enhance the capacity of the disk by compressing/decompressing the contents of a disk.

• File managers can be used to provide a convenient method of performing routine data management tasks such as deleting, renaming, cataloguing, moving, copying, merging, generating, and modifying data sets.

• System profilers can be used to provide detailed information about the software installed and hardware attached to the computer.

• Anti-virus utilities are used to scan for computer viruses.

• Data compression utilities can be used to output a file with reduced file size.

• Cryptographic utilities can be used to encrypt and decrypt files.

• Launcher applications can be used as a convenient access point for application software.

• Registry cleaners can be used to clean and optimize the Windows operating system registry by deleting the old registry keys that are no longer in use.

• Network utilities can be used to analyse the computer's network connectivity, configure network settings, check data transfer, or log events.

• Command line interface (CLI) and Graphical user interface (GUI) can be used to make changes to the operating system.

Compiler, Interpreter, Linker, and Loader

Compiler It is a special type of program that transforms the source code written in a programming language (the Source language) into machine language comprising just two digits, 1s and Os (the target language). The resultant code in 1s and Os is known as the object code. The object code is the one which will be used to create an executable program.

Therefore, a compiler is used to translate source code from a high-level programming language to a lower level language (e.g., assembly language or machine code).

If the source code contains errors then the compiler will not be able to perform its intended task. Errors resulting from the code not conforming to the syntax of the programming language are called syntax errors. Syntax errors may be spelling mistakes, typing mistakes, etc. Another type of error is logical error which occurs when the program does not function accurately. Logical errors are much harder to locate and correct.

The work of a compiler is simply to translate human readable source code into computer executable machine code. It can locate syntax errors in the program (if any) but cannot fix it. Until and unless the syntactical errors are rectified the source code cannot be converted into the object code.

Interpreter Like the compiler, the interpreter also executes instructions written in a high-level language. Basically, a program written in a high-level language can be executed in any of the two ways. First by compiling the program and second, to pass the program through an interpreter.

While the compiler translates instructions written in high-level programming language directly into the machine language, the interpreter, on the other hand, translates the instructions into an intermediate form, which it then executes. This clearly means that the interpreter interprets the source code line by line. This is in striking contrast with the compiler which compiles the entire code in one go.

Usually, a compiled program executes faster than an interpreted program. However, the big advantage of an interpreted program is that it does not need to go through the compilation stage during which machine instructions are generated. This process can be time consuming if the program is long. Moreover, the interpreter can immediately execute high-level programs.

All in all, compilers and interpreters both achieve similar purposes, but inherently different as to how they achieve that purpose.

Linker (link editor binder) It is a program that combines object modules to form an executable program. Gener- ally, in case of a large program, the programmers prefer to break a code into smaller modules as this simplifies the programming task. Eventually, when the source code of all the modules has been converted into object code, we need to put all the modules together. This is the job of the linker. Usually, the compiler automatically invokes the linker as the last step in compiling a program.

Loader It is a special type of program that copies programs from a storage device to main memory, where they can be executed. However, in this book we will not go into the details of how a loader actually works. This is because the functionality of a loader is generally hidden from the programmer. As a programmer, it suffices to learn that the task of a loader is to bring the program and all its related files into the main memory from where it can be executed by the CPU.

Application Software

Application software is a type of computer software that employs the capabilities of a computer directly to perform a user-defined task. This is in contrast with system

software which is involved in integrating a computer's capabilities, but typically does not directly apply them in the performance of tasks that benefit users.

To better understand application software consider an analogy where hardware would depict the relationship of an electric light bulb (an application) to an electric power generation plant (a system) that depicts the software.

The power plant merely generates electricity which is not by itself of any real use until harnessed to an application like the electric light that performs a service which actually benefits users.

Typical examples of software applications are word processors, spreadsheets, media players, education software, CAD, CAM, data communication software, and statistical and operational research software. Multiple applications bundled together as a package are sometimes referred to as an application suite.

Programming in C: Unit I (a): Introduction to Programming : Tag: : - Classification of Computer Software


Related Topics



Related Subjects


Programming in C

CS3251 2nd Semester CSE Dept 2021 | Regulation | 2nd Semester CSE Dept 2021 Regulation