OPERATING SYSTEM (1).pdf
Document Details
Uploaded by Deleted User
Full Transcript
OPERATING SYSTEM An operating system is a program that manages a computer’s hardware. It also provides a basis for application programs and acts as an intermediary between the computer user and computer hardware. The main task an operating system carries out is the allocation of resources and servic...
OPERATING SYSTEM An operating system is a program that manages a computer’s hardware. It also provides a basis for application programs and acts as an intermediary between the computer user and computer hardware. The main task an operating system carries out is the allocation of resources and services, such as the allocation of memory, devices, processors, and information. The operating system also includes programs to manage these resources, such as a traffic controller, a scheduler, a memory management module, I/O programs, and a file system. The operating system simply provides an environment within which other programs can do useful work. The main goal of the Operating System is to make the computer environment more convenient to use and the Secondary goal is to use the resources most efficiently. Figure: Operating System Why are Operating Systems Used? Operating System is used as a communication channel between the computer hardware and the user. It works as an intermediate between System Hardware and End-User. Operating System handles the following responsibilities: It controls all the computer resources. It provides valuable services to user programs. It coordinates the execution of user programs. It provides resources for user programs. It provides an interface (virtual machine) to the user. It hides the complexity of software. It supports multiple execution modes. It monitors the execution of user programs to prevent errors. Advantages of Operating System: O/S gives the interface between the clients and equipment. O/S permits to User Friendly Graphic Interface for all clients since it gives different menus, catches, symbols, and more for simple route. financially savvy. These stages are agreeable for all projects. O/S utilizes various procedures, for example, memory division, paging, and trading. Working framework can deal with own memory with utilizing those methods. O/S helps change all projects into measure for executing directions, and it has answerable for synchronizing of all cycle. It has no needed to fracture. It additionally can share various assets like as Printer, Fax and so on. O/S can be refreshed time by time with no problem. It gives the adaptable interface to introducing a wide range of games and programming, and can run effectively them. Various O/S are accessible in open source, for example, Unix/Linux. Working System can be run effectively on PC framework with no cost (Free). Disadvantages of Operating System: It has broadened memory access times, for example, page table query. Need improvement with utilizing TLB. Required protected page tables. Need more memory for memory board. Need inner fracture. It required greater improvement in staggered page tables and variable page sizes. It is exceptionally troublesome assignment for giving whole assurance from all infections in light of fact that any danger can be embedded any time. Functions of an Operating System: (i) Memory Management: In a computer system, we have primary memory, which is also called main memory, and it is made by the sequence of bytes. Each byte in the main memory has a unique address which helps it to check if it is occupied or not. For executing each program in its computer system, it should be in the main memory. Operating systems can easily check which bytes of main memory are empty and which are not. So, it allocates the main memory for the program execution, and when the program is completed or terminated, then it deallocates the memory. Operating systems also keep a record that which byte of memory is assigned to which program. Figure: Memory Management (ii) Processor Management: The process is a program under the execution. The operating system manages all the processes so that each process gets the CPU for a specific time to execute itself, and there will be less waiting time for each process. This management is also called process scheduling. For process scheduling operating system uses various algorithms: o First Come First Serve (FCFS) Algorithm: In this algorithm, which comes first is served first by the CPU until it is completed. It is a non-preemptive algorithm which means it cannot be terminated without completing it. o Shortest Job First (SJF) Algorithm: The process which has the shortest burst time (execution time) that will be served first by the CPU. o Longest Job First (LJF) Algorithm: This algorithm is based on the phenomenon that the process that has the longest execution time will be served first by the processor. o Round Robin Algorithm: In this algorithm, there is a specific time quanta assigned for each process. If the process is not executed in time quanta, it is sent to the waiting queue for its next turn. o Priority Scheduling Algorithm: Processes are given the priority based on different criteria and scheduled according to the highest priority. Criteria can be burst time or arrival time etc. (iii) File Management: A file system is organized into directories for efficient or easy navigation and usage. These directories may contain other directories and other files. An Operating System carries out the following file management activities. It keeps track of where information is stored, user access settings, the status of every file, and more. These facilities are collectively known as the file system. An OS keeps track of information regarding the creation, deletion, transfer, copy, and storage of files in an organized way. It also maintains the integrity of the data stored in these files, including the file directory structure, by protecting against unauthorized access. Figure: File Management (iv) User Interface or Command Interpreter: The user interacts with the computer system through the operating system. Hence OS acts as an interface between the user and the computer hardware. This user interface is offered through a set of commands or a graphical user interface (GUI). Through this interface, the user makes interacts with the applications and the machine hardware. (v) Security: The operating system uses password protection to protect user data and similar other techniques. it also prevents unauthorized access to programs and user data. The operating system provides various techniques which assure the integrity and confidentiality of user data. The following security measures are used to protect user data: Protection against unauthorized access through login. Protection against intrusion by keeping the firewall active. Protecting the system memory against malicious access. Displaying messages related to system vulnerabilities. (vi) Error-Detecting Aids: The operating system constantly monitors the system to detect errors and avoid malfunctioning computer systems. From time to time, the operating system checks the system for any external threat or malicious software activity. It also checks the hardware for any type of damage. This process displays several alerts to the user so that the appropriate action can be taken against any damage caused to the system. Characteristics of Operating System: Below are the detailed characteristics of Operating System: 1. Concurrency: An Operating System should be able to handle multiple tasks or processes at the same time, allowing users to multitask and improve system efficiency. 2. Virtualization: An operating system creates virtual resources i.e. virtual memory and virtual CPUs, in order to enhance the efficiency of system and also to enable multiple processes to run at the same time. 3. Security: An operating system provides security features like protection against unauthorized access, file encryption of sensitive data, firewalls, and antivirus software. It also provides features like backup and recovery to ensure data availability in case of data loss or system failure. 4. Fault Tolerance: An operating system is designed in such a way that it is able to handle hardware and software failures and performs error detection and recovery mechanisms in order to minimize system downtime and data loss. 5. Ease of Use: An operating system is user-friendly and very easy to use, providing a simple and intuitive interface for users with no or less computer knowledge to interact with the system and run applications. 6. Hardware Abstraction: An operating system should provide hardware abstraction, which means it should provide a uniform interface to hardware devices, making it easier for software applications to interact with hardware devices without having to know the underlying hardware details. Examples of Operating Systems: Windows (GUI-based, PC) GNU/Linux (Personal, Workstations, ISP, File, and print server, Three-tier client/Server) macOS (Macintosh), used for Apple’s personal computers and workstations (MacBook, iMac). Android (Google’s Operating System for smartphones/tablets/smartwatches) iOS (Apple’s OS for iPhone, iPad, and iPod Touch) Types of operating systems: Here are the different types of operating systems you need to know: 1. Batch Operating System: The batch operating system does not have a direct link with the computer. A different system divides and allocates similar tasks into batches for easy processing and faster response. The batch operating system is appropriate for lengthy and time-consuming tasks. These systems are used for tasks such as managing payroll systems, data entry and bank statements. To avoid slowing down a device, each user prepares their tasks offline and submits them to an operator. The advantages and disadvantages of using a batch operating system include: Advantages Disadvantages Many users can share batch systems. There is Batch operating systems are challenging little idle time for batch operating systems. to debug. Any failure of the system creates a It becomes possible to manage large workloads. backlog. It's easy to estimate how long a task will take to It may be costly to install and maintain be completed. good batch operating systems 2. Multiprogramming Operating System: Multiprogramming is an extension to batch processing where the CPU is always kept busy. Each process needs two types of system time: CPU time and IO time. In a multiprogramming environment, when a process does its I/O, The CPU can start the execution of other processes. Therefore, multiprogramming improves the efficiency of the system. Advantages: The multi-programming batched system improves the efficiency of the job assigned by reducing idle time as it takes up another job if the last job requires help. Since multiple jobs are concurrently taking place, user interactivity with the jobs is easy. Hence, jobs requiring assistance are resolved quickly, which leads to saving time and faster response. Multi-programming batched systems facilitate the resources and peripherals among the jobs assigned. This leads to better utilization and better efficiency. Disadvantages: Multi-programming batched systems are responsible for the concurrent working of the jobs and hence such programming adds complexity to the implementation. The execution of multiple programming with memory management techniques and sophisticated scheduling algorithms makes the programs more difficult to develop and maintain. Context switching between various programs can cause increased overhead due to managing and storing programming states. 3. Time-sharing or multitasking Operating System: The time-sharing operating system, also known as a multitasking OS, works by allocating time to a particular task and switching between tasks frequently. Unlike the batch system, the time-sharing system allows users to complete their work in the system simultaneously. Examples of time-sharing operating systems include Multics and Unix. These types of systems allow many users to be distributed across various terminals to minimize response time. Potential advantages and disadvantages of time-sharing operating systems include: Advantages Disadvantages There's a quick response during task The user's data security might be a performance. problem. System failure can lead to widespread It minimizes the idle time of the processor. failures. All tasks get an equal chance of being Problems in data communication may accomplished. arise. The integrity of user programs is not It reduces the chance of software duplication. assured. Figure: Multitasking Operating System 4.Real-time Operating System: Real-time operating systems provide support to real-time systems that require observance of strict time requirements. They are typically used for tasks such as scientific experiments, medical imaging, robotics and air traffic control operations. The response time between input, processing and response is tiny, which is beneficial for processes that are highly sensitive and need high precision. These processes include operating missile systems, medical systems or air traffic control systems, where delays may lead to loss of life and property. Real-time operating systems may either be hard real-time systems or soft real- time systems. Hard real-time systems are installed in applications with strict time constraints. The system guarantees the completion of sensitive tasks on time. Hard real- time does not have virtual memory. Soft real-time systems do not have equally rigid time requirements. A critical task gets priority over other tasks. Potential advantages and disadvantages of real-time operating systems include: Advantages Disadvantages They use device and systems maximally, They have a low capacity to run tasks hence more output. simultaneously. They allow fast shifting from one task to They use heavy system resources. another. The focus is on current tasks, and less They run on complex algorithms that are not focus is put on the queue. easy to understand. They're unsuitable for thread priority because of They can be used in embedded systems. the system's inability to switch tasks. Real-time systems are meticulously programmed, hence free of errors. They allow easy allocation of memory. 5.Distributed Operating System: The Distributed Operating system is not installed on a single machine, it is divided into parts, and these parts are loaded on different machines. A part of the distributed Operating system is installed on each machine to make their communication possible. Distributed Operating systems are much more complex, large, and sophisticated than Network operating systems because they also have to take care of varying networking protocols. Advantages Disadvantages If the primary network fails, the entire They allow remote working. system shuts down. They allow a faster exchange of data among They're expensive to install. users. Failure in one site may not cause much They require a high level of expertise to disruption to the system. maintain. Advantages Disadvantages They reduce delays in data processing. They minimize the load on the host computer. They enhance scalability since more systems can be added to the network. 6.Network Operating System: Network operating systems are installed on a server providing users with the capability to manage data, user groups and applications. This operating system enables users to access and share files and devices such as printers, security software and other applications, mostly in a local area network. Examples of network operating systems include Microsoft Windows, Linux and macOS X. Potential advantages and disadvantages of these systems are: 7.Clustered Operating System: Cluster systems are similar to parallel systems because both systems use multiple CPUs. The primary difference is that clustered systems are made up of two or more independent systems linked together. They have independent computer systems and a shared storage media, and all systems work together to complete all tasks. All cluster nodes use two different approaches to interact with one another, like message passing interface (MPI) and parallel virtual machine (PVM). Advantages: Various advantages of Clustered Operating System are as follows: High Availability: Although every node in a cluster is a standalone computer, the failure of a single node doesn't mean a loss of service. A single node could be pulled down for maintenance while the remaining clusters take on a load of that single node. Cost Efficiency: When compared to highly reliable and larger storage mainframe computers, these types of cluster computing systems are thought to be more cost-effective and cheaper. Furthermore, most of these systems outperform mainframe computer systems in terms of performance. Fault Tolerance: Clustered systems are quite fault-tolerance, and the loss of a single node does not result in the system's failure. They might also have one or more nodes in hot standby mode, which allows them to replace failed nodes. Performance: The clusters are commonly used to improve the availability and performance over the single computer systems, whereas usually being much more cost-effective than the single computer system of comparable speed or availability. Processing Speed: The processing speed is also similar to mainframe systems and other types of supercomputers on the market. Disadvantages: Various disadvantages of the Clustered Operating System are as follows: Cost-Effective: One major disadvantage of this design is that it is not cost-effective. The cost is high, and the cluster will be more expensive than a non-clustered server management design since it requires good hardware and a design. Required Resources: Clustering necessitates the use of additional servers and hardware, making monitoring and maintenance difficult. As a result, infrastructure must be improved. Maintenance: It isn't easy to system establishment, monitor, and maintenance this system. 8.Embedded Operating System: An embedded operating system is a computer operating system designed for use in embedded computer systems. These operating systems are designed to be small, resource- efficient, dependable, and reduce many features that aren't required by specialized applications. The hardware that runs an embedded operating system is usually quite resource- constrained. Embedded hardware systems are typically quite specific, and it means that these systems are designed to cover certain tasks due to limited resources. Advantages: There are various advantages of an embedded operating system. Some of them are as follows: 1. It is small in size and faster to load. 2. It is low cost. 3. It is easy to manage. 4. It provides better stability. 5. It provides higher reliability. 6. It provides some interconnections. 7. It has low power consumption. 8. It helps to increase the product quality. Disadvantages: There are various disadvantages of an embedded operating system. Some of them are as follows: 1. It isn't easy to maintain. 2. The troubleshooting is harder. 3. It has limited resources for memory. 4. It isn't easy to take a back of embedded files. 5. You can't change, improve, or upgrade an embedded system once it's been developed. 6. If any problem occurs, you need to reset the setting. 7. Its hardware is limited. Figure: Embedded Operating System Difference between Multiprogramming and Multi-tasking: Sr.no Multiprogramming Multi-tasking It includes the single CPU to execute 1. It uses multiple tasks for the task allocation. the program. Concept of Context Switching is Concept of Context Switching and Time 2. used. Sharing is used. The processor is typically used in time In multiprogrammed system, the sharing mode. Switching happens when operating system simply switches 3. either allowed time expires or where there to, and executes, another job when other reason for current process needs to current job needs to wait. wait (example process needs to do IO). Multi-programming increases CPU In multi-tasking also increases CPU 4. utilization by organizing jobs. utilization, it also increases responsiveness. Sr.no Multiprogramming Multi-tasking The idea is to further extend the CPU The idea is to reduce the CPU idle 5. Utilization concept by increasing time for as long as possible. responsiveness Time Sharing. It uses job scheduling algorithms so Time sharing mechanism is used so that 6. that more than one program can multiple tasks can run at the same time. run at the same time. In community edition, personalized Promotions, personalized shopping 7. shopping experiences is not experiences can be displayed in enterprise created. edition products. Execution of process takes more 8. Execution of process takes less time. time.