Here in this blog we Are goona discuss the basics of operating systems.
Generally, we came to know what is Operating Systems in the previous blogs
Now, we are gonna discuss Operating System Functionalities:
These are the main important Functionalities in Operating Systems
1. Security :
Generally operating system uses password protection to protect the credentials. it also prevents unauthorized access to programs and credentials.
2.Control over system performance :
Monitors overall system health to help improve performance. records the response time between service requests and system response to having a complete view of the system health. This can help improve performance by providing important information needed to troubleshoot problems.
3.Job accounting :
Operating system Keeps track of time and resources used by various tasks and users, this information can be used to track resource usage for a particular user or group of users.
4.Error detecting aids :
The operating system constantly monitors the system to detect errors and avoid malfunctioning a computer system.
5. Coordination between other software and users :
Operating systems also coordinate and assign interpreters, compilers, assemblers, and other software to the various users of the computer systems.
6.Memory Management :
The operating system manages the Primary Memory or Main Memory. Main memory is made up of a large array of bytes or words where 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 performs the following activities for memory management:
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 access to memory, 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.
7.Processor Management :
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. This function of OS is called process scheduling. An Operating System performs the following activities for processor management.
Keeps track of the status of processes. The program which performs this task is known as a traffic controller. Allocates the CPU that is a processor to a process. De-allocates processor when a process is no more required.
8. Device Management :
An OS manages device communication via their respective drivers. It performs the following activities for device management. 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 in an effective and efficient way. Deallocates devices when they are no longer required.
9.File Management :
A file system is organized into directories for efficient or easy navigation and usage. These directories may contain other directories and other files. An Operating System carries out the following file management activities. It keeps track of where information is stored, user access settings and status of every file, and more… These facilities are collectively known as the file system.
Now we are goona see some important types of operating systems:
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.
The advantages of Timesharing operating systems are as follows −
•Provides the advantage of quick response.
•Avoids duplication of software.
•Reduces CPU idle time.
The 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 high-speed buses or telephone lines). These are referred as loosely coupled systems or distributed systems. Processors in a distributed system may vary in size and function. These processors are referred as sites, nodes, computers, and so on.
The advantages of distributed systems are as follows −
•With resource-sharing facility, a user at one site may be able to use the resources available at another.
•Speed up the exchange of data with one another via electronic mail.
•If one site fails in a distributed system, the remaining sites can potentially continue operating.
•Better service to the customers.
•Reduction of the load on the host computer.
•Reduction of delays in data processing.
Network operating System
A Network Operating System runs on a server and allows the server to manage data, users, groups, security, applications, and other networking functions. The primary purpose of the network operating system is to allow shared file and printer access among multiple computers in a network, typically a local area network (LAN), a private network or to other networks.
The advantages of network operating systems are as follows −
•Centralized servers are highly stable.
•Security is server-managed.
•Remote access to servers is possible from different locations and types of systems.
•The disadvantages of network operating systems are as follows −
•High cost of buying and running a server.
•Dependency on a central location for most operations.
•Regular maintenance and updates are required.
Real-Time Operating System
A real-time system can be 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 to an input and display of required updated information is termed as the response time. So in this method, the response time is very less as compared to online processing.
Real-time systems are used when there are rigid or unchangeable time requirements on the operation of a processor or the flow of data and real-time systems can be used as a control device in a dedicated application. A real-time operating system must have well-defined, fixed time constraints, otherwise the system will fail.
There are two types of real-time operating systems:
1. HARD REAL TIME SYSTEMS
2. SOFT REAL TIME SYSTEMS
Hard real-time systems
Hard real-time systems guarantee that critical tasks complete on time. In hard real-time systems, secondary storage is limited or missing and the data is stored in ROM. In these systems, virtual memory is almost never found.
Soft real-time systems
Soft real-time systems are less restrictive. A critical real-time task gets priority over other tasks and retains the priority until it completes. Soft real-time systems have limited utility than hard real-time systems. For example, multimedia, virtual reality, Advanced Scientific Projects like undersea exploration and planetary rovers, etc.
COMPUTER ARCHIETUIRE SUPPORT FOR OPERATING SYSTEMS:
There are different operating systems for different kinds of computers and processors. They are divided into different categories.
We are gonna discuss about Single Processor system, Multi Processor system, Cluster Processor system
Single processor system
Single processor that manages the computer and it runs on a different operating system, and performs a number of tasks using one processor called a single processor system.
In a single processor system there are different types of tasks can be performed like disk control, user control, system control etc.
Multiprocessor system
When one task or operation can be performed by using multiple processors then it is called a multiprocessor system.
In a multiprocessor system a number of processors are involved to perform a particular task or operation so that the task can be performed easily.
In a multiprocessor system the task is divided into sub tasks and these sub tasks are executed by using different processors.
The multiprocessor system is used mainly for time calculations, arithmetic and logic calculation, memory calculation, error detection, CPU system.
Cluster processor system
In cluster processor systems independent systems share common storage and are connected by a high speed internet connection so a number of computer systems are using a processor by the help of cluster systems.
The cluster system is a type of network which can be established by the help of different computer processors and these processors are used to find out the result of a particular task.
In a cluster system the user will be able to use a network and by the help of the network the user connects with a number of processors or a processor connects with a number of users.
PROCESS VISUALIZATION:
There are many visualization techinques in the operatintg systems here in this blog we are goona discuss about some of the most important techinques in process visualization related to operating systems.
Process API code:
Generally We all know API is also called APPLICATION PROGRAMMING INTERFACE.
API provided by OS is a set of “system calls” – System call is a function call into OS code that runs at a higher privilege level of the CPU
Sensitive operations (e.g., access to hardware) are allowed only at a higher privilege level
Some “blocking” system calls cause the process to beblocked and descheduled (e.g., read from disk)
There are some commands whuch are used in UNIX:”
fork() creates a new child process –.
exec() makes a process execute a given executable
exit() terminates a process
wait() causes a parent to block until child Terminates
DIRECT EXECUTION:
The Operating System provides access to the CPU directly to each process.
The operating system is in charge of setting the environment and transferring control to the process main() entry point and regains access when the process exits.
Without limits, the Operating System would just be a library, with no control of underlining hardware.
CPU SCHEDULING:
CPU scheduling is the process of deciding which process will own the CPU to use while another process is suspended. The main function of the CPU scheduling is to ensure that whenever the CPU remains idle, the OS has at least selected one of the processes available in the ready-to-use line.
In MultiProgramming, if the long-term scheduler selects multiple I / O binding processes then most of the time, the CPU remains an idle. The function of an effective program is to improve resource utilization.
MULTI-LEVEL FEEDBACK:
In Multilevel Feedback Queue Scheduling (MFQS), the processes can move between the queues.
There are multiple CPUs available for load sharing. This process helps avoid starvation as if there is a process waiting in the low priority queue can be moved to the high priority queue, and a process taking too much of the CPU time will be shifted to the lower priority queue.
This scheduling algorithm is considered to be the most general scheme and the most complex too.
MULTIPROCESSOR SCHEDULING:
In the multiprocessor scheduling, there are multiple CPU’s which share the load so that various process run simultaneously. In general, the multiprocessor scheduling is complex as compared to single processor scheduling. In the multiprocessor scheduling, there are many processors and they are identical and we can run any process at any time.
The multiple CPU’s in the system are in the close communication which shares a common bus, memory and other peripheral devices. So we can say that the system is a tightly coupled system. These systems are used when we want to process a bulk amount of data. These systems are mainly used in satellite, weather forecasting etc.
Multiprocessing system work on the concept of symmetric multiprocessing model. In this system, each processor work on the identical copy of the operating system and these copies communicate with each other. We the help of this system we can save money because of other devices like peripherals. Power supplies and other devices are shared. The most important thing is that we can do more work in a short period of time. If one system fails in the multiprocessor system the whole system will not halt only the speed of the processor will be slow down. The whole performance of the multiprocessing system is managed by the operating system . operating system assigns different task to the different processor in the system. In the multiprocessing system, the process is broken into the thread which they can be run independently. These type of system allow the threads to run on more than one processor simultaneously. In these systems the various process in the parallel so this is called parallel processor. Parallel processing is the ability of the CPU to run various process simultaneously. In the multiprocessing system, there is dynamically sharing of resources among the various processors.
Multiprocessor operating system is a kind of regular OS that handles many systems calls at the same time, does memory management, provides file management also the input-output devices.
There are some extra features that multiprocessors perform:
• Process synchronization
• Resource management
• Scheduling