Tuesday, February 21, 2023

OS Unit-1



Operating Systems

An operating system is system software that manages a computer’s hardware or we can say that it acts as a communication bridge (interface) between the user and computer hardware. The purpose of an operating system is to provide a platform on which a user can execute programs in a convenient and efficient manner. 

The main task of an operating system is to carries out the allocation of resources and services, such as allocation of memory, devices, processors and information. The operating system also includes programs to manage these resources, such as a traffic controller, a scheduler, memory management module, I/O programs, and a file system. 



Operating system goals:

  •          Execute user programs and make solving user problems easier.
  •       Make the computer system convenient to use.
  •       Use the computer hardware in an efficient manner.

 

Computer System Components

1.      Hardware provides basic computing resources (CPU, memory, I/O devices).

2.      Operating systemcontrols and coordinates the use of the hardware among the various application programs for the various users.

3.      Applications programsDefine the ways in which the system resources are used to solve the computing problems of the users (compilers, database systems, video games, business programs).

4.      Users (people, machines, other computers).



Computer-System Organization 

A modern general-purpose computer system consists of one or more CPUs and a number of device controllers connected through a common bus that provides access between components and shared memory. A device controller maintains some local buffer storage and a set of special-purpose registers. The device controller is responsible for moving the data between the peripheral devices that it controls and its local buffer storage. operating systems have a device driver for each device controller.

This device driver understands the device controller and provides the rest of the operating system with a uniform interface to the device. In the following subsections, we describe some basics of how such a system operates, focusing on three key aspects of the system. We start with interrupts, which alert the CPU to events that require attention. We then discuss storage structure and I/O structure.

 



Computer-System Architecture

A computer system can be organized in a number of different ways, which we can categorize roughly according to the number of general-purpose processors used.

Single-Processor Systems

Many years ago, most computer systems used a single processor containing one CPU with a single processing core. The core is the component that executes instructions and registers for storing data locally. The one main CPU with its core is capable of executing a general-purpose instruction set, including instructions from processes. These systems have other special-purpose processors as well. They may come in the form of device-specific processors, such as disk, keyboard, and graphics controllers. All of these special-purpose processors run a limited instruction set and do not run processes. Sometimes, they are managed by the operating system, in that the operating system sends them information about their next task and monitors their status.

Multiprocessor Systems

On modern computers, from mobile devices to servers, multiprocessor systems such systems have two (or more) processors, each with a single-core CPU. The processors share the computer bus and sometimes the clock, memory, and peripheral devices. The primary advantage of multiprocessor systems is increased throughput.

The most common multiprocessor systems use symmetric multiprocessing (SMP), in which each peer CPU processor performs all tasks, including operating-system functions and user processes. Below figure illustrates a typical SMP architecture with two processors, each with its own CPU. Notice that each CPU processor has its own set of registers, as well as a private—or local— cache. However, all processors share physical memory over the system bus. The benefit of this model is that many processes can run simultaneously—N processes can run if there are N CPUs


since the CPUs are separate, one may be sitting idle while another is overloaded, resulting in inefficiencies. These inefficiencies can be avoided if the processors share certain data structures. A multiprocessor system of this form will allow processes and resources—such
as memory—to be shared dynamically among the various processors and can lower the workload variance among the processors.

The definition of multiprocessor has evolved over time and now includes multicore systems, in which multiple computing cores reside on a single chip. Multicore systems can be more efficient than multiple chips with single cores because on-chip communication is faster than between-chip communication.




Classification/Types of Operating Systems

There are 6 major types of Operating System which are given below,

 

1. Batch Operating System

Users of batch OS cannot interact with the computer directly. So, Each user puts his job on an offline device like punches cards and submits it to the computer operator. Then by computer Operator, same type of processes are grouped together and treated as a batch. Such types of operating system was use earlier. Lets explain with diagram given below,



                                      

Advantages Of  Batch OS

·         If a job takes a very long time(1 day or so) Then, such processes can be executed even in the absence of any humans. thus, such operating systems are very useful in some cases i.e. same type of bank statement.

Limitations Of  Batch OS

  •          Suppose I/O or an error occurs in one process of a batch. Then, all the remaining process gets affected. They have to wait until the I/O completed or error is resolved.
  •        It follow FCFS algorithm. There may be a possibility of short process have to wait for long time due to execution of heavy process first

Examples of Batch Operating System are Payroll System, Bank Statements etc.



2. Time Sharing OS

In general, when a process starts executing on CPU, it will occupy the CPU till its completion. But, Sharing of CPU among the different users or processes for quantum period of time is called time sharing OS. CPU scheduling Algorithms are used for CPU Sharing .This short period of time during that a user gets attention of the CPU is known as time slice or time Quantum. Each process from user is given some time to execute, so that all the processes work properly. Due to so fast Context switching, it looks all processes are running at the same time on CPU. But in real, each task gets time of CPU as they use single system. Time Sharing is a multitasking but explained in two different terms. But the concept is the same in both terms. Have a look

Single user time Sharing OS

Time sharing is a method where the resources like CPU, Main memory are shared among the different tasks at the same time by means of multi-programming and multi-tasking is called time sharing Operating System.

Multi user time Sharing OS

Time sharing is a method where the resources like CPU, Main memory are shared among the different users at the same time by means of multi-programming and multi-tasking is called time sharing Operating system.

 


 

Advantages of Time sharing operating systems

  •           Provide quick response.
  •       Each task gets an equal opportunity
  •       Reduces CPU idle time.
  •       Avoid duplication of software because OS manage all the users and resources                properly.

Disadvantages of Time sharing operating systems

  • Problem of reliability due to Context Switching
  • Some data security issues
  • Data communication problem

3. Distributed Operating System

It is a model where different computer are running parallel linked by communications links. It use multiple CPU’s to execute multiple processes. Multiple processors communicated with each other through multiple communication lines i.e. buses, chips or something else. It is also consider as loosely coupled OS . An individual CPU called as a node, Site or Computer.



 

Advantage of distributed operating system:

  •         As all systems are independent so, Failure of one will not affect the other system in same network, 
  •     Highly speed due to shared network.
  •     Load on host computer reduces because no system is dependent to other.
  •     Delay in data processing reduces.

 

Disadvantages of distributed operating system:

  •         Fault tolerance
  •      Mutual exclusion
  •      Time in clock synchronization

 

4. Network Operating System

it mostly Runs on server computer. Server is just a program which runs on particular computers called Server Computers. It provides the capability of manage data, application, user, group, security, and other network functionalities. There are different types of Network Operating System (Servers) and each having its specific task.Explained under, 

A server is a computer serves data to other computers. Server computers are available in the form of local area network (LAN) and wide area network (WAN).

 

Some Example of LAN

  • at Home
  • at Office
  • Network for small business

Some Example of WAN

  • Web Servers: A Web server hosts websites on the internet.
  • Mail Servers: Mail server is responsible for sending and receiving mails over network
  • File Servers:  a file provides access to files at a specific storage location that can be accessed by multiple users in that network.

 

Concept is that:

When you connect to a file server on at office, it appears as a hard disk on your computer. You can browse the directories  just like local folders at node computer. If you want to copy a file from the server System to your computer then simply drag it to your folder on your local disk.

In the same way all resources of Server computer like Printer can easily be used by its terminals.Allow to shared file and printer access among multiple computer in the network

Example of Network OS

  • Microsoft window server 2003
  • Microsoft window server 2008
  • Unix

Note: we can use Network operating system on our PC or laptop and it works properly. But we can’t use its full functionality. That’s why we used it on server computer.

Advantages of Network Operating System

  • Security Can easily managed because we have to focus on running process.
  • easy to upgrade the Technology and software
  • Remote access enabled: user can access the server from any location by logging in without going to server actual location.

Disadvantage of Network Operating System

  • High cost: high organizations use this server according to their needs i.e Armed force, banking etc
  • Dependency on central location for most of the operations
  • Regular maintenance and update.

5. Real time Operating System

  • Process time: Time taken by OS to process the task
  • Response time: Time interval between inputs to output by Operating system .Time interval to respond the inputs is also called Response time and it is very small interval.

Real time system is used when there are time constraints are very strict like medical system, missile systems, robots, etc.

Some examples of real time OS

  • missile systems
  • weapon systems
  • control systems
  • traffic control signals
  • medical system
  • Scientific experiments
  • robots
  • air traffic
  • Industry control system etc.

There are Two types of Real Time OS

1. Hard Real-Time Systems:

Task must complete on time. In Hard Real Systems time requirements are very strict and even the minor possible delay is not acceptable. These OS are specific for saving life like medical system, traffic control signals etc

2. Soft Real-Time Systems

In these OS Task completion is the most priority and time constraints are not too strict.

Advantages of RTOS:

  • Error Free: Real time Operating Systems are error free.
  • Memory Allocation Management: Memory allocation is best and very easy to manage in these types of systems.
  • Task Shifting: In earlier Systems, task shifting was considered 10 micro seconds but now it reduced to 3 micro seconds.
  • Focus on Current Application:  current running applications are considered at top priority rather than applications which are in queue.

Disadvantages of RTOS:

  • Limited Tasks: Very few tasks run at a time.
  • Costly: by using the heavy system resources Sometimes leads toward out of budget.
  • Complex Coding and Algorithms: Coding and designing of algorithms are very difficult to write on.
  • Difficult to task switching: Each Task in the Queue executes according to his priority. It is difficult to change them at run time.

so, in desktop/laptop Os the windows Os is on top.

6. Mobile Operating System

What is a Mobile Operating System (Mobile OS)?

As Windows, Linux and Unix OS are control the PC and laptop. In the same way, there are lot of mobile operating systems are available, which are used to control the functionality of mobile phone and tablets. Mobile OS also control the mobile apps on your device to extend the functionality of  your device.

Types of Mobile Operating Systems

You must know about the operating system of that particular device, before to purchase it. List of some Mobile operating systems is here,

  • Symbian OS (Nokia)
  • iPhone OS / iOS (Apple)
  • Bada (Samsung Electronics)
  • Windows Mobile (Windows Phone)
  • MeeGo OS (Nokia and Intel)
  • webOS (Palm/HP)
  • Series 40 OS (Nokia)
  • BlackBerry OS (Research In Motion)

So, in mobile operating systems Nokia(Symbian) is on top.

Overall Comparison Between Laptop/PC and Mobile OS

According to Wikipedia in in 2020, The following image shows the Web results from various resources of different types of operating system.

Hence proved, OS of mobile is more using than PC/Laptop.


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:

1.     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.)          

                             

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:

 

2.     Layered Approach

Another approach is to break the OS into a number of smaller layers, each of which rests on the layer below it, and relies solely on the services provided by the next lower layer.

This approach allows each layer to be developed and debugged independently, with the assumption that all lower layers have already been debugged and are trusted to deliver proper services.

The problem is deciding what order in which to place the layers, as no layer can call upon the services of any higher layer, and so many chicken-and-egg situations may arise.

Layered approaches can also be less efficient, as a request for service from a higher layer has to filter through all lower layers before it reaches the HW, possibly with significant processing at each step.



Storage Structure

The CPU can load instructions only from memory, so any programs must first be loaded into memory to run. General-purpose computers run most of their programs from rewritable memory, called main memory (also called random-access memory, or RAM). Main memory commonly is implemented in a semiconductor technology called dynamic random-access memory (DRAM).
Computers use other forms of memory as well. For example, the first program to run on computer power-on is a bootstrap program, which then loads the operating system. Since RAM is volatile—loses its content when power is turned off or otherwise lost—we cannot trust it to hold the bootstrap program. Instead, for this and some other purposes, the computer uses electrically erasable programmable read-only memory (EEPROM) and other forms of
firmwar —storage that is infrequently written to and is nonvolatile. EEPROM can be changed but cannot be changed frequently. In addition, it is low speed, and so it contains mostly static programs and data that aren’t frequently used. For example, the iPhone uses EEPROM to store serial numbers and hardware information about the device.




System Call?

A system call is a method for a computer program to request a service from the kernel of the operating system on which it is running. A system call is a method of interacting with the operating system via programs. A system call is a request from computer software to an operating system's kernel.


The Application Program Interface (API) connects the operating system's functions to user programs. It acts as a link between the operating system and a process, allowing user-level programs to request operating system services. The kernel system can only be accessed using system calls. System calls are required for any programs that use resources.

How are system calls made?

When a computer software needs to access the operating system's kernel, it makes a system call. The system call uses an API to expose the operating system's services to user programs. It is the only method to access the kernel system. All programs or processes that require resources for execution must use system calls, as they serve as an interface between the operating system and user programs.

Types of System Calls

There are commonly five types of system calls. These are as follows:



  1. Process Control
  2. File Management
  3. Device Management
  4. Information Maintenance
  5. Communication

Process Control

Process control is the system call that is used to direct the processes. Some process control examples include creating, load, abort, end, execute, process, terminate the process, etc.

File Management

File management is a system call that is used to handle the files. Some file management examples include creating files, delete files, open, close, read, write, etc.

Device Management

Device management is a system call that is used to deal with devices. Some examples of device management include read, device, write, get device attributes, release device, etc.

Information Maintenance

Information maintenance is a system call that is used to maintain information. There are some examples of information maintenance, including getting system data, set time or date, get time or date, set system data, etc.

Communication

Communication is a system call that is used for communication. There are some examples of communication, including create, delete communication connections, send, receive messages, etc.

Examples of Windows and Unix system calls

There are various examples of Windows and Unix system calls. These are as listed below in the table:

ProcessWindowsUnix
Process ControlCreateProcess()
ExitProcess()
WaitForSingleObject()
Fork()
Exit()
Wait()
File ManipulationCreateFile()
ReadFile()
WriteFile()
CloseHandle()
Open()
Read()
Write()
Close()
Device ManagementSetConsoleMode()
ReadConsole()
WriteConsole()
Ioctl()
Read()
Write()
Information MaintenanceGetCurrentProcessID()
SetTimer()
Sleep()
Getpid()
Alarm()
Sleep()
CommunicationCreatePipe()
CreateFileMapping()
MapViewOfFile()
Pipe()
Shmget()
Mmap()

What is Kernel?

  • Kernel is a computer program that is a core or heart of an operating system. Hence it has full control over everything in the system. Kernel handles all operations on behalf of operating system. Kernel first loaded on start-up the system (After the bootloader). Once it is loaded, it manages the remaining start-ups. A kernel is kept and usually loaded into separate memory space, known as protected Kernel space (kernel mode). Other application programs such as browser, word processor, audio & video player use separate memory space known as user-space (user mode).
  • Due to these two separate spaces; user data and kernel data don't interfere with each other and do not cause any instability and slowness.

 








    

Explanation of System Call

As in below diagram, User Applications run in user mode, and operating system run in kernel mode. As OS control all the hardware’s so User cannot access hardware without kernel mode. To access kernel mode user application generate a system call because System call is a source to go to kernel mode.

CPU switch in two modes, while working

  • User mode
  • Kernel mode
        
 

User-mode and kernel mode

User Mode

When an application like MS word handling a text editor runs on the operating system, the system is in user mode and the mode bit is 1 in that case. The mode bit will change from 1 to 0 if it switches to kernel mode. The user mode to kernel mode is switched when there is a need to access any device or any interrupt/system call occurs. 

Kernel-mode

When the system boots, the system starts with kernel mode. And the applications are executed in user mode. The switch can happen from user mode to kernel mode when

·     Interrupt occurs

·     Need to access privileged instruction 

·     Need to access any device

·     The mode bit is changed from 0 to 1 in case of the system switch back to user mode.

Types of Kernel

There are mainly five types of Kernel, which are given below:

1.      Monolithic Kernel

2.      Microkernel

3.      Hybrid Kernel

4.      Nano Kernel

5.      Exo Kernel

 

·     Monolithic Kernel: Monolithic kernels are the simplest and most common type of Kernel. They include the core functionality of the operating system and support all devices connected to it. In this, the user and kernel services are implemented in the same memory space. Due to this, the size of the kernel increases, which in turn increases the size of the operating system. The main benefit is that the process execution is faster as there is no separate memory space for the user and Kernel.

Advantage: It has good performance.  

Disadvantage: It has dependencies between system components.

 

·     Microkernel: In this, user services and kernel services are implemented into two different address spaces: user space and kernel space. Since it uses different spaces for both the services, so, the size of the microkernel is decreased, and which also reduces the size of the OS. Only some essential services are provided by microkernels, such as defining memory address spaces, IPC (Interprocess Communication), and process management. Other services such as networking are not provided by Kernel and handled by a user-space program known as servers. One of the main disadvantages of monolithic kernels that an error in the kernel can crash the whole system, can be removed in the microkernel. As in a microkernel, if a kernel process crashes, the crashing of the whole system can still be prevented by restarting the error-caused services.

Advantage: It is more stable. 

Disadvantage: There are lots of system calls and context switches

 

·     Hybrid Kernel: Hybrid kernels combine monolithic and microkernels. They include more services than microkernels but less than monolithic kernels. This allows them to offer some of the benefits of both kernels. It borrows speed from the monolithic kernels and modularity from microkernels.

Advantage: It combines both monolithic kernel and microkernel. 

 Disadvantage: It is still similar to monolithic kernel

 

·     Nano Kernel: Nano kernels are the smallest type of Kernel, consisting of only a few thousand lines of code. It means that the code executing in the privileged mode of the hardware is minimal. They are used primarily in embedded systems or devices with limited resources.

Advantage: It offers hardware abstractions without system services. 

 Disadvantage: It is quite same as Microkernel hence it is less used. 

 

·     Exo Kernel: This Kernel has separate resource protection and management. It is suitable for use when performing application-specific customization. Exo kernels are designed for use in mobile devices. They are a variation of microkernels that include additional features specifically for mobile devices, such as power management and support for multiple processors.

Advantage: It has fewest hardware abstractions.  

Disadvantage: There is more work for application developers

 

What is Shell

A shell is special user program which provide an interface to user to use operating system services. Shell accept human readable commands from user and convert them into something which kernel can understand. It is a command language interpreter that execute commands read from input devices such as keyboards or from files. The shell gets started when the user login or start the terminal. Shell may have either a command line interface (C.L.I.) or a graphical user interface (G.U.I.). 

Types of Shells in Operating Systems

A shell script is a computer program designed to be run by the Unix/Linux shell which could be one of the following:

Ø  The Bourne Shell

Ø  The C Shell

Ø  The Korn Shell

Ø  The GNU Bourne-Again Shell

 

Ø  Bourne shell − If you are using a Bourne-type shell, the $ character is the default prompt.

The Bourne Shell has the following subcategories −

·   Bourne shell (sh)

·   Korn shell (ksh)

·   Bourne Again shell (bash)

·   POSIX shell (sh)

 

Ø  C shell − If you are using a C-type shell, the % character is the default prompt.

The different C-type shells follow −

·   C shell (csh)

·   TENEX/TOPS C shell (tcsh)

Difference between Shell and Kernel:


Let’s explain User Mode vs Kernel Mode with examples

When system is Turn ON then CPU is in kernel mode, by default, because it loading OS into main memory and OS exist in Kernel mode. After log IN, CPU switch to user mode to run user applications.

1. Watching Movie in windows OS,

If we want To play movie then we have to double click on that particular video. As, that video exist in main memory and main memory is hardware. So, CPU cannot access the hardware in user mode. System have to request through system call to open the file in main memory. So, OPEN () system call is generated and CPU switch to Kernel mode. Now OS in kernel, open that particular file from main memory. After opening the file CPU switch back to user mode. Now we are watching the movie in user mode. When user want to close the file then CLOSE system call again generated.

2. Using MS WORD

To open MS WORD we have to double click on that particular file. As, that file exist in main memory and main memory is a hardware. So, User cannot access the hardware in user mode. User have to request through system call to open the file in main memory. So, OPEN () system call is generated and CPU switch to Kernel mode. Now OS is in kernel mode, it open that particular file from main memory. After opening the file, CPU switch back to user mode. Now we are writing some text in user mode. When user want to save the file then WRITE () system call is again generated. CPU switches to kernel mode to save the file in main memory.


Functions of an Operating System


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 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. 

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.

Device Management

An OS manages device communication via its 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 effectively and efficiently. Deallocates devices when they are no longer required. 

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, the status of every file, and more… These facilities are collectively known as the file system. 

Network Management

The OS provides network connectivity and manages communication between computers on a network. It also manages network security by providing firewalls and other security measures.

Security

The operating system uses password protection to protect user data and similar other techniques. it also prevents unauthorized access to programs and user data.




Operating System - Services
 

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.

Operating system loads the program into the memory after which it is executed. The order in which they are executed depends on the CPU Scheduling Algorithms. 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

Operating System manages the input-output operations and establishes communication between the user and device drivers. Device drivers are software that is associated with hardware that is being managed by the OS so that the sync between the devices works properly.

·         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 need.

File system manipulation

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

The Operating system manages the communication between processes. Communication between processes includes data transfer among them. If the processes are not on the same computer but connected through a computer network, then also their communication is managed by the Operating System itself. 

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.

 


No comments:

Post a Comment

Computer Organization

  Boolean algebra  is the category of algebra in which the variable’s values are the truth values,  true and false,  ordina rily denoted 1 a...