An operating system (OS) is system software that allows users, applications, and hardware to interact and communicate. It serves as an intermediary between users and computer hardware. The main functions of an OS include managing system resources like memory and processors, running processes, handling input/output, and providing security and storage management. Early computers lacked OSes, while modern OSes allow for multiprocessing, multitasking, and real-time applications. Common types include batch, multiprogramming, multitasking, and real-time OSes.
An operating system (OS) is system software that allows users, applications, and hardware to interact and communicate. It serves as an intermediary between users and computer hardware. The main functions of an OS include managing system resources like memory and processors, running processes, handling input/output, and providing security and storage management. Early computers lacked OSes, while modern OSes allow for multiprocessing, multitasking, and real-time applications. Common types include batch, multiprogramming, multitasking, and real-time OSes.
An operating system (OS) is system software that allows users, applications, and hardware to interact and communicate. It serves as an intermediary between users and computer hardware. The main functions of an OS include managing system resources like memory and processors, running processes, handling input/output, and providing security and storage management. Early computers lacked OSes, while modern OSes allow for multiprocessing, multitasking, and real-time applications. Common types include batch, multiprogramming, multitasking, and real-time OSes.
An operating system (OS) is system software that allows users, applications, and hardware to interact and communicate. It serves as an intermediary between users and computer hardware. The main functions of an OS include managing system resources like memory and processors, running processes, handling input/output, and providing security and storage management. Early computers lacked OSes, while modern OSes allow for multiprocessing, multitasking, and real-time applications. Common types include batch, multiprogramming, multitasking, and real-time OSes.
CONCEPTS Definition • An operating system (OS) is a system software that allows users; applications and the computer hardware to interact. • It is a link allowing various parts of a computer system to communicate and coordinate with each other. • The goal of the OS is to ensure that the computer system works correctly and efficiently in a manner that is easy to use. Definition (contd) • An OS serves as a basis for application software and acts as an intermediary between the computer user and computer hardware. • Different operating systems in different computing environments would vary in the way they accomplish tasks and so the goals of the computer system usually define how its operating system would be designed. Diagrammatic representation of the various components of a computer system and how they interact • Source: Google Functions of the OS • Resource management: System resources include the CPU, memory, network bandwidth, storage, I/O devices, etc. The are computer components that are available in limited portions. Since they contribute to the computer’s over all performance, they need to be managed such that there will be optimal performance. The OS is responsible for how the computer resources are managed.
• Process management: A process is a program in execution. In a multi-
programming environment, the OS decides the order in which processes have access to the processor, and how much processing time each process has. An operating system manages the CPU’s work by allocating various processes to it and ensuring that each process receives enough time from the processor to function properly. It also keeps track of the status of processes. Additionally, the OS allocates the CPU to a process and de-allocates it when a process is no longer required. • Memory management: The operating system manages the primary or main memory (i.e. the RAM). Main memory is made up of a large array of bytes or words and each byte or word is assigned a certain address. Main memory is fast storage and it can be accessed directly by the CPU. For a program to be executed, it should be first loaded in the main memory. An operating system manages the allocation and deallocation of memory to various processes and ensures that the other process does not consume the memory allocated to one process. To effectivelt manage memory, an OS performs the following activities : It keeps track of primary memory, i.e., which bytes of memory are used by which user program. The memory addresses that have already been allocated and the memory addresses of the memory that has not yet been used. In multiprogramming, the OS decides the order in which processes are granted memory access, and for how long. It Allocates the memory to a process when the process requests it and deallocates the memory when the process has terminated or is performing an I/O operation. • I/O management: In order to carry out this task the OS does the following: keeps track of all devices connected to the system. Designates a program responsible for every device known as the Input/Output controller. decides which process gets access to a certain device and for how long. allocates devices effectively and efficiently; deallocates devices when they are no longer required. there are various input and output devices. An OS controls the working of these input-output devices. receives the requests from these devices, performs a specific task, and communicates back to the requesting process. • Security and protection: The operating system protects user data using password protection and similar other techniques. It prevents unauthorized access to user data and programs and ensures confidentiality and authorization through various means. The operating system also carries out its security function by preventing inter-process interference in system memory while running various processes. • Storage management: The OS handles management of secondary storage media. This includes how to store data on the hard disk and how the user will access them, creation of files and directories, reading and writing data on files an directories and copying file contents from one system location to another. History of operating systems The first digital computer was built by Charles Babbage. He never got it working properly as his ideas did not match with the technology of the time. It did not have an operating system. First Generation Computers • They used vacuum tubes and some were programmable. • In that era, a single group of people (usually engineers) designed, built, programmed, operated and maintained each machine. • Operating systems were unheard of. The usual mode of operation was for programmers to sign up for a block of time using a sign up sheet and get into the machine room. Second generation (Transistors and batch systems) • The machines used transistors and were called mainframes. • Jobs were run on computers. • To run a job, a programmer would write the program on paper, punch it into a punch card and give it to the operator in the input room. There was an input and an output room. • The machines were really expensive and the time spent running programs was not commensurate to the money spent on purchasing them. So the batch system was adopted. • Jobs were batched for about an hour. The cards were read onto a magnetic tape, and a special program was loaded on the system (which is the ancestor of today’s OS). • The OS reads the first job, runs it and writes the output onto a second tape, which holds the batch of output, which is loaded to another computer that prints the output. Third generation computers (ICs and multiprogramming) • Computer manufacturers of that time produced two types of computers. One for scientific purposes and the other for commercial purposes. • The scientific computers did more of calculations and used more of the CPU than I/O time than the commercial computers that did less calculations and had more I/O and less CPU requirements. • IBM eventually merged both functions into one computer and that meant there was need to produce an OS that does multiprogramming. • Previously, CPU sat idle as I/O took place. However, with multiprogramming, while one job was waiting for I/O to complete, another job used the CPU. • With time, time sharing operating systems were also developed. Fourth and fifth generation computers: • In these generations of computers, operating systems as we know them today were developed. They include single use, single tasking operating systems such as MS-DOS, and other multitasking operating systems like Mac and Windows on PCs. • In the fifth generation, mobile computers and personal handheld devices were developed along with their operating systems. Types of operating systems Types of operating systems include but are not limited to the following: • Batch operating systems: This type of OS deals with jobs. Here, there is no direct interaction between the user and the computer system, therefore it is referred to as a non- interactive OS. Jobs having similar requirements are grouped into batches by the OS and processing is done in batches. Batch systems are preferred where there are multiple users and with large work to be done repeatedly.
• Multiprogramming OS: This OS is used for better management of
computer resources, especially the CPU. Here, the OS can execute more than one process using a single processor machine. More than one job is present in memory at a given time. The OS could pick one job in memory and start its execution. Whenever the jobs does not need CPU- probably the job is working with I/O at that time- instead of the CPU to be idle at that time, the OS switches to another job in memory and CPU executes a portion of it till the job issues a request for I/O. This happens until all the available jobs in memory are executed. • Multitasking OS: In multitasking systems, the user can perform more than one computer task simultaneously. Some time quantum is allocated to each process and the processes are placed in a queue based on their arrival time. The processes leave the queue and run for their allocated time quantum. If it completes execution within the time quantum it is terminated, but if not, it is forcefully removed from the CPU and added to the end of the process queue, while the next process is given to the CPU. This makes multitasking operating systems to have such features as time- sharing, context switching, multithreading and hardware interrupt.
• Multiprocessing OS: These operating systems function and boost the
performance of computer systems with multiple processors. Multiple CPUs are linked and made to work together by sharing tasks among them. Multiprocessing environments are more reliable because the failure of one CPU bring a halt to the system. The execution speed is greatly enhanced and system throughput is increased in this environment. • Real-time OS: This is an operating system meant to serve real time applications. They are time- bound; this means that time is of essence in its execution. A real-time OS can be either a soft real-time OS (where processes are expected to be executed within the time bound) or hard real- time OS (where processes are expected to be executed at its exact time). This means that time constraints exist in the real-time OS. They are usually used for medical or scientific purposes. Conclusion In the preceding slides, we have looked at the: • definition of an operating system • functions of an operating system • history of operating systems • types of operating systems