OS – TAT & WAT

Operating System – TAT & WAT ”; Previous Next CPU scheduling is a crucial aspect of operating systems that determines the order in which processes are executed on the central processing unit (CPU). Two important metrics used to evaluate the efficiency of CPU scheduling algorithms are Turn Around Time (TAT) and Waiting Time (WT). Understanding the difference between these two metrics can provide insights into the performance and responsiveness of a CPU scheduling algorithm. Turn Around Time (TAT) Turn Around Time (TAT) is the total time taken for a process to complete its execution from the moment it enters the system until it finishes. It includes both the time the process spends executing on the CPU and the time it spends waiting for CPU time. TAT is measured from the start of the process to its completion and is often used to evaluate the overall efficiency of a scheduling algorithm. A shorter TAT indicates faster completion of processes and better system performance. Impacts of TAT Turn Around Time (TAT) is an important metric to indicate the performance of processes. Following are the some of the important points to consider for TAT. Calculation − TAT is calculated as the difference between the completion time and the arrival time of a process. It measures the overall time a process spends in the system, including both execution and waiting time. Importance − TAT provides a comprehensive measure of the process”s total turnaround time in the system. It helps assess the overall efficiency and performance of a CPU scheduling algorithm. A shorter TAT indicates faster completion of processes and better system performance. Impact − A shorter TAT implies that processes spend less time in the system, which leads to better resource utilization, improved responsiveness, and increased throughput. Minimizing TAT is crucial for meeting performance targets and ensuring efficient execution of processes. Waiting Time (WT) Waiting Time (WT) refers to the total amount of time a process spends waiting in the ready queue before it can be executed on the CPU. It is the time interval between the process”s arrival in the ready queue and the start of its execution. WT measures the extent to which processes have to wait for CPU time and is a crucial factor in assessing the efficiency of a CPU scheduling algorithm. Minimizing waiting time is desirable as it improves system responsiveness and reduces idle time for processes. Impacts of TAT Turn Around Time (TAT) is an important metric to indicate the scheduling of processes. Following are the some of the important points to consider for WT. Calculation − WT is calculated as the difference between the start time of execution and the arrival time of a process. It focuses solely on the waiting time component and does not include the execution time. Importance − WT reflects the waiting experience of individual processes in the ready queue. It provides insights into process responsiveness and the efficiency of a CPU scheduling algorithm. Impact − Reducing waiting time (WT) is crucial for improving system responsiveness, reducing process idle time, and enhancing overall performance. Minimizing WT ensures efficient utilization of the CPU and improves the user experience by reducing process delays and improving system throughput. Difference between Turn Around Time (TAT) and Waiting Time (WT) in CPU Scheduling The following table highlights the major differences between TAT and WT in CPU scheduling − S.N. Criteria Turn Around Time (TAT) Waiting Time (WT) 1 Definition The total time taken for a process to complete its execution The total time a process spends waiting in the ready queue 2 Calculation Completion time − Arrival time Start time of execution − Arrival time 3 Inclusion Includes both waiting time and execution time Focuses solely on waiting time in the ready queue 4 Evaluation Assesses the overall efficiency and performance of a scheduling algorithm Reflects waiting experience and process responsiveness 5 Impact Provides a comprehensive measure of process turnaround time Directly affects system responsiveness and reduces idle time 6 Importance Critical for evaluating the efficiency and performance of a scheduling algorithm Crucial for improving system responsiveness and reducing waiting time 7 Optimization Lower TAT indicates faster execution and better system performance Minimizing WT improves system responsiveness and resource utilization 8 Measurement Measured from the process arrival to completion Measured from the process arrival to the start of execution 9 Purpose Evaluates the efficiency of a scheduling algorithm as a whole Focuses on individual process waiting times in the ready queue Conclusion Understanding the differences between Turn Around Time (TAT) and Waiting Time (WT) is crucial in evaluating the efficiency and performance of a CPU scheduling algorithm. While TAT provides a comprehensive measure of the process”s total turnaround time, including waiting time and execution time, WT specifically focuses on the time a process spends waiting in the ready queue. By considering both metrics, system designers and schedulers can make informed decisions to optimize CPU scheduling algorithms, improve system responsiveness, and enhance overall performance. Print Page Previous Next Advertisements ”;

OS – Home

Operating System Tutorial PDF Version Quick Guide Resources Job Search Discussion An Operating System (OS) is a collection of software that manages computer hardware resources and provides common services for computer programs. When you start using a Computer System then it”s the Operating System (OS) which acts as an interface between you and the computer hardware. The operating system is really a low level Software which is categorised as a System Software and supports a computer”s basic functions, such as memory management, tasks scheduling and controlling peripherals etc. This simple and easy tutorial will take you through step by step approach while learning Operating System concepts in detail. What is Operating System? An Operating System (OS) is an interface between a computer user and computer hardware. An operating system is a software which performs all the basic tasks like file management, memory management, process management, handling input and output, and controlling peripheral devices such as disk drives and printers. Generally, a Computer System consists of the following components: Computer Users are the users who use the overall computer system. Application Softwares are the softwares which users use directly to perform different activities. These softwares are simple and easy to use like Browsers, Word, Excel, different Editors, Games etc. These are usually written in high-level languages, such as Python, Java and C++. System Softwares are the softwares which are more complex in nature and they are more near to computer hardware. These software are usually written in low-level languages like assembly language and includes Operating Systems (Microsoft Windows, macOS, and Linux), Compiler, and Assembler etc. Computer Hardware includes Monitor, Keyboard, CPU, Disks, Memory, etc. So now let”s put it in simple words: If we consider a Computer Hardware is body of the Computer System, then we can say an Operating System is its soul which brings it alive ie. operational. We can never use a Computer System if it does not have an Operating System installed on it. Operating System – Examples There are plenty of Operating Systems available in the market which include paid and unpaid (Open Source). Following are the examples of the few most popular Operating Systems: Windows: This is one of the most popular and commercial operating systems developed and marketed by Microsoft. It has different versions in the market like Windows 8, Windows 10 etc and most of them are paid. Linux This is a Unix based and the most loved operating system first released on September 17, 1991 by Linus Torvalds. Today, it has 30+ variants available like Fedora, OpenSUSE, CentOS, UBuntu etc. Most of them are available free of charges though you can have their enterprise versions by paying a nominal license fee. MacOS This is again a kind of Unix operating system developed and marketed by Apple Inc. since 2001. iOS This is a mobile operating system created and developed by Apple Inc. exclusively for its mobile devices like iPhone and iPad etc. Android This is a mobile Operating System based on a modified version of the Linux kernel and other open source software, designed primarily for touchscreen mobile devices such as smartphones and tablets. Some other old but popular Operating Systems include Solaris, VMS, OS/400, AIX, z/OS, etc. Operating System – Functions To brief, Following are some of important functions of an operating System which we will look in more detail in upcoming chapters: Process Management I/O Device Management File Management Network Management Main Memory Management Secondary Storage Management Security Management Command Interpreter System Control over system performance Job Accounting Error Detection and Correction Coordination between other software and users Many more other important tasks Operating Systems – History Operating systems have been evolving through the years. In the 1950s, computers were limited to running one program at a time like a calculator, but later in the following decades, computers began to include more and more software programs, sometimes called libraries, that formed the basis for today’s operating systems. The first Operating System was created by General Motors in 1956 to run a single IBM mainframe computer, its name was the IBM 704. IBM was the first computer manufacturer to develop operating systems and distribute them in its computers in the 1960s. There are few facts about Operating System evaluation: Stanford Research Institute developed the oN-Line System (NLS) in the late 1960s, which was the first operating system that resembled the desktop operating system we use today. Microsoft bought QDOS (Quick and Dirty Operating System) in 1981 and branded it as Microsoft Operating System (MS-DOS). As of 1994, Microsoft had stopped supporting MS-DOS. Unix was developed in the mid-1960s by the Massachusetts Institute of Technology, AT&T Bell Labs, and General Electric as a joint effort. Initially it was named MULTICS, which stands for Multiplexed Operating and Computing System. FreeBSD is also a popular UNIX derivative, originating from the BSD project at Berkeley. All modern Macintosh computers run a modified version of FreeBSD (OS X). Windows 95 is a consumer-oriented graphical user interface-based operating system built on top of MS-DOS. It was released on August 24, 1995 by Microsoft as part of its Windows 9x family of operating systems. Solaris is a proprietary Unix operating system originally developed by Sun Microsystems in 1991. After the Sun acquisition by Oracle in 2010 it was renamed Oracle Solaris. Why to Learn Operating System If you are aspiring to become a Great Computer Programmer then it is highly recommended to understand how exactly an Operating System works inside out. This gives opportunity to understand how exactly data is saved in the disk, how different processes are created and scheduled to run by the CPU, how to interact with different I/O devices and ports. There are various low level concepts which help a programmer to Design and Develop scalable softwares. Bottom line is without a good understanding of Operating System Concepts, it can”t be assumed someone to be a good Computer Application Software developer, and even it is unimaginable imagine someone to become

OS – Overview

Operating System – Overview ”; Previous Next An Operating System (OS) is an interface between a computer user and computer hardware. An operating system is a software which performs all the basic tasks like file management, memory management, process management, handling input and output, and controlling peripheral devices such as disk drives and printers. An operating system is software that enables applications to interact with a computer”s hardware. The software that contains the core components of the operating system is called the kernel. The primary purposes of an Operating System are to enable applications (spftwares) to interact with a computer”s hardware and to manage a system”s hardware and software resources. Some popular Operating Systems include Linux Operating System, Windows Operating System, VMS, OS/400, AIX, z/OS, etc. Today, Operating systems is found almost in every device like mobile phones, personal computers, mainframe computers, automobiles, TV, Toys etc. Definitions We can have a number of definitions of an Operating System. Let”s go through few of them: An Operting System is the low-level software that supports a computer”s basic functions, such as scheduling tasks and controlling peripherals. We can refine this definition as follows: An operating system is a program that acts as an interface between the user and the computer hardware and controls the execution of all kinds of programs. Following is another definition taken from Wikipedia: An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. Architecture We can draw a generic architecture diagram of an Operating System which is as follows: Operating System Generations Operating systems have been evolving over the years. We can categorise this evaluation based on different generations which is briefed below: 0th Generation The term 0th generation is used to refer to the period of development of computing when Charles Babbage invented the Analytical Engine and later John Atanasoff created a computer in 1940. The hardware component technology of this period was electronic vacuum tubes. There was no Operating System available for this generation computer and computer programs were written in machine language. This computers in this generation were inefficient and dependent on the varying competencies of the individual programmer as operators. First Generation (1951-1956) The first generation marked the beginning of commercial computing including the introduction of Eckert and Mauchly’s UNIVAC I in early 1951, and a bit later, the IBM 701. System operation was performed with the help of expert operators and without the benefit of an operating system for a time though programs began to be written in higher level, procedure-oriented languages, and thus the operator’s routine expanded. Later mono-programmed operating system was developed, which eliminated some of the human intervention in running job and provided programmers with a number of desirable functions. These systems still continued to operate under the control of a human operator who used to follow a number of steps to execute a program. Programming language like FORTRAN was developed by John W. Backus in 1956. Second Generation (1956-1964) The second generation of computer hardware was most notably characterised by transistors replacing vacuum tubes as the hardware component technology. The first operating system GMOS was developed by the IBM computer. GMOS was based on single stream batch processing system, because it collects all similar jobs in groups or batches and then submits the jobs to the operating system using a punch card to complete all jobs in a machine. Operating system is cleaned after completing one job and then continues to read and initiates the next job in punch card. Researchers began to experiment with multiprogramming and multiprocessing in their computing services called the time-sharing system. A noteworthy example is the Compatible Time Sharing System (CTSS), developed at MIT during the early 1960s. Third Generation (1964-1979) The third generation officially began in April 1964 with IBM’s announcement of its System/360 family of computers. Hardware technology began to use integrated circuits (ICs) which yielded significant advantages in both speed and economy. Operating system development continued with the introduction and widespread adoption of multiprogramming. The idea of taking fuller advantage of the computer’s data channel I/O capabilities continued to develop. Another progress which leads to developing of personal computers in fourth generation is a new development of minicomputers with DEC PDP-1. The third generation was an exciting time, indeed, for the development of both computer hardware and the accompanying operating system. Fourth Generation (1979 – Present) The fourth generation is characterised by the appearance of the personal computer and the workstation. The component technology of the third generation, was replaced by very large scale integration (VLSI). Many Operating Systems which we are using today like Windows, Linux, MacOS etc developed in the fourth generation. Following are some of important functions of an operating System. Memory Management Processor Management Device Management File Management Network Management Security Control over system performance Job accounting Error detecting aids Coordination between other software and users Memory Management Memory management refers to management of Primary Memory or Main Memory. Main memory is a large array of words or bytes where each word or byte has its own address. Main memory provides a fast storage that can be accessed directly by the CPU. For a program to be executed, it must in the main memory. An Operating System does the following activities for memory management − Keeps tracks of primary memory, i.e., what part of it are in use by whom, what part are not in use. In multiprogramming, the OS decides which process will get memory when and how much. Allocates the memory when a process requests it to do so. De-allocates the memory when a process no longer needs it or has been terminated. Processor Management In multiprogramming environment, the OS decides which process gets the processor when and for how much time. This function is called process scheduling. An Operating System does the following activities for processor management − Keeps tracks of processor and status of process. The program responsible for

OS – History

Operating System – History ”; Previous Next Operating systems have been evolving through the years. In the 1950s, computers were limited to running one program at a time like a calculator, but later in the following decades, computers began to include more and more software programs, sometimes called libraries, that formed the basis for today’s operating systems. The first Operating System was created by General Motors in 1956 to run a single IBM mainframe computer, its name was the IBM 704. IBM was the first computer manufacturer to develop operating systems and distribute them in its computers in the 1960s. Following is the timeline about Operating System evaluation: Stanford Research Institute developed the oN-Line System (NLS) in the late 1960s, which was the first operating system that resembled the desktop operating system we use today. Microsoft bought QDOS (Quick and Dirty Operating System) in 1981 and branded it as Microsoft Operating System (MS-DOS). As of 1994, Microsoft had stopped supporting MS-DOS. Unix was developed in the mid-1960s by the Massachusetts Institute of Technology, AT&T Bell Labs, and General Electric as a joint effort. Initially it was named MULTICS, which stands for Multiplexed Operating and Computing System. FreeBSD is also a popular UNIX derivative, originating from the BSD project at Berkeley. All modern Macintosh computers run a modified version of FreeBSD (OS X). Windows 95 is a consumer-oriented graphical user interface-based operating system built on top of MS-DOS. It was released on August 24, 1995 by Microsoft as part of its Windows 9x family of operating systems. Solaris is a proprietary Unix operating system originally developed by Sun Microsystems in 1991. After the Sun acquisition by Oracle in 2010 it was renamed Oracle Solaris. Operating System Generations Operating systems have been evolving over the years. We can categorise this evaluation based on different generations which is briefed below: 0th Generation (1940 – early 1950s) The term 0th generation is used to refer to the period of development of computing when Charles Babbage invented the Analytical Engine and later John Atanasoff created a computer in 1940. The hardware component technology of this period was electronic vacuum tubes. There was no Operating System available for this generation computer and computer programs were written in machine language. This computers in this generation were inefficient and dependent on the varying competencies of the individual programmer as operators. First Generation (1951-1956) The first generation marked the beginning of commercial computing including the introduction of Eckert and Mauchly’s UNIVAC I in early 1951, and a bit later, the IBM 701. System operation was performed with the help of expert operators and without the benefit of an operating system for a time though programs began to be written in higher level, procedure-oriented languages, and thus the operator’s routine expanded. Later mono-programmed operating system was developed, which eliminated some of the human intervention in running job and provided programmers with a number of desirable functions. These systems still continued to operate under the control of a human operator who used to follow a number of steps to execute a program. Programming language like FORTRAN was developed by John W. Backus in 1956. Second Generation (1956-1964) The second generation of computer hardware was most notably characterised by transistors replacing vacuum tubes as the hardware component technology. The first operating system GMOS was developed by the IBM computer. GMOS was based on single stream batch processing system, because it collects all similar jobs in groups or batches and then submits the jobs to the operating system using a punch card to complete all jobs in a machine. Operating system is cleaned after completing one job and then continues to read and initiates the next job in punch card. Researchers began to experiment with multiprogramming and multiprocessing in their computing services called the time-sharing system. A noteworthy example is the Compatible Time Sharing System (CTSS), developed at MIT during the early 1960s. Third Generation (1964-1979) The third generation officially began in April 1964 with IBM’s announcement of its System/360 family of computers. Hardware technology began to use integrated circuits (ICs) which yielded significant advantages in both speed and economy. Operating system development continued with the introduction and widespread adoption of multiprogramming. The idea of taking fuller advantage of the computer’s data channel I/O capabilities continued to develop. Another progress which leads to developing of personal computers in fourth generation is a new development of minicomputers with DEC PDP-1. The third generation was an exciting time, indeed, for the development of both computer hardware and the accompanying operating system. Fourth Generation (1979 – Present) The fourth generation is characterised by the appearance of the personal computer and the workstation. The component technology of the third generation, was replaced by very large scale integration (VLSI). Many Operating Systems which we are using today like Windows, Linux, MacOS etc developed in the fourth generation. Operating System Types Yearwise Evolution Operating Systems evolved over time from almost no OS to AI Powered one. Following list shows the evolution of Operating Systems over time with technological advancements. Batch Processing Systems − These systems were popular From 1940s to 1950s. The users of a batch operating system did not interact with the computer directly. Each user prepared his job on an off-line device like punch cards and submited it to the computer operator who then batched the similar jobs together to speed up processing and run as a group. The programmers left their programs with the operator and the operator then sorted the programs with similar requirements into batches. In such systems, CPU usage was very low and it was difficult to prioritize jobs over one another. Multiprogramming Systems − These operating systems emerged from 1950s to 1960s and revolutionalized the computer arena. Now a user could load multile programs

OS – Linux

Operating System – Linux ”; Previous Next Linux is one of popular version of UNIX operating System. It is open source as its source code is freely available. It is free to use. Linux was designed considering UNIX compatibility. Its functionality list is quite similar to that of UNIX. Components of Linux System Linux Operating System has primarily three components Kernel − Kernel is the core part of Linux. It is responsible for all major activities of this operating system. It consists of various modules and it interacts directly with the underlying hardware. Kernel provides the required abstraction to hide low level hardware details to system or application programs. System Library − System libraries are special functions or programs using which application programs or system utilities accesses Kernel”s features. These libraries implement most of the functionalities of the operating system and do not requires kernel module”s code access rights. System Utility − System Utility programs are responsible to do specialized, individual level tasks. Kernel Mode vs User Mode Kernel component code executes in a special privileged mode called kernel mode with full access to all resources of the computer. This code represents a single process, executes in single address space and do not require any context switch and hence is very efficient and fast. Kernel runs each processes and provides system services to processes, provides protected access to hardware to processes. Support code which is not required to run in kernel mode is in System Library. User programs and other system programs works in User Mode which has no access to system hardware and kernel code. User programs/ utilities use System libraries to access Kernel functions to get system”s low level tasks. Basic Features Following are some of the important features of Linux Operating System. Portable − Portability means software can works on different types of hardware in same way. Linux kernel and application programs supports their installation on any kind of hardware platform. Open Source − Linux source code is freely available and it is community based development project. Multiple teams work in collaboration to enhance the capability of Linux operating system and it is continuously evolving. Multi-User − Linux is a multiuser system means multiple users can access system resources like memory/ ram/ application programs at same time. Multiprogramming − Linux is a multiprogramming system means multiple applications can run at same time. Hierarchical File System − Linux provides a standard file structure in which system files/ user files are arranged. Shell − Linux provides a special interpreter program which can be used to execute commands of the operating system. It can be used to do various types of operations, call application programs. etc. Security − Linux provides user security using authentication features like password protection/ controlled access to specific files/ encryption of data. Architecture The following illustration shows the architecture of a Linux system − The architecture of a Linux System consists of the following layers − Hardware layer − Hardware consists of all peripheral devices (RAM/ HDD/ CPU etc). Kernel − It is the core component of Operating System, interacts directly with hardware, provides low level services to upper layer components. Shell − An interface to kernel, hiding complexity of kernel”s functions from users. The shell takes commands from the user and executes kernel”s functions. Utilities − Utility programs that provide the user most of the functionalities of an operating systems. Print Page Previous Next Advertisements ”;

OS – Architecture

Operating System – Architecture ”; Previous Next An operating system allows the user application programs to interact with the system hardware. Since the operating system is such a complex structure, its architecture plays an important role in its usage. Each component of the Operating System Architecture should be well defined with clear inputs, outputs and functions. Import Terms In operating system Architecture, we”ve two major terms which defines the major components of the operating systems. Kernal − Kernal is the central component of an operating system architecture in most of the implementation. A kernal is responsible for all major operations and interaction with the hardware. A kernal manages memory, processor, input/output devices and provides interface to application programs to interact with hardware components. Shell − Shell is an interface of an operating system. It can be command line interface or a graphical user interface. User interacts with an operating system using shell. Application programs can also use shell interface to interact with underlying operating system. System Softwares − System softwares are the programs which interact with Kernal and provides interface for security managment, memory management and other low level activities. Application Programs − Application softwares/Programs are the one using which a user interacts with the operating system. For example a word processor to create a document and save it on the file system, a notepad to create notes etc. Popular Architectures Following are various popular implementations of Operating System architectures. Simple Architecture Monolith Architecture Micro-Kernel Architecture Exo-Kernel Architecture Layered Architecture Modular Architecture Virtual Machine Architecture Simple Architecture There are many operating systems that have a rather simple structure. These started as small systems and rapidly expanded much further than their scope. A common example of this is MS-DOS. It was designed simply for a niche amount for people. There was no indication that it would become so popular. Few operating systems have a simple yet powerful architecture, for example, MS-DOS. That would lead to greater control over the computer system and its various applications. The simple architecture allows the programmers to hide information as required and implement internal routines as they see fit without changing the outer specifications. Advantages Following are advantages of a simple operating system architecture. Easy Development – In simple operation system, being very few interfaces, development is easy especially when only limited functionalities are to be delivered. Better Performance – Such a sytem, as have few layers and directly interects with hardware, can provide a better performance as compared to other types of operating systems. Disadvantages Following are disadvantages of a simple operating system architecture. Frequent System Failures – Being poorly designed, such a system is not robust. If one program fails, entires operating system crashses. Thus system failures are quiet frequent in simple operating systems. Poor Maintainability – As all layers of operating systems are tightly coupled, change in one layer can impact other layers heavily and making code unmanageable over a period of time. Monolith Architecture In monolith architecture operating system, a central piece of code called kernel is responsible for all major operations of an operating system. Such operations includes file management, memory management, device management and so on. The kernal is the main component of an operating system and it provides all the services of an operating system to the application programs and system programs. The kernel has access to the all the resources and it acts as an interface with application programs and the underlying hardware. A monolithic kernel architecture promotes timesharing, multiprogramming model and was used in old banking systems. Advantages Following are advantages of a monolith operating system architecture. Easy Development – As kernel is the only layer to develop with all major functionalities, it is easier to design and develop. Performance – As Kernel is responsible for memory management, other operations and have direct access to the hardware, it performs better. Disadvantages Following are disadvantages of a monolith operating system architecture. Crash Prone – As Kernel is responsible for all functions, if one function fails entire operating system fails. Difficult to enhance – It is very difficult to add a new service without impacting other services of a monolith operating system. Micro-Kernel Architecture As in case monolith architecture, there was single kernel, in micro-kernel, we have multiple kernels each one specilized in particular service. Each microkernel is developed independent to the other one and makes system more stable. If one kernel fails the operating sytem will keep working with other kernel”s functionalities. Advantages Following are advantages of a microkernel operating system architecture. Reliable and Stable – As multiple kernels are working simultaneously, chances of failure of operating sytem is very less. If one functionlity is down, operating system can still provide other functionalities using stable kernels. Maintainability – Being small sized kernels, code size is maintainable. One can enhance a microkernel code base without impacting other microkernel code base. Disadvantages Following are disadvantages of a microkernel operating system architecture. Complex to Design – Such a microkernel based architecture is difficult to design. Performance Degradation – Multi kernel, Multi-modular communication may hamper the performance as compared to monolith architecture. Exo-Kernel Architecture Exo-Kernal Architecture operating system was designed and developed at MIT. The aim of this design was to keep Kernel size minimal while allowing the application programs to manage hardware resources directly. The purpose of removing abstraction of operating system for hardware resources was to enable application programmer to write high performance code while exo-kernel handles other operations. Advantages Following are advantages of a exo-kernel operating system architecture. High Performance –

OS – Quick Guide

Operating System – Quick Guide ”; Previous Next Operating System – Overview An Operating System (OS) is an interface between a computer user and computer hardware. An operating system is a software which performs all the basic tasks like file management, memory management, process management, handling input and output, and controlling peripheral devices such as disk drives and printers. Some popular Operating Systems include Linux Operating System, Windows Operating System, VMS, OS/400, AIX, z/OS, etc. Definition An operating system is a program that acts as an interface between the user and the computer hardware and controls the execution of all kinds of programs. Following are some of important functions of an operating System. Memory Management Processor Management Device Management File Management Security Control over system performance Job accounting Error detecting aids Coordination between other software and users Memory Management Memory management refers to management of Primary Memory or Main Memory. Main memory is a large array of words or bytes where each word or byte has its own address. Main memory provides a fast storage that can be accessed directly by the CPU. For a program to be executed, it must in the main memory. An Operating System does the following activities for memory management − Keeps tracks of primary memory, i.e., what part of it are in use by whom, what part are not in use. In multiprogramming, the OS decides which process will get memory when and how much. Allocates the memory when a process requests it to do so. De-allocates the memory when a process no longer needs it or has been terminated. Processor Management In multiprogramming environment, the OS decides which process gets the processor when and for how much time. This function is called process scheduling. An Operating System does the following activities for processor management − Keeps tracks of processor and status of process. The program responsible for this task is known as traffic controller. Allocates the processor (CPU) to a process. De-allocates processor when a process is no longer required. Device Management An Operating System manages device communication via their respective drivers. It does the following activities for device management − Keeps tracks of all devices. Program responsible for this task is known as the I/O controller. Decides which process gets the device when and for how much time. Allocates the device in the efficient way. De-allocates devices. File Management A file system is normally organized into directories for easy navigation and usage. These directories may contain files and other directions. An Operating System does the following activities for file management − Keeps track of information, location, uses, status etc. The collective facilities are often known as file system. Decides who gets the resources. Allocates the resources. De-allocates the resources. Other Important Activities Following are some of the important activities that an Operating System performs − Security − By means of password and similar other techniques, it prevents unauthorized access to programs and data. Control over system performance − Recording delays between request for a service and response from the system. Job accounting − Keeping track of time and resources used by various jobs and users. Error detecting aids − Production of dumps, traces, error messages, and other debugging and error detecting aids. Coordination between other softwares and users − Coordination and assignment of compilers, interpreters, assemblers and other software to the various users of the computer systems. Types of Operating System Operating systems are there from the very first computer generation and they keep evolving with time. In this chapter, we will discuss some of the important types of operating systems which are most commonly used. Batch operating system The users of a batch operating system do not interact with the computer directly. Each user prepares his job on an off-line device like punch cards and submits it to the computer operator. To speed up processing, jobs with similar needs are batched together and run as a group. The programmers leave their programs with the operator and the operator then sorts the programs with similar requirements into batches. The problems with Batch Systems are as follows − Lack of interaction between the user and the job. CPU is often idle, because the speed of the mechanical I/O devices is slower than the CPU. Difficult to provide the desired priority. Time-sharing operating systems Time-sharing is a technique which enables many people, located at various terminals, to use a particular computer system at the same time. Time-sharing or multitasking is a logical extension of multiprogramming. Processor”s time which is shared among multiple users simultaneously is termed as time-sharing. The main difference between Multiprogrammed Batch Systems and Time-Sharing Systems is that in case of Multiprogrammed batch systems, the objective is to maximize processor use, whereas in Time-Sharing Systems, the objective is to minimize response time. Multiple jobs are executed by the CPU by switching between them, but the switches occur so frequently. Thus, the user can receive an immediate response. For example, in a transaction processing, the processor executes each user program in a short burst or quantum of computation. That is, if n users are present, then each user can get a time quantum. When the user submits the command, the response time is in few seconds at most. The operating system uses CPU scheduling and multiprogramming to provide each user with a small portion of a time. Computer systems that were designed primarily as batch systems have been modified to time-sharing systems. Advantages of Timesharing operating systems are as follows − Provides the advantage of quick response. Avoids duplication of software. Reduces CPU idle time. Disadvantages of Time-sharing operating systems are as follows − Problem of reliability. Question of security and integrity of user programs and data. Problem of data communication. Distributed operating System Distributed systems use multiple central processors to serve multiple real-time applications and multiple users. Data processing jobs are distributed among the processors accordingly. The processors communicate with one another through various communication lines (such as

OS – Services

Operating System – Services ”; Previous Next An Operating System provides services to both the users and to the programs. It provides programs an environment to execute. It provides users the services to execute the programs in a convenient manner. Following are a few common services provided by an operating system − Program execution I/O operations File System manipulation Communication Error Detection Resource Allocation Protection Program execution Operating systems handle many kinds of activities from user programs to system programs like printer spooler, name servers, file server, etc. Each of these activities is encapsulated as a process. A process includes the complete execution context (code to execute, data to manipulate, registers, OS resources in use). Following are the major activities of an operating system with respect to program management − Loads a program into memory. Executes the program. Handles program”s execution. Provides a mechanism for process synchronization. Provides a mechanism for process communication. Provides a mechanism for deadlock handling. I/O Operation An I/O subsystem comprises of I/O devices and their corresponding driver software. Drivers hide the peculiarities of specific hardware devices from the users. An Operating System manages the communication between user and device drivers. I/O operation means read or write operation with any file or any specific I/O device. Operating system provides the access to the required I/O device when required. File system manipulation A file represents a collection of related information. Computers can store files on the disk (secondary storage), for long-term storage purpose. Examples of storage media include magnetic tape, magnetic disk and optical disk drives like CD, DVD. Each of these media has its own properties like speed, capacity, data transfer rate and data access methods. A file system is normally organized into directories for easy navigation and usage. These directories may contain files and other directions. Following are the major activities of an operating system with respect to file management − Program needs to read a file or write a file. The operating system gives the permission to the program for operation on file. Permission varies from read-only, read-write, denied and so on. Operating System provides an interface to the user to create/delete files. Operating System provides an interface to the user to create/delete directories. Operating System provides an interface to create the backup of file system. Communication In case of distributed systems which are a collection of processors that do not share memory, peripheral devices, or a clock, the operating system manages communications between all the processes. Multiple processes communicate with one another through communication lines in the network. The OS handles routing and connection strategies, and the problems of contention and security. Following are the major activities of an operating system with respect to communication − Two processes often require data to be transferred between them Both the processes can be on one computer or on different computers, but are connected through a computer network. Communication may be implemented by two methods, either by Shared Memory or by Message Passing. Error handling Errors can occur anytime and anywhere. An error may occur in CPU, in I/O devices or in the memory hardware. Following are the major activities of an operating system with respect to error handling − The OS constantly checks for possible errors. The OS takes an appropriate action to ensure correct and consistent computing. Resource Management In case of multi-user or multi-tasking environment, resources such as main memory, CPU cycles and files storage are to be allocated to each user or job. Following are the major activities of an operating system with respect to resource management − The OS manages all kinds of resources using schedulers. CPU scheduling algorithms are used for better utilization of CPU. Protection Considering a computer system having multiple users and concurrent execution of multiple processes, the various processes must be protected from each other”s activities. Protection refers to a mechanism or a way to control the access of programs, processes, or users to the resources defined by a computer system. Following are the major activities of an operating system with respect to protection − The OS ensures that all access to system resources is controlled. The OS ensures that external I/O devices are protected from invalid access attempts. The OS provides authentication features for each user by means of passwords. Print Page Previous Next Advertisements ”;

OS – I/O Hardware

Operating System – I/O Hardware ”; Previous Next One of the important jobs of an Operating System is to manage various I/O devices including mouse, keyboards, touch pad, disk drives, display adapters, USB devices, Bit-mapped screen, LED, Analog-to-digital converter, On/off switch, network connections, audio I/O, printers etc. An I/O system is required to take an application I/O request and send it to the physical device, then take whatever response comes back from the device and send it to the application. I/O devices can be divided into two categories − Block devices − A block device is one with which the driver communicates by sending entire blocks of data. For example, Hard disks, USB cameras, Disk-On-Key etc. Character devices − A character device is one with which the driver communicates by sending and receiving single characters (bytes, octets). For example, serial ports, parallel ports, sounds cards etc Device Controllers Device drivers are software modules that can be plugged into an OS to handle a particular device. Operating System takes help from device drivers to handle all I/O devices. The Device Controller works like an interface between a device and a device driver. I/O units (Keyboard, mouse, printer, etc.) typically consist of a mechanical component and an electronic component where electronic component is called the device controller. There is always a device controller and a device driver for each device to communicate with the Operating Systems. A device controller may be able to handle multiple devices. As an interface its main task is to convert serial bit stream to block of bytes, perform error correction as necessary. Any device connected to the computer is connected by a plug and socket, and the socket is connected to a device controller. Following is a model for connecting the CPU, memory, controllers, and I/O devices where CPU and device controllers all use a common bus for communication. Synchronous vs asynchronous I/O Synchronous I/O − In this scheme CPU execution waits while I/O proceeds Asynchronous I/O − I/O proceeds concurrently with CPU execution Communication to I/O Devices The CPU must have a way to pass information to and from an I/O device. There are three approaches available to communicate with the CPU and Device. Special Instruction I/O Memory-mapped I/O Direct memory access (DMA) Special Instruction I/O This uses CPU instructions that are specifically made for controlling I/O devices. These instructions typically allow data to be sent to an I/O device or read from an I/O device. Memory-mapped I/O When using memory-mapped I/O, the same address space is shared by memory and I/O devices. The device is connected directly to certain main memory locations so that I/O device can transfer block of data to/from memory without going through CPU. While using memory mapped IO, OS allocates buffer in memory and informs I/O device to use that buffer to send data to the CPU. I/O device operates asynchronously with CPU, interrupts CPU when finished. The advantage to this method is that every instruction which can access memory can be used to manipulate an I/O device. Memory mapped IO is used for most high-speed I/O devices like disks, communication interfaces. Direct Memory Access (DMA) Slow devices like keyboards will generate an interrupt to the main CPU after each byte is transferred. If a fast device such as a disk generated an interrupt for each byte, the operating system would spend most of its time handling these interrupts. So a typical computer uses direct memory access (DMA) hardware to reduce this overhead. Direct Memory Access (DMA) means CPU grants I/O module authority to read from or write to memory without involvement. DMA module itself controls exchange of data between main memory and the I/O device. CPU is only involved at the beginning and end of the transfer and interrupted only after entire block has been transferred. Direct Memory Access needs a special hardware called DMA controller (DMAC) that manages the data transfers and arbitrates access to the system bus. The controllers are programmed with source and destination pointers (where to read/write the data), counters to track the number of transferred bytes, and settings, which includes I/O and memory types, interrupts and states for the CPU cycles. The operating system uses the DMA hardware as follows − Step Description 1 Device driver is instructed to transfer disk data to a buffer address X. 2 Device driver then instruct disk controller to transfer data to buffer. 3 Disk controller starts DMA transfer. 4 Disk controller sends each byte to DMA controller. 5 DMA controller transfers bytes to buffer, increases the memory address, decreases the counter C until C becomes zero. 6 When C becomes zero, DMA interrupts CPU to signal transfer completion. Polling vs Interrupts I/O A computer must have a way of detecting the arrival of any type of input. There are two ways that this can happen, known as polling and interrupts. Both of these techniques allow the processor to deal with events that can happen at any time and that are not related to the process it is currently running. Polling I/O Polling is the simplest way for an I/O device to communicate with the processor. The process of periodically checking status of the device to see if it is time for the next I/O operation, is called polling. The I/O device simply puts the information in a Status register, and the processor must come and get the information. Most of the time, devices will not require attention and when one does it will have to wait until it is next interrogated by the polling program. This is an inefficient method and much of the processors time is wasted on unnecessary polls. Compare this method to a teacher continually asking every student in a class, one after another, if they need help. Obviously the more efficient method would be for a student to inform the teacher whenever they require assistance. Interrupts I/O An alternative scheme for dealing with I/O is the interrupt-driven method. An interrupt

OS – Structure

Operating System – Structure ”; Previous Next An operating system is a structure that allows the user application programs to interact with the system hardware. Since the operating system is such a complex structure, it should be created with utmost care so it can be used and modified easily. An easy way to do this is to create the operating system in parts. Each of these parts should be well defined with clear inputs, outputs and functions. Following are various popular implementations of Operating System structures. Simple Structure Monolith Structure Micro-Kernel Structure Exo-Kernel Structure Layered Structure Modular Structure Virtual Machines Simple Structure There are many operating systems that have a rather simple structure. These started as small systems and rapidly expanded much further than their scope. A common example of this is MS-DOS. It was designed simply for a niche amount for people. There was no indication that it would become so popular. It is better that operating systems have a modular structure, unlike MS-DOS. That would lead to greater control over the computer system and its various applications. The modular structure would also allow the programmers to hide information as required and implement internal routines as they see fit without changing the outer specifications. Advantages Following are advantages of a simple operating system structure. Easy Development – In simple operation system, being very few interfaces, development is easy especially when only limited functionalities are to be delivered. Better Performance – Such a sytem, as have few layers and directly interects with hardware, can provide a better performance as compared to other types of operating systems. Disadvantages Following are disadvantages of a simple operating system structure. Frequent System Failures – Being poorly designed, such a system is not robust. If one program fails, entires operating system crashses. Thus system failures are quiet frequent in simple operating systems. Poor Maintainability – As all layers of operating systems are tightly coupled, change in one layer can impact other layers heavily and making code unmanageable over a period of time. Monolith Structure In monolith structured operating system, a central piece of code called kernel is responsible for all major operations of an operating system. Such operations includes file management, memory management, device management and so on. The kernal is the main component of an operating system and it provides all the services of an operating system to the application programs and system programs. The kernel has access to the all the resources and it acts as an interface with application programs and the underlying hardware. A monolithic kernel structure promotes timesharing, multiprogramming model and was used in old banking systems. Advantages Following are advantages of a monolith operating system structure. Easy Development – As kernel is the only layer to develop with all major functionalities, it is easier to design and develop. Performance – As Kernel is responsible for memory management, other operations and have direct access to the hardware, it performs better. Disadvantages Following are disadvantages of a monolith operating system structure. Crash Prone – As Kernel is responsible for all functions, if one function fails entire operating system fails. Difficult to enhance – It is very difficult to add a new service without impacting other services of a monolith operating system. Micro-Kernel Structure As in case monolith structure, there was single kernel, in micro-kernel, we have multiple kernels each one specilized in particular service. Each microkernel is developed independent to the other one and makes system more stable. If one kernel fails the operating sytem will keep working with other kernel”s functionalities. Advantages Following are advantages of a microkernel operating system structure. Reliable and Stable – As multiple kernels are working simultaneously, chances of failure of operating sytem is very less. If one functionlity is down, operating system can still provide other functionalities using stable kernels. Maintainability – Being small sized kernels, code size is maintainable. One can enhance a microkernel code base without impacting other microkernel code base. Disadvantages Following are disadvantages of a microkernel operating system structure. Complex to Design – Such a microkernel based architecture is difficult to design. Performance Degradation – Multi kernel, Multi-modular communication may hamper the performance as compared to monolith architecture. Exo-Kernel Structure Exo-Kernal Structured operating system was designed and developed at MIT. The aim of this design was to keep Kernel size minimal while allowing the application programs to manage hardware resources directly. The purpose of removing abstraction of operating system for hardware resources was to enable application programmer to write high performance code while exo-kernel handles other operations. Advantages Following are advantages of a exo-kernel operating system structure. High Performance – As application program can allocate memory, a better designed code can make optimal use and perform better. Application Control – As resource management is not secured by operating system, application program has more control over system resources and can write custom operations on system resources. Disadvantages Following are disadvantages of a exo-kernel operating system structure. Unreliable and Unsafe – As security is in application program level, a poorly written code can ruin the system. Complex Design – Exo-Kernel designing is complicated. Layered Structure One way to achieve modularity in the operating system is the layered approach. In this, the bottom layer is the hardware and the topmost layer is the user interface. An image demonstrating the layered approach is as follows − As seen from the image, each upper layer is built on the bottom layer. All the layers hide some structures, operations etc from their upper layers.