SlideShare a Scribd company logo
What is an operating system?
An operating system is an Interface between a
computer user and the computer hardware. An
operating system is a software which performs all
the basic tasks like file management, memory
management, process management, handling input
and output, and controlling peripheral devices such
as disk and printer drives.
Definition: “An operating system is a program that
acts ass an interface between the user and the
computer hardware and controls the execution of all
kinds of programs”
Fig. Conceptual view of operating system
An operating system (OS) is the program that, after
being initially loaded into the computer by
a boot program, manages all the other programs in a
computer. The other programs are
called applications or application programs.
The application programs make use of the operating
system by making requests for services through a
defined application program interface (API).
In addition, users can interact directly with the
operating system through a user interface such as a
command line or a graphical user interface (GUI).
Important Functions of OS:
• Process management
• Memory management
• Device management
• File management
• Security
• Control over system performance
• Job accounting
• Error detecting aids
• Coordination among different softwares and
users.
Types of OS:
Operating systems are there from the very first computer generation
and they keep evolving with time. The following are some of the
important types of operating systems which are most commonly
used.
1. Mainframe Systems
• Batch systems
• Multi programmed systems
• Time-sharing systems
2. Desktop systems
3. Multiprocessor systems
4. Distributed systems
• Client-server systems
• Peer-to-peer systems
5. Clustered systems
6. Real-time systems
• Hard real-time systems
• Soft real-time systems
7. Hand-held 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.
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.
Advantages:
• Provides the advantage of quick response.
• Avoids duplication of software.
• Reduces CPU idle time.
Disadvantages:
• 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.
Advantages :
• With resource sharing facility, a user at one site may be able to use
the resources available at another.
• Speedup 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 provides the server the
capability 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.
• Ex: Microsoft Windows Server 2003, Microsoft Windows Server 2008,
UNIX, Linux, Mac OS X, Novell NetWare, and BSD.
Advantages:
• Centralized servers are highly stable.
• Security is server managed.
• Upgrades to new technologies and hardware can be easily integrated into
the system.
• Remote access to servers is possible from different locations and types of
systems.
Disadvantages:
• 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 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 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 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. For example,
Scientific experiments, medical imaging systems, industrial control systems,
weapon systems, robots, air traffic control systems, etc.
There are two types of real-time operating systems:
1. 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.
2. 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.
SYSTEM CALLS
• In computing, a system call is the programmatic way in which a computer
program requests a service from the kernel of the operating system it is executed
on. A system call is a way for programs to interact with the operating system.
• Application developers often do not have direct access to the system calls, but can
access them through an application programming interface (API). The functions
that are included in the API invoke the actual system calls. System
call provides the services of the operating system to the user programs via
Application Program Interface(API).
• By using the API, certain benefits can be gained:
– Portability: as long a system supports an API, any program using that API can compile
and run.
– Ease of Use: using the API can be significantly easier then using the actual system call.
System Call Parameters:
Three general methods exist for passing parameters to the OS:
1. Parameters can be passed in registers.
2. When there are more parameters than registers, parameters can be stored in a block
and the block address can be passed as a parameter to a register.
3. Parameters can also be pushed on or popped off the stack by the operating system.
Fig. Passing of parameters as a table
Types of System Calls: There are 5 different categories of system calls
1. Process Control: A running program needs to be able to stop execution either
normally or abnormally. When execution is stopped abnormally, often a dump of
memory is taken and can be examined with a debugger.
2. File Management: Some common system calls are create, delete, read, write, reposition,
or close. Also, there is a need to determine the file attributes – get and set file
attribute. Many times the OS provides an API to make these system calls.
3. Device Management: Process usually require several resources to execute, if these
resources are available, they will be granted and control returned to the user
process. These resources are also thought of as devices. Some are physical, such as a
video card, and others are abstract, such as a file.
• User programs request the device, and when finished they release the device. Similar
to files, we can read, write, and reposition the device.
4. Information Management: Some system calls exist purely for transferring
information between the user program and the operating system. An example of
this is time, or date.
• The OS also keeps information about all its processes and provides system calls to
report this information.
5. Communication: There are two models of interprocess communication, the message-
passing model and the shared memory model.
a. Message-passing uses a common mailbox to pass messages between processes.
b. Shared memory use certain system calls to create and gain access to create and gain
access to regions of memory owned by other processes. The two processes exchange
information by reading and writing in the shared data.
1. Process Control:
– Load,execute
– end, abort
– create process , terminate
process
– get/set process attributes
– wait for time, wait
event, signal event
– allocate/free memory
2. File Management
– create file, delete file
– open, close
– read, write, reposition
– get/set file attributes
3. Device Management
– request device, release device
– read, write, reposition
– get/set device attributes
– logically attach or detach
devices
4. Information Maintenance
– get/set time or date
– get/set system data
– get/set process, file, or device
attributes
5. Communication
– create, delete communication
connection
– send, receive messages
– transfer status information
– attach or detach remote devices
SYSTEM CALLS WINDOWS UNIX
Process Control
CreateProcess()
ExitProcess()
WaitForSingleObject()
fork()
exit()
wait()
File Manipulation
CreateFile()
ReadFile()
WriteFile()
CloseHandle()
open()
read()
write()
close()
Device Manipulation
SetConsoleMode()
ReadConsole()
WriteConsole()
ioctl()
read()
write()
Information
Maintenance
GetCurrentProcessID()
SetTimer()
Sleep()
getpid()
alarm()
sleep()
Communication
CreatePipe()
CreateFileMapping()
MapViewOfFile()
pipe()
shmget()
mmap()
Protection
SetFileSecurity()
InitlializeSecurityDescriptor()
SetSecurityDescriptorGroup()
chmod()
umask()
chown()
Services Provided by System Calls :
• Process creation and management
• Main memory management
• File Access, Directory and File system management
• Device handling(I/O)
• Protection
• Networking, etc.
I/O STRUCTURE
System Bus Structure :
• Bus: “a common electrical pathway between multiple devices”
• Address lines (unidirectional, generated by CPU)
• Data lines (bidirectional)
• Control lines (individual lines specify size of data transfer, direction, timing,
interrupts, etc).
I/O INTERRUPTS:
I/O INTERRUPTS:
FIG. DEVICE STATUS TABLE
I/O STRUCTURE
Direct Memory Access(DMA) : For devices that transfer large quantities of data ( such
as disk controllers ), it is wasteful to tie up the CPU transferring data in and out of
registers one byte at a time. Instead this work can be off-loaded to a special
processor, known as the Direct Memory Access, DMA, Controller.
• The host issues a command to the DMA controller, indicating the location where the
data is located, the location where the data is to be transferred to, and the number of
bytes of data to transfer. The DMA controller handles the data transfer, and then
interrupts the CPU when the transfer is complete.
• A simple DMA controller is a standard component in modern PCs, and many bus-
mastering I/O cards contain their own DMA hardware. Handshaking between DMA
controllers and their devices is accomplished through two wires called the DMA-
request and DMA-acknowledge wires.
• While the DMA transfer is going on the CPU does not have access to the PCI bus
( including main memory ), but it does have access to its internal registers and
primary and secondary caches.
• DMA can be done in terms of either physical addresses or virtual addresses that are
mapped to physical addresses. The latter approach is known as Direct Virtual
Memory Access, DVMA, and allows direct data transfer from one memory-mapped
device to another without using the main memory chips.
Direct DMA access by user processes can speed up operations, but is generally
forbidden by modern systems for security and protection reasons. ( I.e. DMA is a
kernel-mode operation. )
Fig. Steps in a DMA transfer
STORAGE STRUCTURE
• INTRODUCTION
• TYPES OF MEMORY
• REGISTER AND CACHE MEMORY
• REGISTER
• VOLATILE MEMORY
• NON VOLATILE MEMORY
STORAGE STRUCTURE
• INTRODUCTION
In computing memory refers to the physical devices used to store programs or data on a
temporary or permanent basis for use in computer or the digital electronic devices.
REGISTER:
• The register is the small set of data holding places that are part of a
computer processor.
• A register may hold a computer instruction, a storage address, or any kind
of data(such as a bit sequence or individual characters).
CACHE:
Cache memory is a Smaller, faster and expensive memory that stores the copies of
data that need to be accessed frequently from the main memory.
Two Types of Cache Memories:
1. PRIMARY CACHE: knows as ‘L1 cache’ or ‘internal cache’, located inside the
CPU.
2. SECONDARY CACHE: knows as ‘L2 cache’ or ‘External cache’, located on
motherboard of a computer.
Types of Cache Memory in a CPU
A Cache is used by the CPU to access data from the main memory in short
time. It is a small and very fast temporary storage memory. It is designed
to speed up the transfer of data or instructions. CPU Cache is located
inside or near to the CPU chip. The data/instructions which are most
recently or frequently used by the CPU are stored in CPU. A copy of
data/instructions is stored as a cache when the CPU uses them for the first
time which retrieved from RAM. The next time when CPU needs the
data/instruction, it looks in the cache. If the required data/instruction is
found there, then it is retrieved from the cache memory instead of main
memory.
Fig. three level cache organization
Types/Levels of cache memory
• A computer has several different levels of cache memory. All levels of cache memory are
faster than the RAM. The cache which is closer to the CPU is always faster than the other
levels but it costs more and stores less data than other levels. The types/levels of cache
memory are explained below.
Level 1 or L1 Cache Memory
• The L1 cache memory is built on processor chip and it is very fast because it runs on the speed
of the processor. It is also called primary or internal cache. It has less memory compared to
other levels of cache and can store up to the 64kb cache memory. This cache is made of SRAM
(Static RAM). Each time the processor requests information from memory, the cache
controller on the chip uses special circuitry to first check if the memory data is already in the
cache. If it is present, then the system is spared from the time-consuming access to the main
memory.
Level 2 or L2 Cache Memory
• The L2 cache memory is larger but slower than L1 cache. It is used to see recent accesses that
are not picked by the L1 cache and it usually stores 64kb to the 2MB cache memory. An L2
cache is also found on the CPU. If L1 and L2 cache are used together, then the missing
information that is not present in the L1 cache can be retrieved quickly from the L2 cache.
Like L1 caches, L2 caches are composed of SRAM but they are larger. L2 is usually a separate
static RAM (SRAM) chip and it is located between the CPU and DRAM (Main memory).
Level 3 or L3 Cache Memory
• The L3 Cache memory is an enhanced form of memory present on the motherboard of the
computer. It is an extra cache built into the motherboard between the processor and main
memory to speed up the processing operations. It reduces the time gap between request and
retrieving of the data and instructions much more quickly than the main memory. L3 cache is
being used with processors nowadays, having more than 3MB of storage in it.
•
1.8.3 Caching
Caching is an important principle of computer
systems. Information is normally kept in some storage system
(such as main memory). As it is used, it is copied into a faster
storage system—the cache—on a temporary basis. When we
need a particular piece of information, we first check whether it
is in the cache. If it is, we use the information directly from the
cache; if it is not, we use the information from the source, putting
a copy in the cache under the assumption that we will need it
again soon.
Main memory can be viewed as a fast cache for secondary
storage, since data in secondary storage must be copied into
main memory for use, and data must be in main memory before
being moved to secondary storage for safekeeping. At the highest
level, the operating system may maintain a cache of file-system
data in main memory Also, electronic RAM disks (also known
as solid-state disks) may be used for high-speed storage that is
accessed through the file-system interface.
memory
SYSTEM DESIGN AND IMPLEMENTATION
• Design goals
• Mechanisms and policies
• Implementation
• An operating system is a construct that allows
the user application programs to interact with
the system hardware. Operating system by
itself does not provide any function but it
provides an atmosphere in which different
applications and programs can do useful
work.
• There are many problems that can occur while
designing and implementing an operating
system. These are covered in operating system
design and implementation.
Operating System Design Goals
• It is quite complicated to define all the goals and specifications
of the operating system while designing it. The design
changes depending on the type of the operating system i.e if it
is batch system, time shared system, single user system, multi
user system, distributed system etc.
• There are basically two types of goals while designing an
operating system. These are:
1. User Goals: The operating system should be convenient, easy
to use, reliable, safe and fast according to the users. However,
these specifications are not very useful as there is no set
method to achieve these goals.
2. System Goals: The operating system should be easy to design,
implement and maintain. These are specifications required by
those who create, maintain and operate the operating system.
But there is not specific method to achieve these goals as well.
Operating System Mechanisms and Policies
• There is no specific way to design an operating system as it
is a highly creative task. However, there are general
software principles that are applicable to all operating
systems.
• A subtle difference between mechanism and policy is that
mechanism shows how to do something and policy shows
what to do. Policies may change over time and this would
lead to changes in mechanism. So, it is better to have a
general mechanism that would require few changes even
when a policy change occurs.
Ex: If the mechanism and policy are independent, then few
changes are required in mechanism if policy changes. If a
policy favours I/O intensive processes over CPU intensive
processes, then a policy change to preference of CPU
intensive processes will not change the mechanism.
Operating System Implementation
• The operating system needs to be
implemented after it is designed. Earlier they
were written in assembly language but now
higher level languages are used.
• The first system not written in assembly
language was the Master Control Program
(MCP) for Burroughs Computers.

More Related Content

What's hot

introduction to operating system
introduction to operating systemintroduction to operating system
introduction to operating system
HAMZA AHMED
 
Chapter01 os7e
Chapter01 os7eChapter01 os7e
Chapter01 os7e
QAISAR NISAR
 
OPERATING SYSTEM
OPERATING SYSTEM OPERATING SYSTEM
OPERATING SYSTEM
Khehra Saab
 
Ch1
Ch1Ch1
Operating System
Operating SystemOperating System
Operating System
Esraa Muhammad
 
Os notes 1_5
Os notes 1_5Os notes 1_5
Os notes 1_5
NagarajMatheswaran
 
Lec # 1 chapter 2
Lec # 1 chapter 2Lec # 1 chapter 2
Lec # 1 chapter 2
rereelshahed
 
Ch1
Ch1Ch1
OPERATING SYSTEM
OPERATING SYSTEMOPERATING SYSTEM
Os concepts
Os conceptsOs concepts
Os concepts
Sudheesh P Enathu
 
Computer system organization
Computer system organizationComputer system organization
Computer system organization
Syed Zaid Irshad
 
Nt introduction(os)
Nt introduction(os)Nt introduction(os)
Nt introduction(os)
NehaTadam
 
Operating System Overview
Operating System OverviewOperating System Overview
Operating System Overview
Anas Ebrahim
 
os assignment -individual presenation.pptx
os assignment -individual presenation.pptxos assignment -individual presenation.pptx
os assignment -individual presenation.pptx
EngrAliSarfrazSiddiq
 
Introduction to operating syatem
Introduction to operating syatemIntroduction to operating syatem
Introduction to operating syatem
Rafi Dar
 
Operating system
Operating systemOperating system
Operating system
Sonika koul
 

What's hot (16)

introduction to operating system
introduction to operating systemintroduction to operating system
introduction to operating system
 
Chapter01 os7e
Chapter01 os7eChapter01 os7e
Chapter01 os7e
 
OPERATING SYSTEM
OPERATING SYSTEM OPERATING SYSTEM
OPERATING SYSTEM
 
Ch1
Ch1Ch1
Ch1
 
Operating System
Operating SystemOperating System
Operating System
 
Os notes 1_5
Os notes 1_5Os notes 1_5
Os notes 1_5
 
Lec # 1 chapter 2
Lec # 1 chapter 2Lec # 1 chapter 2
Lec # 1 chapter 2
 
Ch1
Ch1Ch1
Ch1
 
OPERATING SYSTEM
OPERATING SYSTEMOPERATING SYSTEM
OPERATING SYSTEM
 
Os concepts
Os conceptsOs concepts
Os concepts
 
Computer system organization
Computer system organizationComputer system organization
Computer system organization
 
Nt introduction(os)
Nt introduction(os)Nt introduction(os)
Nt introduction(os)
 
Operating System Overview
Operating System OverviewOperating System Overview
Operating System Overview
 
os assignment -individual presenation.pptx
os assignment -individual presenation.pptxos assignment -individual presenation.pptx
os assignment -individual presenation.pptx
 
Introduction to operating syatem
Introduction to operating syatemIntroduction to operating syatem
Introduction to operating syatem
 
Operating system
Operating systemOperating system
Operating system
 

Similar to Os unit i

Operating System-adi.pdf
Operating System-adi.pdfOperating System-adi.pdf
Operating System-adi.pdf
Prof. Dr. K. Adisesha
 
UNIT 1 - UNDERSTANDINGTHE PRINCIPLES OF OPERATING SYSTEM.pptx
UNIT 1 - UNDERSTANDINGTHE PRINCIPLES OF OPERATING SYSTEM.pptxUNIT 1 - UNDERSTANDINGTHE PRINCIPLES OF OPERATING SYSTEM.pptx
UNIT 1 - UNDERSTANDINGTHE PRINCIPLES OF OPERATING SYSTEM.pptx
LeahRachael
 
1. Introduction to OS.ppt
1. Introduction to OS.ppt1. Introduction to OS.ppt
1. Introduction to OS.ppt
SATHYABAMAMADHANKUMA
 
Overview Of Operating System and its Basics
Overview Of Operating System and its BasicsOverview Of Operating System and its Basics
Overview Of Operating System and its Basics
Chandrakant Divate
 
Overview Of Operating Systems and its Basics
Overview Of Operating Systems and its BasicsOverview Of Operating Systems and its Basics
Overview Of Operating Systems and its Basics
Chandrakant Divate
 
4 Module - Operating Systems Configuration and Use by Mark John Lado
4 Module - Operating Systems Configuration and Use by Mark John Lado4 Module - Operating Systems Configuration and Use by Mark John Lado
4 Module - Operating Systems Configuration and Use by Mark John Lado
Mark John Lado, MIT
 
Operating systems
Operating systemsOperating systems
Operating systems
Ujjwal 'Shanu'
 
os unit 1 (2).pptx. introduction to operating systems
os unit 1 (2).pptx. introduction to operating systemsos unit 1 (2).pptx. introduction to operating systems
os unit 1 (2).pptx. introduction to operating systems
ssuser6aef00
 
Operating Systems
Operating SystemsOperating Systems
Operating Systems
vampugani
 
Unit I OS.pdf
Unit I OS.pdfUnit I OS.pdf
Unit I OS.pdf
UmaYadav45
 
OS chapter 1.pptx
OS chapter 1.pptxOS chapter 1.pptx
OS chapter 1.pptx
StBulteBelay
 
OS chapter 1.pptx
OS chapter 1.pptxOS chapter 1.pptx
OS chapter 1.pptx
StBulteBelay
 
Operating system Concepts
Operating system Concepts Operating system Concepts
Operating system Concepts
RANVIJAY GAUR
 
Operating system concepts
Operating system conceptsOperating system concepts
Operating system concepts
Arnav Chowdhury
 
OperatingSystemFeature.pptx
OperatingSystemFeature.pptxOperatingSystemFeature.pptx
OperatingSystemFeature.pptx
CharuJain396881
 
Understanding Basics of OS
Understanding Basics of OSUnderstanding Basics of OS
Understanding Basics of OS
E.M.G.yadava womens college
 
Operating systems1[1]
Operating systems1[1]Operating systems1[1]
Operating systems1[1]
Ujjwal 'Shanu'
 
chapter2.pptx
chapter2.pptxchapter2.pptx
chapter2.pptx
PardhisCreation
 
Operating system
Operating systemOperating system
Operating system
Neha Saxena
 
Introduction to Operating System
Introduction to Operating SystemIntroduction to Operating System
Introduction to Operating System
Divya S
 

Similar to Os unit i (20)

Operating System-adi.pdf
Operating System-adi.pdfOperating System-adi.pdf
Operating System-adi.pdf
 
UNIT 1 - UNDERSTANDINGTHE PRINCIPLES OF OPERATING SYSTEM.pptx
UNIT 1 - UNDERSTANDINGTHE PRINCIPLES OF OPERATING SYSTEM.pptxUNIT 1 - UNDERSTANDINGTHE PRINCIPLES OF OPERATING SYSTEM.pptx
UNIT 1 - UNDERSTANDINGTHE PRINCIPLES OF OPERATING SYSTEM.pptx
 
1. Introduction to OS.ppt
1. Introduction to OS.ppt1. Introduction to OS.ppt
1. Introduction to OS.ppt
 
Overview Of Operating System and its Basics
Overview Of Operating System and its BasicsOverview Of Operating System and its Basics
Overview Of Operating System and its Basics
 
Overview Of Operating Systems and its Basics
Overview Of Operating Systems and its BasicsOverview Of Operating Systems and its Basics
Overview Of Operating Systems and its Basics
 
4 Module - Operating Systems Configuration and Use by Mark John Lado
4 Module - Operating Systems Configuration and Use by Mark John Lado4 Module - Operating Systems Configuration and Use by Mark John Lado
4 Module - Operating Systems Configuration and Use by Mark John Lado
 
Operating systems
Operating systemsOperating systems
Operating systems
 
os unit 1 (2).pptx. introduction to operating systems
os unit 1 (2).pptx. introduction to operating systemsos unit 1 (2).pptx. introduction to operating systems
os unit 1 (2).pptx. introduction to operating systems
 
Operating Systems
Operating SystemsOperating Systems
Operating Systems
 
Unit I OS.pdf
Unit I OS.pdfUnit I OS.pdf
Unit I OS.pdf
 
OS chapter 1.pptx
OS chapter 1.pptxOS chapter 1.pptx
OS chapter 1.pptx
 
OS chapter 1.pptx
OS chapter 1.pptxOS chapter 1.pptx
OS chapter 1.pptx
 
Operating system Concepts
Operating system Concepts Operating system Concepts
Operating system Concepts
 
Operating system concepts
Operating system conceptsOperating system concepts
Operating system concepts
 
OperatingSystemFeature.pptx
OperatingSystemFeature.pptxOperatingSystemFeature.pptx
OperatingSystemFeature.pptx
 
Understanding Basics of OS
Understanding Basics of OSUnderstanding Basics of OS
Understanding Basics of OS
 
Operating systems1[1]
Operating systems1[1]Operating systems1[1]
Operating systems1[1]
 
chapter2.pptx
chapter2.pptxchapter2.pptx
chapter2.pptx
 
Operating system
Operating systemOperating system
Operating system
 
Introduction to Operating System
Introduction to Operating SystemIntroduction to Operating System
Introduction to Operating System
 

More from SandhyaTatekalva

Uml diagrams usecase
Uml diagrams usecaseUml diagrams usecase
Uml diagrams usecase
SandhyaTatekalva
 
Staffing
StaffingStaffing
San se unit
San se unitSan se unit
San se unit
SandhyaTatekalva
 
Os unit 3
Os unit 3Os unit 3
Os unit 3
SandhyaTatekalva
 
Marketing
MarketingMarketing
Marketing
SandhyaTatekalva
 
E r diagram
E r diagramE r diagram
E r diagram
SandhyaTatekalva
 
Em unit v
Em unit vEm unit v
Em unit v
SandhyaTatekalva
 
communication
communicationcommunication
communication
SandhyaTatekalva
 
software engineering
software engineeringsoftware engineering
software engineering
SandhyaTatekalva
 

More from SandhyaTatekalva (9)

Uml diagrams usecase
Uml diagrams usecaseUml diagrams usecase
Uml diagrams usecase
 
Staffing
StaffingStaffing
Staffing
 
San se unit
San se unitSan se unit
San se unit
 
Os unit 3
Os unit 3Os unit 3
Os unit 3
 
Marketing
MarketingMarketing
Marketing
 
E r diagram
E r diagramE r diagram
E r diagram
 
Em unit v
Em unit vEm unit v
Em unit v
 
communication
communicationcommunication
communication
 
software engineering
software engineeringsoftware engineering
software engineering
 

Recently uploaded

LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
RAHUL
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
NgcHiNguyn25
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
simonomuemu
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 

Recently uploaded (20)

LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 

Os unit i

  • 1. What is an operating system? An operating system is an Interface between a computer user and the computer hardware. An operating system is a software which performs all the basic tasks like file management, memory management, process management, handling input and output, and controlling peripheral devices such as disk and printer drives. Definition: “An operating system is a program that acts ass an interface between the user and the computer hardware and controls the execution of all kinds of programs”
  • 2. Fig. Conceptual view of operating system
  • 3. An operating system (OS) is the program that, after being initially loaded into the computer by a boot program, manages all the other programs in a computer. The other programs are called applications or application programs. The application programs make use of the operating system by making requests for services through a defined application program interface (API). In addition, users can interact directly with the operating system through a user interface such as a command line or a graphical user interface (GUI).
  • 4. Important Functions of OS: • Process management • Memory management • Device management • File management • Security • Control over system performance • Job accounting • Error detecting aids • Coordination among different softwares and users.
  • 5. Types of OS: Operating systems are there from the very first computer generation and they keep evolving with time. The following are some of the important types of operating systems which are most commonly used. 1. Mainframe Systems • Batch systems • Multi programmed systems • Time-sharing systems 2. Desktop systems 3. Multiprocessor systems 4. Distributed systems • Client-server systems • Peer-to-peer systems 5. Clustered systems 6. Real-time systems • Hard real-time systems • Soft real-time systems 7. Hand-held systems
  • 6. • 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.
  • 7. 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. 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. Advantages: • Provides the advantage of quick response. • Avoids duplication of software. • Reduces CPU idle time. Disadvantages: • Problem of reliability. • Question of security and integrity of user programs and data. • Problem of data communication.
  • 8. 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. Advantages : • With resource sharing facility, a user at one site may be able to use the resources available at another. • Speedup 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.
  • 9. Network operating System • A Network Operating System runs on a server and provides the server the capability 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. • Ex: Microsoft Windows Server 2003, Microsoft Windows Server 2008, UNIX, Linux, Mac OS X, Novell NetWare, and BSD. Advantages: • Centralized servers are highly stable. • Security is server managed. • Upgrades to new technologies and hardware can be easily integrated into the system. • Remote access to servers is possible from different locations and types of systems. Disadvantages: • High cost of buying and running a server. • Dependency on a central location for most operations. • Regular maintenance and updates are required.
  • 10. 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 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 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. For example, Scientific experiments, medical imaging systems, industrial control systems, weapon systems, robots, air traffic control systems, etc. There are two types of real-time operating systems: 1. 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. 2. 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.
  • 11.
  • 12.
  • 13. SYSTEM CALLS • In computing, a system call is the programmatic way in which a computer program requests a service from the kernel of the operating system it is executed on. A system call is a way for programs to interact with the operating system. • Application developers often do not have direct access to the system calls, but can access them through an application programming interface (API). The functions that are included in the API invoke the actual system calls. System call provides the services of the operating system to the user programs via Application Program Interface(API). • By using the API, certain benefits can be gained: – Portability: as long a system supports an API, any program using that API can compile and run. – Ease of Use: using the API can be significantly easier then using the actual system call.
  • 14. System Call Parameters: Three general methods exist for passing parameters to the OS: 1. Parameters can be passed in registers. 2. When there are more parameters than registers, parameters can be stored in a block and the block address can be passed as a parameter to a register. 3. Parameters can also be pushed on or popped off the stack by the operating system. Fig. Passing of parameters as a table
  • 15. Types of System Calls: There are 5 different categories of system calls 1. Process Control: A running program needs to be able to stop execution either normally or abnormally. When execution is stopped abnormally, often a dump of memory is taken and can be examined with a debugger. 2. File Management: Some common system calls are create, delete, read, write, reposition, or close. Also, there is a need to determine the file attributes – get and set file attribute. Many times the OS provides an API to make these system calls. 3. Device Management: Process usually require several resources to execute, if these resources are available, they will be granted and control returned to the user process. These resources are also thought of as devices. Some are physical, such as a video card, and others are abstract, such as a file. • User programs request the device, and when finished they release the device. Similar to files, we can read, write, and reposition the device. 4. Information Management: Some system calls exist purely for transferring information between the user program and the operating system. An example of this is time, or date. • The OS also keeps information about all its processes and provides system calls to report this information. 5. Communication: There are two models of interprocess communication, the message- passing model and the shared memory model. a. Message-passing uses a common mailbox to pass messages between processes. b. Shared memory use certain system calls to create and gain access to create and gain access to regions of memory owned by other processes. The two processes exchange information by reading and writing in the shared data.
  • 16. 1. Process Control: – Load,execute – end, abort – create process , terminate process – get/set process attributes – wait for time, wait event, signal event – allocate/free memory 2. File Management – create file, delete file – open, close – read, write, reposition – get/set file attributes 3. Device Management – request device, release device – read, write, reposition – get/set device attributes – logically attach or detach devices 4. Information Maintenance – get/set time or date – get/set system data – get/set process, file, or device attributes 5. Communication – create, delete communication connection – send, receive messages – transfer status information – attach or detach remote devices
  • 17. SYSTEM CALLS WINDOWS UNIX Process Control CreateProcess() ExitProcess() WaitForSingleObject() fork() exit() wait() File Manipulation CreateFile() ReadFile() WriteFile() CloseHandle() open() read() write() close() Device Manipulation SetConsoleMode() ReadConsole() WriteConsole() ioctl() read() write() Information Maintenance GetCurrentProcessID() SetTimer() Sleep() getpid() alarm() sleep() Communication CreatePipe() CreateFileMapping() MapViewOfFile() pipe() shmget() mmap() Protection SetFileSecurity() InitlializeSecurityDescriptor() SetSecurityDescriptorGroup() chmod() umask() chown()
  • 18. Services Provided by System Calls : • Process creation and management • Main memory management • File Access, Directory and File system management • Device handling(I/O) • Protection • Networking, etc.
  • 20. System Bus Structure : • Bus: “a common electrical pathway between multiple devices” • Address lines (unidirectional, generated by CPU) • Data lines (bidirectional) • Control lines (individual lines specify size of data transfer, direction, timing, interrupts, etc).
  • 24. I/O STRUCTURE Direct Memory Access(DMA) : For devices that transfer large quantities of data ( such as disk controllers ), it is wasteful to tie up the CPU transferring data in and out of registers one byte at a time. Instead this work can be off-loaded to a special processor, known as the Direct Memory Access, DMA, Controller. • The host issues a command to the DMA controller, indicating the location where the data is located, the location where the data is to be transferred to, and the number of bytes of data to transfer. The DMA controller handles the data transfer, and then interrupts the CPU when the transfer is complete. • A simple DMA controller is a standard component in modern PCs, and many bus- mastering I/O cards contain their own DMA hardware. Handshaking between DMA controllers and their devices is accomplished through two wires called the DMA- request and DMA-acknowledge wires. • While the DMA transfer is going on the CPU does not have access to the PCI bus ( including main memory ), but it does have access to its internal registers and primary and secondary caches. • DMA can be done in terms of either physical addresses or virtual addresses that are mapped to physical addresses. The latter approach is known as Direct Virtual Memory Access, DVMA, and allows direct data transfer from one memory-mapped device to another without using the main memory chips. Direct DMA access by user processes can speed up operations, but is generally forbidden by modern systems for security and protection reasons. ( I.e. DMA is a kernel-mode operation. )
  • 25. Fig. Steps in a DMA transfer
  • 26. STORAGE STRUCTURE • INTRODUCTION • TYPES OF MEMORY • REGISTER AND CACHE MEMORY • REGISTER • VOLATILE MEMORY • NON VOLATILE MEMORY
  • 27. STORAGE STRUCTURE • INTRODUCTION In computing memory refers to the physical devices used to store programs or data on a temporary or permanent basis for use in computer or the digital electronic devices.
  • 28.
  • 29. REGISTER: • The register is the small set of data holding places that are part of a computer processor. • A register may hold a computer instruction, a storage address, or any kind of data(such as a bit sequence or individual characters).
  • 30. CACHE: Cache memory is a Smaller, faster and expensive memory that stores the copies of data that need to be accessed frequently from the main memory. Two Types of Cache Memories: 1. PRIMARY CACHE: knows as ‘L1 cache’ or ‘internal cache’, located inside the CPU. 2. SECONDARY CACHE: knows as ‘L2 cache’ or ‘External cache’, located on motherboard of a computer.
  • 31. Types of Cache Memory in a CPU A Cache is used by the CPU to access data from the main memory in short time. It is a small and very fast temporary storage memory. It is designed to speed up the transfer of data or instructions. CPU Cache is located inside or near to the CPU chip. The data/instructions which are most recently or frequently used by the CPU are stored in CPU. A copy of data/instructions is stored as a cache when the CPU uses them for the first time which retrieved from RAM. The next time when CPU needs the data/instruction, it looks in the cache. If the required data/instruction is found there, then it is retrieved from the cache memory instead of main memory. Fig. three level cache organization
  • 32. Types/Levels of cache memory • A computer has several different levels of cache memory. All levels of cache memory are faster than the RAM. The cache which is closer to the CPU is always faster than the other levels but it costs more and stores less data than other levels. The types/levels of cache memory are explained below. Level 1 or L1 Cache Memory • The L1 cache memory is built on processor chip and it is very fast because it runs on the speed of the processor. It is also called primary or internal cache. It has less memory compared to other levels of cache and can store up to the 64kb cache memory. This cache is made of SRAM (Static RAM). Each time the processor requests information from memory, the cache controller on the chip uses special circuitry to first check if the memory data is already in the cache. If it is present, then the system is spared from the time-consuming access to the main memory. Level 2 or L2 Cache Memory • The L2 cache memory is larger but slower than L1 cache. It is used to see recent accesses that are not picked by the L1 cache and it usually stores 64kb to the 2MB cache memory. An L2 cache is also found on the CPU. If L1 and L2 cache are used together, then the missing information that is not present in the L1 cache can be retrieved quickly from the L2 cache. Like L1 caches, L2 caches are composed of SRAM but they are larger. L2 is usually a separate static RAM (SRAM) chip and it is located between the CPU and DRAM (Main memory). Level 3 or L3 Cache Memory • The L3 Cache memory is an enhanced form of memory present on the motherboard of the computer. It is an extra cache built into the motherboard between the processor and main memory to speed up the processing operations. It reduces the time gap between request and retrieving of the data and instructions much more quickly than the main memory. L3 cache is being used with processors nowadays, having more than 3MB of storage in it. •
  • 33. 1.8.3 Caching Caching is an important principle of computer systems. Information is normally kept in some storage system (such as main memory). As it is used, it is copied into a faster storage system—the cache—on a temporary basis. When we need a particular piece of information, we first check whether it is in the cache. If it is, we use the information directly from the cache; if it is not, we use the information from the source, putting a copy in the cache under the assumption that we will need it again soon. Main memory can be viewed as a fast cache for secondary storage, since data in secondary storage must be copied into main memory for use, and data must be in main memory before being moved to secondary storage for safekeeping. At the highest level, the operating system may maintain a cache of file-system data in main memory Also, electronic RAM disks (also known as solid-state disks) may be used for high-speed storage that is accessed through the file-system interface.
  • 35. SYSTEM DESIGN AND IMPLEMENTATION • Design goals • Mechanisms and policies • Implementation
  • 36. • An operating system is a construct that allows the user application programs to interact with the system hardware. Operating system by itself does not provide any function but it provides an atmosphere in which different applications and programs can do useful work. • There are many problems that can occur while designing and implementing an operating system. These are covered in operating system design and implementation.
  • 37.
  • 38. Operating System Design Goals • It is quite complicated to define all the goals and specifications of the operating system while designing it. The design changes depending on the type of the operating system i.e if it is batch system, time shared system, single user system, multi user system, distributed system etc. • There are basically two types of goals while designing an operating system. These are: 1. User Goals: The operating system should be convenient, easy to use, reliable, safe and fast according to the users. However, these specifications are not very useful as there is no set method to achieve these goals. 2. System Goals: The operating system should be easy to design, implement and maintain. These are specifications required by those who create, maintain and operate the operating system. But there is not specific method to achieve these goals as well.
  • 39. Operating System Mechanisms and Policies • There is no specific way to design an operating system as it is a highly creative task. However, there are general software principles that are applicable to all operating systems. • A subtle difference between mechanism and policy is that mechanism shows how to do something and policy shows what to do. Policies may change over time and this would lead to changes in mechanism. So, it is better to have a general mechanism that would require few changes even when a policy change occurs. Ex: If the mechanism and policy are independent, then few changes are required in mechanism if policy changes. If a policy favours I/O intensive processes over CPU intensive processes, then a policy change to preference of CPU intensive processes will not change the mechanism.
  • 40. Operating System Implementation • The operating system needs to be implemented after it is designed. Earlier they were written in assembly language but now higher level languages are used. • The first system not written in assembly language was the Master Control Program (MCP) for Burroughs Computers.