
























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
An introduction to operating systems, including their objectives, components, and functions. It covers topics such as multiprogramming, multitasking, and distributed operating systems. It also discusses the components of operating systems, such as process management, file management, and network management.
Typology: Summaries
1 / 32
This page cannot be seen from the preview
Don't miss anything!
What is an Operating System?
▫ Execute user programs and make solving user problems easier
▫ Make the computer system convenient to use
▫ Use the computer hardware in an efficient manner
Operating System Definition
Objectives of Operating System
The objectives of the operating system are − To make the computer system convenient to use in an efficient manner.
To hide the details of the hardware resources from the users.
To provide users a convenient interface to use the computer system.
To act as an intermediary between the hardware and its users, making it easier for the users to access and use other resources.
Various Evolution of the Operating System
The various evolution of an operating system are given below
Serial Processing:
Early computer from late 1940 to the mid 1950’s. The programmer interacted directly with the computer hardware. These machine are called bare machine as they don't have OS. Every computer system is programmed in its machine language. Uses Punch Card, paper tapes and language translator
These system presented two major problems.
Each of these steps involves the mounting or dismounting tapes on setting up punch cards. If an error occur user had to go the beginning of the set up sequence. Thus, a considerable amount of time is spent in setting up the program to run. This mode of operation is turned as serial processing, reflecting the fact that users access the computer in series.
The Batch System
Early computers were very expensive, and therefore it was important to maximize processor utilization. ● The wasted time due to scheduling and setup time in Serial Processing was unacceptable. ● To improve utilization, the concept of a batch operating system was developed. ● Batch is defined as a group of jobs with similar needs. The operating system allows users to form batches. Computer executes each batch sequentially, processing all jobs of a batch considering them as a single process called batch processing.
The central idea behind the simple batch-processing scheme is: Jobs were scheduled and submitted on cards and tapes. Then sequentially executed on the monitors by using Job Control Language. The first computers are used in the process of the batch operating process made the computer batch of jobs without any pause or stop. The program is written in the punch cards and then copied to the processing unit of the tape. When the computer completed a single job, it instantly begins the next task on the tape. Professional operators are trained to communicate with the machine where the users dropped the jobs and fetched back to pick the results after the job is executed.
Though it is uncomfortable for the users it is made to keep the expensive computer as busy up to the extent by running a leveraged stream of jobs. The protection of memory doesn’t allow the memory area comprises the monitor to altered and the timer protects the job from monopolizing the system. The processor sustains as idle when the input and output devices are in use by the bad utilization of CPU time.
A single program cannot keep either CPU or I/O devices busy at all times. Multiprogramming increases CPU utilization by organizing jobs in such a manner that CPU has always one job to execute. If computer is required to run several programs at the same time, the processor could be kept busy for the most of the time by switching its attention from one program to the next. Additionally I/O transfer could overlap the processor activity i.e, while one program is awaiting for an I/O transfer, another program can use the processor. So CPU never sits idle or if comes in idle state then after a very small time it is again busy. This is illustrated in fig below.
Fig. Multiprogramming example
Multiprogramming didn't provide the user interaction with the computer system. Time sharing or Multitasking is a logical extension of Multiprogramming that provides user interaction.
Reduction of the load on the host computer. Reduction of delays in data processing.
Features of Distributed Operating System
The main goal of a distributed system is to make it easy for users to access remote resources, and to share them with other users in a controlled manner. Resources can be virtually anything; typical examples of resources are printers, storage facilities, data, files, web pages, and networks. There are many reasons for sharing resources. One reason is economics.
An important goal of a distributed system is to hide the fact that its process and resources are physically distributed across multiple computers. A distributed system that is capable of presenting itself to users and applications such that it is only a single computer system is called transparent. The concept of transparency can be applied to many aspects of a distributed system as shown in table.
Different Forms of Transparency
Real Time operating System
A real-time system is defined as a data processing system in which the time interval required to process and respond to inputs is so small that it controls the environment. The time taken by the system to respond
(1) Access Hide data representation. (2) Location Hide location (3) Migration Move place information. (4) Relocation Hide moved place relocation. (5) Replication Hide that a resource is replication. (6) Concurrency Shared data bases access (7) Failure Hide fact about resource failure. (8) Persistence Hide fact about memory location.
Operating system components help you get the correct computing by detecting CPU and memory hardware errors.
The process management component is a procedure for managing many processes running simultaneously on the operating system. Every running software application program has one or more processes associated with them.
For example, when you use a search engine like Chrome, there is a process running for that browser program.
Process management keeps processes running efficiently. It also uses memory allocated to them and shutting them down when needed.
The execution of a process must be sequential so, at least one instruction should be executed on behalf of the process.
Functions of process management
Here are the following functions of process management in the operating system, such as:
o Process creation and deletion.
o Suspension and resumption.
o Synchronization process o Communication process
NOTE: OS facilitates an exchange of information between processes executing on the same or different systems.
A file is a set of related information defined by its creator. It commonly represents programs (both source and object forms) and data. Data files can be alphabetic, numeric, or alphanumeric.
o A distributed system also offers the user access to the various resources the network shares.
o It helps to access shared resources that help computation to speed up or offers data availability and reliability.
Main memory is a large array of storage or bytes, which has an address. The memory management process is conducted by using a sequence of reads or writes of specific memory addresses.
It should be mapped to absolute addresses and loaded inside the memory to execute a program. The selection of a memory management method depends on several factors.
However, it is mainly based on the hardware design of the system. Each algorithm requires corresponding hardware support. Main memory offers fast storage that can be accessed directly by the CPU. It is costly and hence has a lower storage capacity. However, for a program to be executed, it must be in the main memory.
Functions of Memory management
An Operating System performs the following functions for Memory Management in the operating system:
o It helps you to keep track of primary memory.
o Determine what part of it are in use by whom, what part is not in use. o In a multiprogramming system, the OS decides which process will get memory and how much.
o Allocates the memory when a process requests.
o It also de-allocates the memory when a process no longer requires or has been terminated.
The most important task of a computer system is to execute programs. These programs help you to access the data from the main memory during execution. This memory of the computer is very small to store all data and programs permanently. The computer system offers secondary storage to back up the main memory.
Today modern computers use hard drives/SSD as the primary storage of both programs and data. However, the secondary storage management also works with storage devices, such as USB flash drives and CD/DVD drives. Programs like assemblers and compilers are stored on the disk until it is loaded into memory, and then use the disk is used as a source and destination for processing.
Functions of Secondary storage management
Here are some major functions of secondary storage management in the operating system:
o Storage allocation
o Free space management o Disk scheduling
One of the important use of an operating system that helps to hide the variations of specific hardware devices from the user.
Security can improve reliability by detecting latent errors at the interfaces between component subsystems. Early detection of interface errors can prevent the foulness of a healthy subsystem by a malfunctioning subsystem. An unprotected resource cannot misuse by an unauthorized or incompetent user.
One of the most important components of an operating system is its command interpreter. The command interpreter is the primary interface between the user and the rest of the system.
Many commands are given to the operating system by control statements. A program that reads and interprets control statements is automatically executed when a new job is started in a batch system or a user logs in to a time-shared system. This program is variously called.
o The control card interpreter, o The command-line interpreter,
o The shell (in UNIX), and so on.
Its function is quite simple, get the next command statement, and execute it. The command statements deal with process management, I/O handling, secondary storage management, main memory management, file system access, protection, and networking.
Services of Operating System
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.
Design Goals
Requirements define properties which the finished system must have, and are a necessary first step in designing any large complex system. User requirements are features that users care about and understand, and are written in commonly understood vernacular. They generally do not include any implementation details, and are written similar to the product description one might find on a sales brochure or the outside of a shrink- wrapped box. System requirements are written for the developers, and include more details about implementation specifics, performance requirements, compatibility constraints, standards compliance, etc. These requirements serve as a "contract" between the customer and the developers, ( and between developers and subcontractors ), and can get quite detailed. Requirements for operating systems can vary greatly depending on the planned scope and usage of the system. ( Single user / multi-user, specialized system / general purpose, high/low security, performance needs, operating environment, etc. )
Mechanisms and Policies Policies determine what is to be done. Mechanisms determine how it is to be implemented. If properly separated and implemented, policy changes can be easily adjusted without re- writing the code, just by adjusting parameters or possibly loading new data / configuration files. For example the relative priority of background versus foreground tasks.
Implementation Traditionally OSes were written in assembly language. This provided direct control over hardware-related issues, but inextricably tied a particular OS to a particular HW platform. Recent advances in compiler efficiencies mean that most modern OSes are written in C, or more recently, C++. Critical sections of code are still written in assembly language, ( or written in C, compiled to assembly, and then fine-tuned and optimized by hand from there. ) Operating systems may be developed using emulators of the target hardware, particularly if the real hardware is unavailable ( e.g. not built yet ), or not a suitable platform for development, ( e.g. smart phones, game consoles, or other similar devices. )
Operating-System Structure For efficient performance and implementation an OS should be partitioned into separate subsystems, each with carefully defined tasks, inputs, outputs, and performance characteristics. These subsystems can then be arranged in various architectural configurations: Simple Structure When DOS was originally written its developers had no idea how big and important it would eventually become. It was written by a few programmers in a relatively short amount of time, without the benefit of modern software engineering techniques, and then gradually grew over time to exceed its original expectations. It does not break the system into subsystems, and has no distinction
between user and kernel modes, allowing all programs direct access to the underlying hardware. ( Note that user versus kernel mode was not supported by the 8088 chip set anyway, so that really wasn't an option back then. )
Figure - MS-DOS layer structure
The original UNIX OS used a simple layered approach, but almost all the OS was in one big layer, not really breaking the OS down into layered subsystems:
Figure - Traditional UNIX system structure