Computer operating systems
A computer operating system (OS) is essential software that manages a computer's hardware and software resources, ensuring that users and applications can operate smoothly and efficiently. When a computer is turned on, the operating system takes control, coordinating various processes and facilitating communication between the hardware and input/output devices, such as keyboards, monitors, and printers. In single-user systems, the operating system allows one user to interact with the computer, while in multiuser environments, it manages multiple users and their processes simultaneously.
The OS contains a core component known as the kernel, which oversees the central processing unit (CPU) and memory allocations, allowing multiple programs to share resources through a time-sharing mechanism. Moreover, operating systems implement security measures to protect files and memory integrity from unauthorized access, especially in multiuser settings. They also support advanced features such as multitasking, where users can run multiple applications concurrently, and virtual memory, which extends the system's memory capacity using disk space.
User interfaces have evolved significantly, with modern systems often providing graphical user interfaces (GUIs) that enhance user experience. Understanding operating systems is crucial for optimizing performance and resolving errors, making them foundational to computer science and everyday computing tasks.
Computer operating systems
Type of physical science: Computation
Field of study: Computers
A computer operating system is a collection of interrelated programs that determines the general behavior of a computer. By coordinating all the processes and hardware of the computer, it provides a consistent and supportive environment for the users, files, and applications programs.
![Samuel Sulcer building a computer 5 screenshot of Ubuntu operating system working. Samuel Sulcer built a computer from parts of the Internet. He installed the Ubuntu Linux operating system. This is a photo of the screen after the computer was built with the operating system installed and working. By Tomwsulcer (Own work) [CC0], via Wikimedia Commons 89316935-89341.jpg](https://imageserver.ebscohost.com/img/embimages/ers/sp/embedded/89316935-89341.jpg?ephost1=dGJyMNHX8kSepq84xNvgOLCmsE2epq5Srqa4SK6WxWXS)
![Educator64. A Commodore Educator 64 computer (also sold as the PET 64 and Model 4064) - a microcomputer made by Commodore Business Machines in 1983. Marcin Wichary [CC-BY-2.0 (http://creativecommons.org/licenses/by/2.0)], via Wikimedia Commons 89316935-89342.jpg](https://imageserver.ebscohost.com/img/embimages/ers/sp/embedded/89316935-89342.jpg?ephost1=dGJyMNHX8kSepq84xNvgOLCmsE2epq5Srqa4SK6WxWXS)
Overview
A computer operating system is the software that regulates all activities on a computer.
From the moment a computer is activated, the operating system takes control, coordinating all the resources available while permitting both users and applications programs to share them, providing a stable operational environment.
The operating system directs the communication between the computer and several input/output devices. In a single-user system, those devices include a keyboard for input, a monitor for immediate output, a printer for hard-copy output (paper documentation), and disks or diskettes for the permanent storage of files. In a multiuser computer environment, the system would include several terminals. In a networked environment, the operating system allows the computer to communicate with other computers in order to share files, computing power, or other resources by means of communications devices called network cards and modems.
The operating system receives the information as it arrives from these devices and makes these data available to the appropriate applications programs. For each type of device, the operating system has a device driver, which is a program that interprets communications codes for that specific device, passes the data between the applications program and that device, and gives commands to the device. For example, the keyboard device driver receives data from a keyboard and passes it to a text-editing program that processes that data in order to modify a file.
The text editor would then make a request for the disk device driver to give commands to the disk system that tell it to modify that data on the disk at a specific position in the file.
Although device drivers can be added and removed from computer memory according to the computer's configuration, the core of the operating system (called the kernel) must reside in memory. It closely supervises the central processing unit (CPU), memory, and disk operations.
When a computer is activated, a program called a loader will copy to memory the kernel and all required device drivers from a specific disk called the system residence device, and then pass control to the kernel.
The kernel determines which program runs on the CPU and how long it will run. Since many programs may request the usage of CPU simultaneously, the kernel permits each program to run for a short time (called a time slice). When that time slice ends, the kernel suspends that program and starts the next program's time slice. In this manner, many programs (and users) can share the usage of one CPU. This process of one program being suspended, the kernel resuming control, and then control being passed to another program is called an interrupt. Often, these interrupts are triggered when devices request service. For example, while a user is typing data with a text-editing program, a printer may request more data to print from a file. The kernel suspends the text editor and lets the printer's device driver control the CPU. The printer device driver passes more data to the printer, returns control to the kernel, and the kernel returns control to the text-editing program. All this occurs instantly and without the user's knowledge.
A multiuser or multitasking operating system keeps records on a process table of all programs running on the computer. When a program begins execution, the operating system creates an environment for it by allocating memory, loading it from disk, creating an entry for it on the process table, and establishing links to files and device drivers. Each executing program has a priority. High-priority programs will receive more or longer time slices and will therefore execute more quickly than low-priority programs. When a program completes execution, the operating system must de-allocate all resources used by it, break links, close files, and perform other clean-up activities.
Since the operating system permits many programs to coexist in memory, it should protect programs from interfering with or destroying one another. In memory, programs should not read or write data outside their allocated memory space or to unauthorized devices.
Likewise, the operating system must also preserve the integrity and security of files on disk. It must protect files from being corrupted by extraneous data. In a multiuser operating system, it keeps unauthorized users from reading or damaging files. When files are damaged, the operating system provides utility programs that will repair them. Some operating systems provide partial recovery facilities from sudden power losses. On single-user systems, security and recovery facilities are often minimal. On complex multiuser computers, security can be quite complex, with categories of users. Each file is tagged with several access permissions, which the operating system checks prior to access by any category of user. Some operating systems even permit passwords to be required for accessing individual files.
When memory alone is insufficient to support many users or large software packages, many operating systems allow disk space to be used as an extension of memory; this is called virtual memory. Paging is a method of partitioning memory into fixed-size fragments (pages).
When the CPU needs to access data in or execute statements in a page, access or execution occurs if that page is in memory. Otherwise, the operating system must get that page from disk.
The operating system must maintain a table of all pages in memory. If a page is rarely accessed, the operating system will return it to disk when another page is requested. Segmentation is an alternate method of supporting virtual memory that uses fragments of variable size.
Performance is another important issue with operating systems. While disks operate in milliseconds, memory operates in nanoseconds. Given the time operating systems spend in processing interrupts, and the speed difference of disk and memory, most operating systems use buffering, blocked input/output (I/O), and spooling to reduce I/O bottlenecks. In buffering and blocked I/O, large blocks of data are read from or written to disk by the operating system for a single I/O interrupt, significantly reducing disk accesses. The buffer is the region of memory that stores or receives that block of data. Printers are even slower and require spooling. In spooling, data is written to disk instead of directly to the printer. When the program finishes outputting, the printer receives the output from disk in blocks as large as the printer memory can receive.
Spooling has greater impact in multiuser systems, in which many programs request to print simultaneously.
Operating systems also supply programs called utilities, which provide important services. File utilities can delete, copy, and modify files. All operating systems provide text editors. Disk utilities furnish facilities to display file names and make backup copies of the disk on another device. Operating systems often include a compiler for running new programs written by the user. Most operating systems include system utilities such as time-display and system-diagnostics programs.
Another responsibility of the operating system is job submission. Many early multiuser operating systems provided for the execution of programs without any interaction by the user during execution, which is called batch-mode processing. The user had to specify, in a specialized language called job-control language, which files and the conditions under which the programs would execute. When the program was submitted for execution by the user, the operating system put that program on a waiting list called a job queue. The program would execute as an autonomous entity, without any influence from the user except an occasional cancellation. When the program completed execution, the output was viewed as a file.
In most modern operating systems, the operating system can run programs directly on the user screen. In this mode (called interactive processing), the user has control over the execution and can add input dynamically. This is the trend of most single-user operating systems.
Many operating systems also allow for multitasking, in which several programs are run by one user, some on the screen and others internally (in the background).
In some single-user operating systems without multitasking, because of weak security over memory, programs can be loaded into memory and left there by the user. Those programs (called TSRs, an abbreviation for "terminate and stay resident") remain dormant until the user activates them by striking keys in a certain sequence. The TSR will then execute while the present applications program is still active.
With the widespread use of operating systems, their user interfaces have changed. A single operating system may offer several possible user interfaces. Most older systems offered only a single character-mode interface, one with only αbetical, numerical, and a few other assorted symbols. Each command was typed in its entirety, with many options possible on command lines. As user friendliness became an issue, menu-driven systems were devised in which the user was always presented with a menu of specific options. Graphical user interfaces (GUIs) treat the user screen as a canvas for any sort of graphic image as well as for text. With GUIs, an operation such as deleting a report would involve linking the name of a file to an image of a trash can, requiring only a few hand motions with an input device called a mouse.
Applications
Operating-system concepts permeate all aspects of computer usage. Understanding the mechanics of operating systems can lead to enhancements in system performance, strategic system expansion, and resolution of error conditions.
The use of blocked I/O in the design and use of software can dramatically improve performance (often by orders of magnitude). In processing large masses of data, the blocking of I/O can reduce the bottlenecks that occur when CPUs wait for mechanical disk-drive motions.
On a single-user interactive system, one user can wait ten minutes for a program to complete I/O while another using blocked I/O with ten times the block size will wait one to three minutes.
In implementing a computer system, using the right device drivers can improve both performance and capabilities. One class of device drivers will treat a portion of memory like a disk. Termed a ramdisk, this driver operates at memory speeds. Every time data is sent to this illusory disk, the interrupt signals the kernel, which then passes control to the ramdisk device driver, which writes the data to that portion of memory. A similar principle is used in disk caching, the process of causing portions of memory to behave as an intermediary between program and disk. Both methods can easily reduce time by more than a factor of ten. In the configuration of a network of computers, these methods are extremely important.
The implementation of esoteric scientific measurement devices as extensions of a computer may require the installation of new device drivers. Whether connecting a new disk drive, using special graphics boards in modes supporting high-resolution imaging, or adding custom-designed observation equipment, the addition and modification of device drivers enbles the incorporation of state-of-the-art and unconventional peripherals in computer systems.
Multitasking and TSRs raise user productivity. TSRs allow users to access several tools at once (such as thesauruses, dictionaries, calculator programs, and file viewers during a text-editing session). Multitasking reduces the length of a computer session. Running activities such as printing, file transfer via telephone lines, and long numerical computations unattended in the background frees the user's attention, which then can be devoted to other screen-dependent activities. Utiltizing and optimizing multitasking features requires careful setup and an intimate knowledge of the specific operating system's behavior and organization.
TSRs and operating systems have an important role in connection with computer viruses, their duplication and detection, and defensive measures against them. A computer virus is a program that makes copies of itself to several files or disks without the consent or notification of the user and often initiates destructive actions. Some viruses copy themselves to memory as TSRs, hiding in the memory and copying themselves to disk periodically thereafter.
Since operating system software occurs on all computers and is used the most, it is often the target for viral infection. Using the specifics of the operating systems' disk organization, viruses can hide in regions of a disk that are not easily viewable. One viral detection method involves detecting TSRs and keeping track of memory usage. One type of defense entails using software to catch any disk writes or interrupts.
Most computer hardware can support one of many possible operating systems.
Choosing the correct one depends upon several factors. In performance and power, the operating system should support enhanced features of disk operations, paging, relocatable code support, and full utilization of hardware capabilities. If an operating system does not support fast disk technologies and no add-on device driver is available, another operating system should be considered. Multitasking, ease of use by multiple users, and the protection of files are other decision criteria.
Some computers can have multiple independent operating systems concurrently, and some operating systems support the running of a subordinate operating system in a protected environment (in memory) and in a window (on screen). Dual operating systems provide the commands and capabilities of both systems simultaneously; the investment in software for an older operating system and the experience developed with it will be retained while the power of a newer one is gained. A second environment may offer a better GUI. One operating system may also offer choices in GUIs.
Context
In the 1940's, the earliest computers ran without operating systems. In the 1950's, single-tasking operating systems with job queues were introduced. Support for many programs running concurrently in memory was incorporated in the 1960's, resulting in less idle time on those expensive primitive processors. Punched-card readers were the prevalent input technology for programs. Tape drives were used for backup. Job submission (on punched cards) had a turnaround time of many hours for the output from a printer. Eventually, as CPU, storage, and I/O technology progressed on mainframes and minicomputers, operating systems supported terminals, multiple on-line users with files on disk, and faster program execution.
Early operating systems were error-prone masses of low-level program coding. At the Massachusetts Institute of Technology (MIT), MULTICS, the first operating system written in a high-level language, was developed in the 1960's. Many operating systems, however, still were designed with low-level coding and armies of programmers. International Business Machines (IBM) created OS/360 and VM, its mainframe operating systems, which evolved into all of its future mainframes. At Bell Laboratories, in the early 1970's, a powerful, high-level operating system called UNIX was constructed. Because of its portability, support for advanced hardware, and growing acceptance (especially in the academic and, later, governmental institutions), UNIX spread rapidly and is now available for almost every type of computer system.
In the 1970's, many primitive single-user proprietary microcomputers and their operating systems were developed. Eventually, CP/M became the operating system of choice for microcomputers. In the 1980's, microcomputer diversity was reduced to three major standards (Apple PCs with Apple DOS, IBM PCs with MS-DOS, and MACs with MAC-OS). The prevalence of MACs and IBM PCs has led to more advanced proprietary operating systems with multitasking being devised for these two. UNIX, however, has been available for both and also for another class of advanced personal computers called workstations. UNIX has been ported to most computer architectures. Although proprietary operating systems are still in use, the enormous cost inherent in constructing new ones makes projects that use them rare.
Networking, a growing trend, is often supported by proprietary and incompatibility-prone software; UNIX's networking support can meet the constraints of connectivity and has established standards.
The theory of concurrent processes is complex; many problems in theory and implementation still exist. Operating systems that fully utilize multiple CPUs and large-scale parallelism are still largely experimental or rudimentary, unlike mathematical and graphics coprocessors, which are both easy to incorporate and widespread.
UNIX (or some future descendant) is expected to be the operating system standard that will survive, because of its portability, multitude of platforms, support, and power, and because it has been debugged in the course of much usage. UNIX's design concepts occur in most other recent operating systems design. GUIs for UNIX still constitute too rapidly changing an area to invite predictions. UNIX has become a standard, especially across recent RISC and multiuser computer platforms, in many disciplines, including engineering and scientific workstations.
Principal terms
APPLICATIONS PROGRAM: a program dedicated for usage by specific disciplines or users
CPU (CENTRAL PROCESSING UNIT): the chips and circuitry in a computer that carry out the instructions specified by a program in memory
DISK: a device for storing data after a program completes execution; using magnetic surfaces, disks retain data after a computer powers down
FILE: a collection of text or data that should be kept as an integral, separate entity
MEMORY: high-speed computer storage that makes available executing programs and their data for immediate processing by the CPU
Bibliography
Bic, Lubomir, and A. C. Shaw. LOGICAL DESIGN OF OPERATING SYSTEMS. Englewood Cliffs, N.J.: Prentice-Hall, 1988. Operating system principles are combined with the reasoning and development of ideas involved in the design process. This book is an extensive and successful revision of a classic from the first generation of operating system textbooks.
Capron, H. L. COMPUTERS: TOOLS FOR AN INFORMATION AGE. Menlo Park, Calif.: Benjamin/Cummings, 1987. This computer-literacy textbook gives a reasonable presentation of operating systems, and does so more comprehensively than any other similar textbook. The concepts are well developed and extensively illustrated with photographs and diagrams. No computer background is assumed.
Davis, William S. OPERATING SYSTEMS: A SYSTEMATIC VIEW. Reading, Mass.: Addison-Wesley, 1987. An extremely practical textbook on the concepts of operating systems and their implementation in actual systems. The focus is on applied operating systems and concrete examples of the principles. Topics are developed as they pertain to real environments, specifically MS-DOS, UNIX, VM/SP, DOS/VSE, OS/MVS, and OS/VS. Most illustrations are from IBM mainframe systems.
Deitel, Harvey M. AN INTRODUCTION TO OPERATING SYSTEMS. Reading, Mass.: Addison-Wesley, 1990. As a modern presentation of operating system concepts and practices, this text is excellent. Chapters on UNIX, MS-DOS, MVS, VM, MAC-OS, and OS/2 associate the theory with relevant examples.
Mandell, Steven L. COMPUTERS AND INFORMATION PROCESSING. St. Paul, Minn.: West, 1987. This computer-literacy text provides readable introductory material on operating systems. No prior experience is required.
Morgan, Rachel, and H. McGilton. INTRODUCING THE UNIX SYSTEM. New York: McGraw-Hill, 1986. This is an excellent introduction to UNIX. The presentation is introductory yet complete in coverage of UNIX concepts and commands. Learning about UNIX should be augmented with actual practice on a UNIX system; text alone has few benefits.
Norton, Peter. PC-DOS: INTRODUCTION TO HIGH PERFORMANCE COMPUTING. New York: Brady, 1985. Dated though highly readable introduction to PC-DOS (MS-DOS for the IBM PC). Note that the ubiquitous hordes of MS-DOS and MAC-OS tutorials, introductory guides, and user references have saturated most bookstores. Most of them are clones, rewrites of manuals, and how-to guides rather than readable texts. This is one of the few exceptions.
Peterson, James L., and Abraham Silberschatz. OPERATING SYSTEM CONCEPTS. 2d ed. Reading, Mass.: Addison-Wesley, 1985. The general theory and concepts of operating systems are thoroughly covered in this concise and clear text. As the authors state, operating system textbooks prior to 1980 are of the first generation and hence describe a discipline in transition.
Sobell, Mark G. A PRACTICAL GUIDE TO THE UNIX SYSTEM. Reading, Mass.: Addison-Wesley, 1989. A readable comprehensive guide to UNIX (both Berkeley and System V versions). The reader should be warned that UNIX is rapidly changing as two major consortia (UNIX International and Open Software Foundation) define new standards.
Basic computer architecture
Computer Programs and Subroutines