Summary

This textbook provides a comprehensive introduction to operating systems, covering their fundamental concepts and core components. It explains the role of operating systems in managing hardware, software, and user interactions. It explores different types of operating systems and their applications.

Full Transcript

# Operating Systems ## 5. Operating Systems By completing this lesson you will learn: - the necessity of an operating system - the function of an operating system - user interfaces of operating systems - services of an operating system - types of operating systems - advantages of operating system...

# Operating Systems ## 5. Operating Systems By completing this lesson you will learn: - the necessity of an operating system - the function of an operating system - user interfaces of operating systems - services of an operating system - types of operating systems - advantages of operating systems - utility Programmes of operating system - drives, folder and files. ### 5.1 Introduction to Operating Systems A Computer consists of hardware, firmware and software. Any physical component of a computer system with a definite shape is called a hardware. Examples of hardware include: - mouse - keyboard - display unit - hard disk - speaker - printer etc. The booting instructions stored in the ROM (Read Only Memory) are called firmware. The initial text information displayed on the screen are displayed by firmware. ### How the initial operations of a computer are performed - When the user powers up the computer the CPU (Central Processing Unit) activates the BIOS (Basic Input Output System). - The first program activated is POST (Power On Self-Test). Using the CMOS (Complementary Metal Oxide Semiconductor) memory this checks all the hardware and confirms that all are functioning properly. - After that it reads the MBR (Master Boot Record) in boot drive in accordance with the firmware 'bootstrap loader' which is provided by the computer manufacturer. - Then the computer loads in the Operating System in boot drive to the RAM (Random Access Memory). - Once this is performed the Operating System takes over the control of the computer and displays a user interface to the user. This whole process is called booting which means that an Operating System is loaded into the RAM (main memory). ### Software Software is a set of instructions given to the computer to perform some activity using a computer. There are many types of software. They can be broadly classified as follows: | | | |--------------|----------------------------------| | **Software** | | | **System Software** | | | **Operating System** | - | | **Utility Software** | - | | **Language Translators** | - | | | Assembler | | | Compiler | | | Interpreter | | **Application Software** | - | | | Eg - | | | Word Processing | | | Spread Sheets | | | Database | | | Computer Games | | | Web Browsers | **Figure 5.1 - Types of Software** ### 5.1.1 System Software System software are generally divided into three types. They are: - **Operating System** The Operating System provides for the user to utilize the functions of a computer by managing the hardware and software in it. The image 5.2 below depicts how the system software and application software interact with the hardware. - **Utility Software** – These are used to manage and analyze the software in the computer. The utility software differ from the application software in their complexity and operational activities. Utility software helps in managing the resources of the computer. However, the application software function in different to the utility software. There are many utility software which dedicated to perform certain functions. Some of them are mentioned below: - Anti-Virus Software – to protect the computer from virus infections - Disk Formatting – to prepare the storage device in order to save the files and folders - **Language Translators** - A computer program (software) is made up by using a set of instruction codes. These instructions are written in high level languages which are very close to the human languages. These high level languages are translated into machine language (i.e O's and 1's) which are understood by the computer by language translators. assembler, compiler and interpreter are examples for language translators. **Figure 5.2 - Hardware, System Software, Application Software** ### 5.1.2 Application Software The application software which runs on the Operating System is used to carry out computer based activities of the user such as creating documents, mathematical functions, data entry and, computer games. Ex: - Word processing - spread sheets - database - computer games - Web browsers ### 5.1.3 Importance of Operating System The software which facilitate the interaction between human user and hardware is the Operating System. The Operating System provides instructions for installation and management of various application software. Not only that the Operating System manages all the input, output and computer memory too, which means that Operating System is the sole software which manages the whole computer system. **Figure 5.3 Interaction between the user and the computer** ### 5.1.4 Introduction to several Operating Systems 1. **Microsoft Windows Operating System** This Operating System which was introduced by Microsoft is proprietary software which means users have to pay for software license. Nevertheless this Operating System very popular around the world and is available in many different editions such as: - Windows Xp - Windows vista - Windows 7 - Windows 8 In addition to the above versions there is a Windows Mobile version which is meant to be used in smart phones, tablets etc. There is a server edition called MS Windows Server as well. 2. **Apple Mac Operating System** The Mac Operating System which was developed by Apple Incorporation is called Apple Macintosh. This Operating System is also a proprietary software which requires payment for license. However, this Operating System can only be installed on Apple computers which are manufactured by Apple Incorporation. 3. **Ubuntu Operating System** Ubuntu has been developed based on Linux Operating System, This Operating System is available free of charge. Hence it is is called a Free and Open Source Software. We can download Ubuntu free from the URL: http//www.ubuntu.com 4. **Android Operating System** Android operating system is developed by Google. This is mainly used for the mobile devices. This is also a Free and Open Source Software. 5. **Hanthana Linux** This operating system is developed based on Linux operating system and can be downloaded free of charge at www.hanthana.org ### 5.1.5 Types of Operating Systems The main function of an Operating System is to provide an environment suitable for executing the commands issued by the user. Based on the functionality of the Operating System it can be classified as: 1. **Single user operating system** 2. **Multi user operating system** 3. **Multi-tasking operating system** 4. **Real time operating system** #### 1. Single user Operating System The Operating System which provides service to one person at a time is called a Single User Operating System. Example - MS Dos Operating System #### 2. Multi-User Operating System The Operating System which allows multiple users to use a system is simultaneously called a multi-user operating system. This type of Operating System is commonly used in Mainframe or Server computer where several users are connected to a computer system simultaneously. Example - Linux, Windows server #### 3. Multi-tasking Operating System The operating system which allows to run multiple process at the same time is called a multi-tasking operating system. A single user can run multiple operations (tasks) at the same time on this type of operating system. Example - Windows 7, Windows 8, Ubuntu, Mac Operating System #### 4. Real Time Operating System These are the Operating Systems which gives the output in real time without any observable delays. Real Time Operating Systems are mostly utilized in ATM end points. Also these kind of Operating Systems are installed in scientific devices and small gadgets. These Operating Systems are specifically designed for particular devices. Example - ATM machines, Calculators ### 5.1.6 Services of an Operating System The Operating System is a software which manages the hardware and other software in a computer system. It provides services to other software. There are two main services performed by an operating system. They are: 1. **Managing the hardware of a computer** 2. **Providing user interface** #### 1) Managing the Hardware of a computer Hardware of a computer are managed by using the following processes; - Process Management - Memory Management - Device Management - File Management - Security Management - Network Management **Figure 5.4 shows the inter connection between resource management within computer.** **Figure 5.4 - Resource Management** Let us now consider the above mentioned management tasks; #### i. Process Management A user can perform tasks using a computer. Consider the example of printing a letter. Eventhough we see the printing of a letter as a single process, it is infact performed by dividing the whole process into small tasks within the computer. We call this small task as a process. **Figure 5.5- Processes Management** We can call a running computer program or part of the program as a process. All the activities in a computer run as either a single process or a multiple processes. Resource management activities such as allocation of CPU time, allocation of memory, and allocation of input output devices of each process are managed under the resource management of Operating System. Odering of the processes (according to a sequence) is also performed under management. For example consider keying in some data using the keyboard while a document is being printed. The processor has to prioritize which action has to be performed first. For an observer it appears that both these actions are performed once. Infact, they run as two different processes. Also observe the situation where we make some changes to the document which is in print. Do these changes appear in that document which is being printed? The answer is "No" because these changes which was made after giving the print command do not appear in the printout. This proves that the processes within the computer are performed in certain order. #### ii. Memory Management Memory (We specifically talk about RAM - Random Access Memory) plays a major role during the functioning of the computer. The input data are stored in the RAM before being transferred to the CPU and the processed data i.e. information are also stored in the RAM before being sent to the Output devices. Hence systematic management of the memory is vital for the proper functioning of a computer. Memory management process makes sure that enough memory is allocated for each process and it also makes sure that the memory is freed once a particular process ends. **Figure 5.6 - Memory Management** The Operating System employs various techniques to memory management. We must keep in mind that the Operating System utilizes both the Primary Memory (RAM) and the Secondary Memory efficiently in order to manage the memory for various processes. Again consider the example where we type some changes to a word document is being printed. Do changes we incorporate to the document are printed? No, it does not. Once the command for print is sent the data are sent to the RAM. Only those data which is in the RAM would be printed. Those changes we add after the 'print command' are not printed. **Activity** - Explain how to find the capacity of Random Access Memory (RAM) - Write down the capasity you use. #### iii. Device Management There are several peripheral devices connected to a computer system. The operating system is responsible for the management of those devices. Device controllers are used to control the peripheral devices whereas device drivers are used to control software components. **Figure 5.7 - Device Management** For example if you want your newly bought printer to work properly you need to install the relevant device driver on the Operating System. If you do not install the driver you may not be able to get the full features of the Printer (such as printing on both sides of the paper, etc). Today there are devices which work once they are connected (plug and play). The relevant device drivers are installed automatically once the device is connected to the computer for the first time. Therefore nowadays the process of installation of the device driver has become easy. **Activity** When you connect a printer to a computer, the Operating System installs the relevant device driver automatically. When it does not install automatically we need to manually install it. Find out and write down the steps on how a device driver is installed in your Operating System. #### iv. File Management We can save data in files and we keep the files the folders in order to manage methodically. The Operating System to manage the files and folders. **Figure 5.8 - File Management** Some of the services performed by the Operating System in file management are listed below: - Making new files and saving them at suitable places - Deleting the unnecessary files - Arranging the folders in order and deleting the unnecessary folders - Renaming the files and folders - Changing the storage location of files and folders - Creating backups of the files and folders as needed **Figure 5.9 - File Management** File and folder management includes handling file properties, file operations, file access and file systems. **Activity** 1. There are many properties of a file/folder. Write down how you can find the properties of a file/folder and write down the properties. 2. Write down the names of the Operating System which uses the following file types; - FAT16 - FAT32 - NTFS - ext4 - ReiserFS 3. Explain the following two methods used for accessing the files using the Figure 5.10: - Sequential Access - Random Access **Figure 5.10 Sequential Access and Random Access** #### v. Security Management There are many security threats to a computer. For instance, Malicious Software (Malware) such as a virus could harm the smooth functioning of a computer. There could be other threats such as deletion or destruction of data/information by unauthorized access to the system. Protecting the computer from these kind of attacks also managed by the Operating System up to some extend. Various kinds of techniques are used by the Operating System to perform function. **Activity** 1. List out and explain each of the methods used by Operating System to prevent and control unauthorized access. 2. As Operating System cannot control or mitigate all the threats brought in by external malicious software. An Operating System gets the support of external (third party) software for this purpose. List out all the threats which are difficult to be controlled by Operating System alone and write down the names of different software which can be used against each of those threats. #### vi. Network Management Operating Systems support different types of network connectivities. They support wired and wireless connectivity for hardware devices in the system such as computers, printers, scanners that exist in the network. The Operating System also helps in accessing one computer from a remote computer. A computer network facilitates from simple text communication to a multimedia data communication. Today data communication is utilized at a greater scale in networks. This concept is well demonstrated by Cloud Computing. **Figure 5.11 - Computer Network Management** #### 2. Providing user friendly interface We need an interface to interact with the computer. An Operating System provides a user interface to input commands and instructions in a user friendly manner. Using this interface, we can perform tasks without using complex instructions. There are two types of user interfaces provided by the Operating Systems. They are: 1. **Command Line Interface-CLI** 2. **Graphical User Interface-GUI** The following section discusses in detail about each of the above interfaces. #### 1. Command Line Interface (CLI) This kind of interface was used by all the Operating System systems of the early days. This interface had a 'prompt' where the commands are keyed in using a keyboard. In using command line interface, the correct syntax has to be used. **Figure 5.12 - Command Line Interface** **Activity** 1. Explain how you can obtain the CLI of the Operating System you use. 2. List out a few commands used in CLI and the function performed by these commands. #### 2. Graphical User Interface (GUI) Almost all the present day Operating Systems use graphics on their interfaces. This GUI provides the ability to use the mouse or finger tips to navigate the commands. Therefore it has become much easier to interact with the computers today. These Operating System with GUI uses four components in order to make a friendly environment. These components are abbreviated as WIMP. WIMP stand for; - Windows - Icons - Menus - Pointer **Figure 5.13 - Graphical User Interface** **Activity** 1. Write down all the components of two different windows in the Operating System that you use. 2. Name all the icons in your desktop. 3. Explain how you use the options in two menus of two applications that you use. 4. There are different shapes (styles) for the mouse pointer. List few shapes of the mouse pointer. Explain how you can change the shape of the mouse pointer. 5. Write down the advantages and disadvantages of using the finger point against the mouse pointer of an Operating System. ### The utility programs in an Operating System Several processes are performed by the Operating System for the functioning of the computer. Many utility programs are available in the Operating System for the functioning of the machine as well as to protect from security threats. In the past we had to buy different utility programs and install whereas nowadays most of the required utilities come with the Operating System. There can be many types of utility programs in an Operating System: - Backup Software - To copy files and take back up of hard drives - Disk scanner - To check the errors in hard drive - Disk defragmentation - Organizing the hard disk by rearranging clusters of small spaces together and creating a larger free space. This increases the efficiency of the hard disk. - File/data compression - Compression of larger files into smaller files - Task Manager - to display information regarding the processes and programmes in a computer and the general status of the computer - System diagnosis tools - to monitor errors in hardware and software of a computer or network of computers and diagnosis of system errors. - Anti-Virus Software - Protecting the computer by identifying and eliminating malicious software - Clipboard - temporary storage of data/files for cut/copy and paste operations - Data synchronization software - to establish consistency among data from a source to a target data storage and vice versa - Disk partitioning software - can divide an individual drive into multiple logical drives - Screensavers - for blanking the screen or filling it with moving images or patterns when the computer is not in use. - System profilers - to provide detailed information about the software installed and hardware attached to the computer. - Network utilities - to analyze the computer's network connectivity, configure network settings, check data transfer or log events. In the following section details of some of the utilities in an operating system are given: - Disk Partitioning - Disk Formatting - Defragmentation #### Disk Partitioning What is a Partition? By default there will be only one physical drive in a hard drive. But this drive is normally divided into many logical partitions. This process of dividing an individual drive into multiple logical drives is called disk partitioning. Normally partitioning is performed at the time when a hard disk is configured for the first time. Partitioning could also be performed when a new hard disk is to be added or when an existing hard disk is replaced with a new hard disk. We may need to change the existing partition. When an already partitioned hard disk is partitioned again, all the data in that hard disk would be deleted. Therefore, it is necessary to keep it a point to keep a backup copy of the existing data before partitioning again. The following image depicts how a hard disk would look before and after partitioning. **Figure 5.14 - Hard Disk – before and after partitioning** Why do we need partitioning? There could be many reasons for undertaking partitioning. Below are some of the reasons for partitioning. - When we need to save different items in different places. (Ex: Software in one drive and all other data in another drive). - When we need to have more than one Operating System in the same machine. (Ex: When we need to install both Windows and Ubuntu Operating System) - To meet the requirement of the Operating System (Ex: Sometimes it becomes mandatory that a separate partition is allocated for the Operating System) We can see each of the divided partition as separate drives. In Windows environment, it is a customary to name the first drive as C: drive and go on. This means that the First partition becomes the first drive and would be named as C: drive and the second drive would be named as D: drive and so on. Note: In windows environment, Multimedia drives (DVD, CD), flash drives etc. which are connected to the computer would be identified as 'Drives' and they would be named using an English letter after C (after partitioning the hard disk). However, in Linux environment all the partitions, multimedia drives, flash drives etc. would be identified as individual folders (in Linux they are called Directories). Therefore it cannot be seen drives named C: D: etc in Linux environment. #### Disk Formatting A hard disk cannot be used once partitioning is completed. We need to format each of the drives individually. Formatting is the process of preparing a data storage device such as a hard disk drive, solid-state drive, floppy disk or USB flash drive for storing data. This is done using a file format in the Operating System. The USB Flash Drives come pre-formatted so that they can be put into use directly. We can format hard disk drive, solid-state drive, floppy disk or USB flash drive whenever need arises. Every time we perform formatting the data in the drive would be deleted. Therefore it is necessary to keep back up copies of the data before formatting. Once a hard disk is partitioned and formatted we can start saving data on it. Usually a hard disk is partitioned and formatted before installing an Operating System for the first time. After the first time the need for partitioning or formatting could arise very rarely. You can see in the image below how a hard disk would look like after partitioning and formatting. **Figure 5.15-Har Disk – before and after partitioning and formatting** #### Defragmentation The following shows the defragment in Windows. Sometimes a file (which is larger in size) may not be stored as a single track in the hard disk. This process where a single file is broken into different pieces and stored in different parts of the disk is called fragmentation. **Figure 5.16 - How a file is stored in different places of a disk** The Operating System splits a file into several portions and saves them in different places in the disk especially when a saved file becomes larger due to multiple editing. Further, the empty spaces that are created in the disk due to the deletion of files is used to save new files which causes fragmentation. It takes longer time to read a file when a file is defragmented and saved in different places in the disk. It affects the efficiency of the computer. If you observe a slowness of the machine (there could be many reasons for the slowness of the computer, whereas fragmentation could be a one reason) the best action to take would be to start defragmentation. Disk defragmentation is the process of rearranging the fragmented data on a volume (such as a hard disk or a storage device) so it will work more efficiently. **Figure 5.17 - Before Defragmentation After Defragmentation** However Linux based Operating Systems use a different method to store files. Linux Operating System makes sure that ample space is left between the saved files so that they can be saved at the same location as a single intact file even when the file expands due to editing. Therefore there is very little possibility for fragmentation to happen. It is also because Linux based Operating Systems have the ability even to relocate the file in a new place if the file exceeds its allocated memory space. Therefore there is no need for 'defragmentation utility' in Linux based Operating Systems. ### 5.2 Introduction to File Systems Computer is a machine which allows for storage of large volumes of data while facilitating the quick retrieval of those saved data when we need. The data we save must be given a file name for the purpose of identification. There are many file names used in the storage media which are relevant to a partuclar Operating System and Application Software. But all these file names consist of two components, namely file name and file extension. However the file extension are hidden to the user by the Operating System by default. ### 5.2.1 Finding out the File Extension Start Control Panel Folder Options View Hide Extensions for known File types (See Figure 5.11) untick it Then click OK. **Figure 5.18 - Details of a file** Now double click on any folder. Then we can view file extensions of any file. **Figure 5.19 - Window to set up display of file extensions** Note: The Operating System identifies the file type using the file extensions. There are many file extensions in use. Some of them are listed below: | File Extension | File Type | | --------------- | --------- | | exe | Executable | | docx | Word | | xlsx | Excel | | pptx | PowerPoint | | accdb | Access | A file name and a location are given when saving a file in the computer. The Operating System maintains many other information relevant to the file. - Type of file - Size of the File - Saved Date and Time To view these data, right click on a particular file and then click on 'properties' from the list that appears. **Figure 5.20 - Viewing details of a file** ### Selecting a location to save a file A location is used in the storage space to save a file. It is called a drive. The previous section detailed that several drives can exist after partitioning. ### Drives By default a computer uses the hard drive to save. If the hard drive is not partitioned then it would be labelled as C: drive. If the hard drive is partitioned then the partitions could be named in order as [C:], [D:], [E:] etc. If there are other storage media such as CD, DVD or Blue Ray Disk drives in a computer then these drives are given different letter names. For example if the hard disk is partitioned into four separate partitions then they would be labelled [C:], [D:], [E:]and [F:] drives whereas a CD, DVD or Blue Ray Disk drive would be named as [G:] drive. In the same manner when a pen drive is connected to the computer the new drive would be labelled as [K:] drive. If you want to see the number of drives in a computer, observe the following steps: Open the icon "Computer". Now you can see, the externally connected drives such as Blue Ray Disk drives and pen drives are shown as devices with removable storage. **Figure 5.21 - Viewing the drives** Even though we use the drives to store the files, in general they are not directly stored to the drive. Usually we create a folder in a drive and then store the file it in. We should give a name to the folder in order to identify the folders too. ### Creating a Folder 1. Select the drive where the folder to be created. 2. Now select 'Folder' under 'New' in 'File Menu' or 'New folder' under 'Tools'. 3. Provide a suitable folder name ### Managing files and folders We have to perform many activities using the files and folders in a drive. 1. Copy and paste of files/folders 2. Select the file/folder to be copied 3. Select copy (Edit → Copy or Ctrl +C) 4. Select the destination drive or folder 5. Select paste (Edit → Paste or Ctrl + V) ### Cut and Paste of files/folders 1. Select the file/folder to be cut 2. Select to cut (Edit → cut or Ctrl +X) 3. Select the destination drive or folder 4. Select paste (Edit → Paste or Ctrl + V) ### Renaming a file/folder 1. Select the file/folder to be renamed 2. Select to rename under File menu 3. Key the new name and Enter ### Deleting a file/folder 1. Select the file/folder to be deleted 2. Select to delete under File menu or use Delete key on the Keyboard 3. Click 'Yes' in the dialog box that appears. Then the deleted file/folder would be placed in Recycle Bin temporarily. **Figure 5.22 - Delete Dialog box** ### Restore a Deleted file/folder 1.Open Recycle bin 2.Select the file/folder to be restored 3.Click Restore under File menu ### Summary - Operating System is essential for Operating a Computer. - All the Application Software in the computer runs on the Operating System. - The User Interface functions as the facilitator between the computer and the user. - The GUI is convenient to the user than the CLI. - The types of Operating System are: Single User, Multi User, Multi-tasking and Real Time User. - The Operating System which provides service to one person at a time is called a Single User Operating System. - The Operating System which allows multiple users to use a system is called a Multi User Operating System. - The Operating System which allows to run multiple process at the same time is called a Multi-Tasking Operating System. - The Operating System helps in managing all the resources of a computer. - The hard disk is partitioned and formatted before installing an Operating System. - A file consists of a File Name and Extension - Folders are used to save files - In order to save the files the user creates folders inside the drive.

Use Quizgecko on...
Browser
Browser