0% found this document useful (0 votes)
17 views29 pages

UNIT 1 OS

note of Os

Uploaded by

nehalchouhan890
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
17 views29 pages

UNIT 1 OS

note of Os

Uploaded by

nehalchouhan890
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 29

UNIT -1

Introduction to Operating System


Definition:- In the Computer System (comprises of Hardware and software), Hardware can only
understand machine code (in the form of 0 and 1) which doesn't make any sense to a naive user.

We need a system which can act as an intermediary and manage all the processes and resources
present in the system.

An Operating System can be defined as an interface between user and hardware. It is


responsible for the execution of all the processes, Resource Allocation, CPU management, File
Management and many other tasks. For eg. Windows, Mac, UNIX, Linux, MS-DOS etc.

The purpose of an operating system is to provide an environment in which a user can execute
programs in convenient and efficient manner.

Structure of a Computer System

A Computer System consists of:

o Users (people who are using the computer)


o Application Programs (Compilers, Databases, Games, Video player, Browsers, etc.)
o System Programs (Shells, Editors, Compilers, etc.)
o Operating System ( A special program which acts as an interface between user and
hardware )
o Hardware ( CPU, Disks, Memory, etc)
Goals of the Operating System
There are two types of goals of an Operating System i.e. Primary Goals and Secondary Goal.

 Primary Goal: The primary goal of an Operating System is to provide a user-friendly


and convenient environment. We know that it is not compulsory to use the Operating
System, but things become harder when the user has to perform all the process
scheduling and converting the user code into machine code is also very difficult. So, we
make the use of an Operating System to act as an intermediate between us and the
hardware. All you need to do is give commands to the Operating System and the
Operating System will do the rest for you. So, the Operating System should be
convenient to use.
 Secondary Goal: The secondary goal of an Operating System is efficiency. The
Operating System should perform all the management of resources in such a way that
the resources are fully utilised and no resource should be held idle if some request to
that resource is there at that instant of time.

System Call :- System calls provide an interface between the process and the operating
system. Application programs use system calls to request services and functionalities
from the OS's kernel.
Fig. System Call

Types of System calls:-


Process control
 end, abort
 load, execute
 create process, terminate process
 get process attributes, set process attributes
 wait for time
 wait event, signal event

File management
 create file, delete file
 open, close
 read, write, reposition
 get file attributes, set file attributes

Device management
 request device, release device
 read, write, reposition
 get device attributes, set device attributes
 logically attach or detach devices

Information maintenance
 get time or date, set time or date
 get system data, set system data
 get process, file, or device attributes
 set process, file, or device attributes
Communications
 create, delete communication connection
 send, receive messages
transfer status information
attach or detach remote devices
allocate and free memory

Function / Components of Operating System

The components of an operating system play a key role to make a variety of computer system
parts work together. There are the following components of an operating system, such as:

1. Process Management
2. File Management
3. Network Management
4. Main Memory Management
5. Secondary Storage Management
6. I/O Device Management
7. Security Management
8. Command Interpreter System

Process Management

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

File Management

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.
Function of file management

The operating system has the following important activities in connection with file management:

o File and directory creation and deletion.


o For manipulating files and directories.
o Mapping files onto secondary storage.
o Backup files on stable storage media.

3. Network Management

Network management is the process of administering and managing computer networks. It


includes performance management, provisioning of networks, fault analysis, and maintaining the
quality of service.
A distributed system is a collection of computers or processors that never share their memory
and clock. In this type of system, all the processors have their local memory, and the processors
communicate with each other using different communication cables, such as fibre optics or
telephone lines.

The computers in the network are connected through a communication network, which can
configure in many different ways. The network can fully or partially connect in network
management, which helps users design routing and connection strategies that overcome
connection and security issues.

Functions of Network management

Network management provides the following functions, such as:

o Distributed systems help you to various computing resources in size and function. They
may involve minicomputers, microprocessors, and many general-purpose computer
systems.
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.

4. Main Memory management

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.

5. Secondary-Storage Management

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

I/O Device Management

One of the important use of an operating system that helps to hide the variations of specific
hardware devices from the user.
Functions of I/O management

The I/O management system offers the following functions, such as:

o It offers a buffer caching system


o It provides general device driver code
o It provides drivers for particular hardware devices.
o I/O helps you to know the individualities of a specific device.

Security Management

The various processes in an operating system need to be secured from other activities. Therefore,
various mechanisms can ensure those processes that want to operate files, memory CPU, and
other hardware resources should have proper authorization from the operating system.

Security refers to a mechanism for controlling the access of programs, processes, or users to the
resources defined by computer controls to be imposed, together with some means of
enforcement.
For example, memory addressing hardware helps to confirm that a process can be executed
within its own address space. The time ensures that no process has control of the CPU without
renouncing it. Lastly, no process is allowed to do its own I/O to protect, which helps you to keep
the integrity of the various peripheral devices.

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.

Command Interpreter System

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.

Evolution of OS:-

History of the Operating System

Operating System

The operating system is a system program that serves as an interface between the computing
system and the end-user. Operating systems create an environment where the user can run any
programs or communicate with software or applications in a comfortable and well-organized
way.

Furthermore, an operating is a software program that manages and controls the execution of
application programs, software resources and computer hardware. It also helps manage the
software/hardware resource, such as file management, memory management, input/ output and
many peripheral devices like a disk drive, printers, etc. These are the popular operating
system: Linux OS, Windows OS, Mac OS, VMS, OS/400 etc.

Types of Operating System

An operating system is a well-organized collection of programs that manages the computer


hardware. It is a type of system software that is responsible for the smooth functioning of the
computer system.

1. Batch Operating System


2. Time-Sharing Operating System
3. Embedded Operating System
4. Multiprogramming Operating System
5. Network Operating System
6. Distributed Operating System
7. Multiprocessing Operating System
8. Real-Time Operating System

Interactive Operating System


o Interactive operating systems are computers that accept human inputs. Users give
commands or some data to the computers by typing or by gestures. Some examples of
interactive systems include MS Word and Spreadsheets, etc. They facilitate interactive
behavior. Mac and Windows OS are some examples of interactive operating systems.
o An interactive operative system is an operating system that allows the execution of
interactive programs. All PC operating systems are interactive operating systems only.
o An interactive operating system gives permission to the user to interact directly with the
computer. In an Interactive operating system, the user enters some command into the
system and the work of the system is to execute it.
o Programs that allow users to enter some data or commands are known as Interactive
Operating Systems. Some commonly used examples of Interactive operating systems
include Word Processors and Spreadsheet Applications.
o A non-interactive program can be defined as one that once started continues without the
need for human interaction. A compiler can be an example of a non-interactive
program.
1. Batch Operating System

In Batch Operating System, there is no direct interaction between user and computer. Therefore,
the user needs to prepare jobs and save offline mode to punch card or paper tape or magnetic
tape. After creating the jobs, hand it over to the computer operator; then the operator sort or
creates the similar types of batches like B2, B3, and B4. Now, the computer operator submits
batches into the CPU to execute the jobs one by one. After that, CPUs start executing jobs, and
when all jobs are finished, the computer operator provides the output to the user.

Advantages of Batch Operating System


 Multiple users can share the batch systems.
 The idle time for the batch system is very less.
 It is easy to manage large work repeatedly in batch systems.
Disadvantages of Batch Operating System
 Batch systems are hard to debug.
 It is sometimes costly.
 The other jobs will have to wait for an unknown time if any job fails.
 In batch operating system the processing time for jobs is commonly difficult to accurately
predict while they are in the queue.

2. Time-Sharing Operating System

It is the type of operating system that allows us to connect many people located at different
locations to share and use a specific system at a single time. The time-sharing operating system
is the logical extension of the multiprogramming through which users can run multiple tasks
concurrently. Furthermore, it provides each user his terminal for input or output that impacts the
program or processor currently running on the system. It represents the CPU's time is shared
between many user processes. Or, the processor's time that is shared between multiple users .
simultaneously termed as time-sharing.

A time-shared operating system uses CPU scheduling and multi-programming to provide each
user with a small portion of a shared computer at once. Each user has at least one separate
program in memory. A program is loaded into memory and executes, it performs a short period
of time either before completion or to complete I/O. This short period of time during which the
user gets the attention of the CPU is known as time slice, time slot, or quantum. It is typically
of the order of 10 to 100 milliseconds. Time-shared operating systems are more complex than
multiprogrammed operating systems. In both, multiple jobs must be kept in memory
simultaneously, so the system must have memory management and security. To achieve a good
response time, jobs may have to swap in and out of disk from the main memory which now
serves as a backing store for the main memory. A common method to achieve this goal is virtual
memory, a technique that allows the execution of a job that may not be completely in memory.

Embedded Operating System

The Embedded operating system is the specific purpose operating system used in the computer
system's embedded hardware configuration. These operating systems are designed to work on
dedicated devices like automated teller machines (ATMs), airplane systems, digital home
assistants, and the internet of things (IoT) devices.
Multiprogramming Operating System

Due to the CPU's underutilization and the waiting for I/O resource till that CPU remains idle. It
shows the improper use of system resources. Hence, the operating system introduces a new
concept that is known as multiprogramming. A multiprogramming operating system refers to
the concepts wherein two or more processes or programs activate simultaneously to execute the
processes one after another by the same computer system. When a program is in run mode and
uses CPU, another program or file uses I/O resources at the same time or waiting for another
system resources to become available. It improves the use of system resources, thereby
increasing system throughput. Such a system is known as a multiprogramming operating system.
Features of Multiprogramming
 Need Single CPU for implementation.
 Context switch between process.
 Switching happens when current process undergoes waiting state.
 CPU idle time is reduced.
 High resource utilization.
 High Performance.
Disadvantages of Multiprogramming
 Prior knowledge of scheduling algorithms (An algorithm that decides which next process
will get hold of the CPU) is required.
 If it has a large number of jobs, then long-term jobs will have to require a long wait.
 Memory management is needed in the operating system because all types of tasks are
stored in the main memory.

Network Operating System

A network operating system is an important category of the operating system that operates on a
server using network devices like a switch, router, or firewall to handle data, applications and
other network resources. It provides connectivity among the autonomous operating system,
called as a network operating system. The network operating system is also useful to share data,
files, hardware devices and printer resources among multiple computers to communicate with
each other.
Distributed Operating system

A distributed operating system provides an environment in which multiple independent CPU or


processor communicates with each other through physically separate computational nodes. Each
node contains specific software that communicates with the global aggregate operating system.
With the ease of a distributed system, the programmer or developer can easily access any
operating system and resource to execute the computational tasks and achieve a common goal. It
is the extension of a network operating system that facilitates a high degree of connectivity to
communicate with other users over the network.
Multiprocessing Operating System

It is the type of operating system that refers to using two or more central processing units (CPU)
in a single computer system. However, these multiprocessor systems or parallel operating
systems are used to increase the computer system's efficiency. With the use of a multiprocessor
system, they share computer bus, clock, memory and input or output device for concurrent
execution of process or program and resource management in the CPU.

A multiprocessing operating system is defined as a type of operating system that makes use of
more than one CPU to improve performance. Multiple processors work parallelly in multi-
processing operating systems to perform the given task. All the available processors are
connected to peripheral devices, computer buses, physical memory, and clocks. The main aim
of the multi-processing operating system is to increase the speed of execution of the system.
The use of a multiprocessing operating system improves the overall performance of the system.
For example, UNIX, LINUX, and Solaris are the most widely used multi-processing operating
system.

Working of Multi-Processing Operating System


 Multi-processing operating system consists of multiple CPUs. Each CPU is connected to
the main memory.
 The task to be performed id divided among all the processors.
 For faster execution and improved performance, each processor is assigned a specific task.
 Once all the tasks of each processor are completed they are compiled together in order to
produce a single output.
 The allocation of resources for each processor is handled by the operating system. This
process results in better utilization of the available resources and improved performance.

Real-Time Operating System

A real-time operating system is an important type of operating system used to provide services
and data processing resources for applications in which the time interval required to process &
respond to input/output should be so small without any delay real-time system. For example,
real-life situations governing an automatic car, traffic signal, nuclear reactor or an aircraft require
an immediate response to complete tasks within a specified time delay. Hence, a real-time
operating system must be fast and responsive for an embedded system, weapon system, robots,
scientific research & experiments and various real-time objects.

Types of the real-time operating system:


HardReal-TimeSystem
These types of OS are used with those required to complete critical tasks within the defined time
limit. If the response time is high, it is not accepted by the system or may face serious issues like
a system failure. In a hard real-time system, the secondary storage is either limited or missing, so
these system stored data in the ROM.
o SoftReal-TimeSystem
A soft real-time system is a less restrictive system that can accept software and hardware
resources delays by the operating system. In a soft real-time system, a critical task
prioritizes less important tasks, and that priority retains active until completion of the
task. Also, a time limit is set for a specific job, which enables short time delays for
further tasks that are acceptable. For example, computer audio or video, virtual reality,
reservation system, projects like undersea, etc.

Multitasking Operating System


o Single tasking Operating system was used before the multitasking operating system.
single tasking operating system allows user to perform a single task at a time. So tasks
like printing a document or downloading an image from the internet can be done one
after another, leading to wastage of resources which makes the operating system
relatively slow and gives a bad user experience. So keeping this in mind Multi-Tasking
Operating Systems were introduced that allow users to run multiple programs
simultaneously thus making the computer far more efficient and user friendly. A user
can download the image from the internet as well as listen to music or can surf the
internet while downloading the image all at the same time.

What is Multi-Tasking Operating System?


o Multi tasking operating systems allow multiple users to perform multiple tasks at the
same time. The allocation of system resources such as input/output
devices, CPU and memory among processes can be easily managed by multi-tasking
operating system. There are various states through which a processor passes to
complete particular or multiple executions. Multitasking is the ability of an OS to
execute more than one task simultaneously on a CPU machine as shown in the below
diagram.
Operating system services:

The operating system provides the programming environment in which a programmer


works on a computer system. The user program requests various resources through the
operating system. The operating system gives several services to utility programmers and
users. Applications access these services through application programming interfaces or
system calls. By invoking those interfaces, the application can request a service from the
operating system, pass parameters, and acquire the operation outcomes.

Following are the services provided by an operating system -

o Program execution
o Control Input/output devices
o Program creation
o Error Detection and Response
o Accounting
o Security and Protection
o File Management
o Communication

Program execution

To execute a program, several tasks need to be performed. Both the instructions and data
must be loaded into the main memory. In addition, input-output devices and files should
be initialized, and other resources must be prepared. The Operating structures handle
these kinds of tasks. The user now no longer should fear the reminiscence allocation or
multitasking or anything.

Control Input/output device - As there are numerous types of I/O devices within the
computer system, and each I/O device calls for its own precise set of instructions for the
operation. The Operating System hides that info with the aid of presenting a uniform
interface. Thus, it is convenient for programmers to access such devices easily.

Error Detection and Response - An Error in a device may also cause malfunctioning of
the entire device. These include hardware and software errors such as device failure,
memory error, division by zero, attempts to access forbidden memory locations, etc. To
avoid error, the operating system monitors the system for detecting errors and takes
suitable action with at least impact on running applications.

File management Computers keep data and information on secondary storage devices
like magnetic tape, magnetic disk, optical disk, etc. Each storage media has its
capabilities like speed, capacity, data transfer rate, and data access methods. For file
management, the operating system must know the types of different files and the
characteristics of different storage devices. It has to offer the proportion and safety
mechanism of documents additionally..

Communication - The operating system manages the exchange of data and programs
among different computers connected over a network. This communication is
accomplished using message passing and shared memory.

Accounting - An Operating device collects utilization records for numerous assets and
tracks the overall performance parameters and responsive time to enhance overall
performance. These personal records are beneficial for additional upgrades and tuning the
device to enhance overall performance

Security and Protection - Operating device affords safety to the statistics and packages
of a person and protects any interference from unauthorized users. The safety feature
counters threats, which are published via way of individuals out of doors the manage of
the running device.

Operating Systems Structure


The operating system can be implemented with the help of various structures. The structure
of the OS depends mainly on how the various standard components of the operating system
are interconnected and melded into the kernel.

Kernel :- A kernel is a central component of an operating system that manages the operations of
computers and hardware. It basically manages operations of memory and CPU time. It is a core
component of an operating system. Kernel acts as a bridge between applications and data
processing performed at the hardware level using inter-process communication and system calls.
Types of Operating Systems Structures
 Simple/Monolithic Structure
 Micro-Kernel Structure
 Layered Structure
 Modular Structure

Simple structure
Such operating systems do not have well-defined structures and are small, simple, and limited.
The interfaces and levels of functionality are not well separated. MS-DOS is an example of
such an operating system. In MS-DOS, application programs are able to access the basic I/O
routines. These types of operating systems cause the entire system to crash if one of the user
programs fails.

Advantages of Simple/Monolithic Structure


 It delivers better application performance because of the few interfaces between the
application program and the hardware.
 It is easy for kernel developers to develop such an operating system.
Disadvantages of Simple/Monolithic Structure
 The structure is very complicated, as no clear boundaries exist between modules.
 It does not enforce data hiding in the operating system.

Micro-Kernel Structure
This structure designs the operating system by removing all non-essential components from the
kernel and implementing them as system and user programs. This results in a smaller kernel
called the micro-kernel. Advantages of this structure are that all new services need to be added
to user space and does not require the kernel to be modified. Thus it is more secure and reliable
as if a service fails, then rest of the operating system remains untouched. Mac OS is an
example of this type of OS.
Advantages of Micro-kernel Structure
 It makes the operating system portable to various platforms.
 As microkernels are small so these can be tested effectively.
Disadvantages of Micro-kernel Structure
 Increased level of inter module communication degrades system performance.

Hybrid-Kernel Structure
Hybrid-kernel structure is nothing but just a combination of both monolithic-kernel structure
and micro-kernel structure. Basically, it combines properties of both monolithic and micro-
kernel and make a more advance and helpful approach. It implement speed and design of
monolithic and modularity and stability of micro-kernel structure.
Advantages of Hybrid-Kernel Structure
 It offers good performance as it implements the advantages of both structure in it.
 It supports a wide range of hardware and applications.
 It provides better isolation and security by implementing micro-kernel approach.
 It enhances overall system reliability by separating critical functions into micro-kernel for
debugging and maintenance.
Disadvantages of Hybrid-Kernel Structure
 It increases overall complexity of system by implementing both structure (monolithic and
micro) and making the system difficult to understand.
 The layer of communication between micro-kernel and other component increases time
complexity and decreases performance compared to monolithic kernel.

Layered Structure
An OS can be broken into pieces and retain much more control over the system. In this
structure, the OS is broken into a number of layers (levels). The bottom layer (layer 0) is the
hardware, and the topmost layer (layer N) is the user interface. These layers are so designed
that each layer uses the functions of the lower-level layers. This simplifies the debugging
process, if lower-level layers are debugged and an error occurs during debugging, then the
error must be on that layer only, as the lower-level layers have already been debugged.
The main disadvantage of this structure is that at each layer, the data needs to be modified and
passed on which adds overhead to the system. Moreover, careful planning of the layers is
necessary, as a layer can use only lower-level layers. UNIX is an example of this structure.
Advantages of Layered Structure
 Layering makes it easier to enhance the operating system, as the implementation of a layer
can be changed easily without affecting the other layers.
 It is very easy to perform debugging and system verification.
Disadvantages of Layered Structure
 In this structure, the application’s performance is degraded as compared to simple
structure.
 It requires careful planning for designing the layers, as the higher layers use the
functionalities of only the lower layers.

Modular Structure
It is considered as the best approach for an OS. It involves designing of a modular kernel. The
kernel has only a set of core components and other services are added as dynamically loadable
modules to the kernel either during runtime or boot time. It resembles layered structure due to
the fact that each kernel has defined and protected interfaces, but it is more flexible than a
layered structure as a module can call any other module. For example Solaris OS is organized
as shown in the figure.
Storage Structure
Main memory – only large storage media that the CPU can access directly.
Secondary storage – extension of main memory that provides large nonvolatile storage
capacity.
Magnetic disks – rigid metal or glass platters covered with magnetic recording material
✦ Disk surface is logically divided into tracks, which are subdivided into sectors.
✦ The disk controller determines the logical interaction between the device and the computer.

Storage Hierarchy
Storage systems organized in hierarchy.
✦ Speed
✦ Cost
✦ Volatility
Caching – copying information into faster storage system; main memory can be viewed as a last
cache for
secondary storage.
 Use of high-speed memory to hold recently-accessed data.
 Requires a cache management policy.
 Caching introduces another level in storage hierarchy.
 This requires data that is simultaneously stored in more than one level to be consistent.

 Dual-Mode Operation
I/O Protection
 Memory Protection
 CPU Protection

Dual-Mode Operation
 Sharing system resources requires operating system to ensure that an incorrect program cannot
cause other programs to execute incorrectly.
 Provide hardware support to differentiate between at least two modes of operations.
 User mode – execution done on behalf of a user.
 Monitor mode (also kernel mode or system mode) – execution done on behalf of operating
system.
 Mode bit added to computer hardware to indicate the current mode: monitor (0) or user (1).
 When an interrupt or fault occurs hardware switches to Privileged instructions can be issued
only in
monitor mode.
 monitor user ,Interrupt/fault ,set user mode

I/O Protection
 All I/O instructions are privileged instructions.
 Must ensure that a user program could never gain control of the computer in monitor mode
(I.e.a user program that, as part of its execution, stores a new address in the interrupt vector).
Memory Protection
 Must provide memory protection at least for the interrupt vector and the interrupt service
routines.
 In order to have memory protection, add two registers that determine the range of legal
addresses a program may access:
✦ Base register – holds the smallest legal physical memory address.
✦ Limit register – contains the size of the range
 Memory outside the defined range is protected.

Hardware Protection
 When executing in monitor mode, the operating system has unrestricted access to both monitor
and user’s memory.
 The load instructions for the base and limit registers are privileged instructions.

CPU Protection
 Timer – interrupts computer after specified period to ensure operating system maintainscontrol.
✦ Timer is decremented every clock tick.
✦ When timer reaches the value 0, an interrupt occurs.
 Timer commonly used to implement time sharing.
 Time also used to compute the current time.
 Load-timer is a privileged instruction.

You might also like