SlideShare a Scribd company logo
1 of 28
UNIT 4: UNDERSTANDING
VIRTUAL MEMORY
Virtual Memory
• Virtual memory is implemented by demand paging.
• VM is the separation of user logical memory from physical memory.
• Demand paging can be described as a memory management technique that is
used in operating systems to improve memory usage and system
performance.
• Demand paging is a technique used in virtual memory systems where pages
enter main memory only when requested or needed by the CPU.
• In demand paging, the operating system loads only the necessary pages of a
program into memory at runtime, instead of loading the entire program into
memory at the start.
• A page fault occurred when the program needed to access a page that is not
currently in memory. The operating system then loads the required pages
from the disk into memory and updates the page tables accordingly. This
process is transparent to the running program and it continues to run as if the
page had always been in memory.
Why Virtual Memory?
• Most programs do not need to keep everything resident to run
efficiently:
• Most error-handling routines are used rarely.
• Arrays and other data structures have morestorage allocated than
they usually need.
• Certain program features are rarely used.
Concept of Demand Page…..
• Demand paging follows that pages should only be brought into memory if
the executing process demands them. This is often referred to as lazy
evaluation as only those pages demanded by the process are swapped
from secondary storage to main memory.
• Contrast this to pure swapping, where all memory for a process is swapped
from secondary storage to main memory during the process startup.
• Commonly, to achieve this process a page table implementation is used.
The page table maps logical memory to physical memory.
• The page table uses a bitwise operator to mark if a page is valid or invalid.
A valid page is one that currently resides in main memory.
• An invalid page is one that currently resides in secondary memory.
Demand Paging in Operating system
Benefits of Virtual Memory
• Efficient use of physical memory: Query paging allows for more efficient
use because only the necessary pages are loaded into memory at any given
time.
• Support for larger programs: Programs can be larger than the physical
memory available on the system because only the necessary pages will be
loaded into memory.
• Faster program start: Because only part of a program is initially loaded into
memory, programs can start faster than if the entire program were loaded
at once.
• Reduce memory usage: Query paging can help reduce the amount of
memory a program needs, which can improve system performance by
reducing the amount of disk I/O required.
Drawbacks of the Demand Paging
• Page Fault Overload: The process of swapping pages between
memory and disk can cause a performance overhead, especially if the
program frequently accesses pages that are not currently in memory.
• Degraded performance: If a program frequently accesses pages that
are not currently in memory, the system spends a lot of time
swapping out pages, which degrades performance.
• Fragmentation: Query paging can cause physical memory
fragmentation, degrading system performance over time.
• Complexity: Implementing query paging in an operating system can
be complex, requiring complex algorithms and data structures to
manage page tables and swap space.
Introduction to File Systems
• All file systems consist of structures necessary for storing and
managing data. These structures typically include an operating system
boot record, directories, and files.
• Functions of a File System:
• Tracking allocated and free space
• Maintaining directories and file names
• Tracking where each file is physically stored on the disk
Definition:
• Computers use particular kinds of file systems to store and organize
data on media, such as a hard drive, the CDs, DVDs, and BDs in an
optical drive or on a flash drive.
• Any place that a PC stores data is employing the use of some type of
file system. A file system can be thought of as an index or database
containing the physical location of every piece of data on a hard drive.
• A file system is setup on a drive during a format. See How To Format a
Hard Drive for more information.
File System
• File system is the part of the operating system which is responsible for file
management.
• It provides a mechanism to store the data and access to the file contents
including data and programs.
• Some Operating systems treats everything as a file for example Ubuntu.
• The File system takes care of the following issues
• File Structure: The task of the file system is to maintain an optimal file
structure.
• Recovering Free space: if file gets deleted its space is recovered
• disk space assignment to the files : Using disk scheduling algorithm
• tracking data location: We need to keep track of all the blocks on which
the part of the files reside.
Types of File Systems
• FAT File System
• NTFS File System
• Disk file systems
• Flash file systems
• Tape file systems
• Database file systems
• Transactional file systems
• Network file systems
• work file systems
• Shared disk file systems
• Special file systems
• Device file systems
FAT File System
• FAT12 - The initial version of the FAT file system, FAT12 was
introduced in 1977, even before MS-DOS, and was the primary file
system for Microsoft operating systems up to MS-DOS 4.0. FAT12
supports drive sizes up to 32MB.
• FAT16 - The second implementation of FAT was FAT16, introduced in
1988. FAT16 was the primary file system for MS-DOS 4.0 up to
Windows 95. FAT16 supports drive sizes up to 2GB.
• FAT32 - FAT32 is the latest version of the FAT file system. It was
introduced in 1996 for Windows 95 OSR2 users and was the primary
file system for consumer Windows versions through Windows ME.
FAT32 supports drive sizes up to 8TB.
NTFS File System
• Definition: New Technology File System (NTFS) is a file system that
was introduced by Microsoft in 1993 with Windows NT 3.1. NTFS
supports hard drive sizes up to 256TB.
• NTFS is the primary file system used in Microsoft's Windows 7,
Windows Vista, Windows XP, Windows 2000 and Windows NT
operating systems.
• The Windows Server line of operating systems also primarily use
NTFS.
• The File Allocation Table (FAT) file system was the primary file system
in Microsoft's older operating systems but it is still supported today
along with NTFS.
Disk file systems
• A disk file system takes advantages of the ability of disk storage media to
randomly address data in a short amount of time.
• Additional considerations include the speed of accessing data following that
initially requested and the anticipation that the following data may also be
requested. This permits multiple users (or processes) access to various data on
the disk without regard to the sequential location of the data.
• Examples include FAT (FAT12, FAT16, FAT32), exFAT, NTFS, HFS and HFS+, HPFS,
UFS, ext2, ext3, ext4, XFS, btrfs, ISO 9660, Files11, Veritas File System, VMFS,
ZFS, ReiserFS and UDF.
• Some disk file systems are journaling file systems or versioning file systems.
• Optical discs
• ISO 9660 and Universal Disk Format (UDF) are two common formats that target Compact
Discs, DVDs and Blu-ray discs. Mount Rainier is an extension to UDF supported by Linux 2.6
series and Windows Vista that facilitates rewriting to DVDs.
Flash file system
• A flash file system considers the special abilities, performance and
restrictions of flash memory devices.
• Frequently a disk file system can use a flash memory device as the
underlying storage media but it is much better to use a file system
specifically designed for a flash device.
Tape file systems
• A tape file system is a file system and tape format designed to store files on
tape in a self-describing form.
• Magnetic tapes are sequential storage media with significantly longer
random data access times than disks, posing challenges to the creation and
efficient management of a general-purpose file system.
• In a disk file system there is typically a master file directory, and a map of
used and free data regions.
• Any file additions, changes, or removals require updating the directory and
the used/free maps.
• Random access to data regions is measured in milliseconds so this system
works well for disks.
• Tape requires linear motion to wind and unwind potentially very long reels
of media. This tape motion may take several seconds to several minutes to
move the read/write head from one end of the tape to the other
Database file systems
• Another concept for file management is the idea of a database-based
file system. Instead of, or in addition to, hierarchical structured
management, files are identified by their characteristics, like type of
file, topic, author, or similar rich metadata.
Network file systems
• A network file system is a file system that acts as a client for a remote
file access protocol, providing access to files on a server.
• Examples of network file systems include clients for the NFS, AFS,
SMBprotocols, and file-system-like clients for FTP and WebDAV
Shared disk file systems
• A shared disk file system is one in which a number of machines
(usually servers) all have access to the same external disk subsystem
(usually a SAN).
• The file system arbitrates access to that subsystem, preventing write
collisions.
• Examples include GFS2 from Red Hat, GPFS from IBM, SFS from
DataPlow, CXFS from SGIand StorNext from Quantum Corporation.
Special file systems
• A special file system presents non-file elements of an operating
system as files so they can be acted on using file system APIs.
• This is most commonly done in Unix-like operating systems, but
devices are given file names in some non-Unix-like operating systems
as well.
Device file systems
• A device file system represents I/O devices and pseudo-devices as
files, called device files.
• Examples in Unix-like systems include devfs and, in Linux 2.6 systems,
udev.
• In non-Unix-like systems, such as TOPS-10 and other operating
systems influenced by it, where the full filename or pathname of a file
can include a device prefix, devices other than those containing file
systems are referred to by a device prefix specifying the device,
without anything following it.
Flat file systems
• In a flat file system, there are no subdirectories.
• When floppy disk media was first available this type of file system was
adequate due to the relatively small amount of data space available.
CP/M machines featured a flat file system, where files could be
assigned to one of 16 user areas and generic file operations narrowed
to work on one instead of defaulting to work on all of them. These
user areas were no more than special attributes associated with the
files, that is, it was not necessary to define specific quota for each of
these areas and files could be added to groups for as long as there
was still free storage space on the disk..
Aspects of file systems
• Space management
• File systems allocate space in a granular manner, usually multiple
physical units on the device. The file system is responsible for
organizing files and directories, and keeping track of which areas of
the media belong to which file and which are not being used. For
example, in Apple DOS of the early 1980s, 256-byte sectors on 140
kilobyte floppy disk used a track/sector map.
Filenames
• A filename (or file name) is used to identify a storage location in the
file system. Most file systems have restrictions on the length of
filenames. In some file systems, filenames are not case sensitive (i.e.,
filenames such as FOO and foo refer to the same file); in others,
filenames are case sensitive (i.e., the names FOO and foo refer to two
separate files).
Directories
• File systems typically have directories (also called folders) which allow the user to
group files into separate collections. This may be implemented by associating the
file name with an index in a table of contents or an inode in a Unix-like file
system.
• Directory structures may be flat (i.e. linear), or allow hierarchies where
directories may contain subdirectories.
• The first file system to support arbitrary hierarchies of directories was used in the
Multics operating system.
• The native file systems of Unix-like systems also support arbitrary directory
hierarchies, as do, for example, Apple's Hierarchical File System, and its successor
HFS+ in classic Mac OS (HFS+ is still used in Mac OS X), the FAT file system in MS-
DOS 2.0 and later and Microsoft Windows, the NTFS file system in the Windows
NT family of operating systems, and the ODS-2 (On-Disk Structure-2) and higher
levels of the Files-11 file system in OpenVMS.
File System Structure
• File System provide efficient access to the
disk by allowing data to be stored, located
and retrieved in a convenient way.
• A file System must be able to store the
file, locate the file and retrieve the file.
• Most of the Operating Systems use
layering approach for every task including
file systems.
• Every layer of the file system is
responsible for some activities.
• The image shown below, elaborates how
the file system is divided in different
layers, and also the functionality of each
layer.
File System Structure…
• When an application program asks for a file, the first request is directed to
the logical file system. The logical file system contains the Meta data of the
file and directory structure.
• If the application program doesn't have the required permissions of the file
then this layer will throw an error. Logical file systems also verify the path
to the file.
• Generally, files are divided into various logical blocks.
• Files are to be stored in the hard disk and to be retrieved from the hard
disk. Hard disk is divided into various tracks and sectors.
• Therefore, in order to store and retrieve the files, the logical blocks need to
be mapped to physical blocks. This mapping is done by File organization
module. It is also responsible for free space management.
File System Structure…
• Once File organization module decided which physical block the
application program needs, it passes this information to basic file
system.
• The basic file system is responsible for issuing the commands to I/O
control in order to fetch those blocks.
• I/O controls contain the codes by using which it can access hard disk.
These codes are known as device drivers.
• I/O controls are also responsible for handling interrupts.

More Related Content

Similar to UNIT 4-UNDERSTANDING VIRTUAL MEMORY.pptx

Similar to UNIT 4-UNDERSTANDING VIRTUAL MEMORY.pptx (20)

Conceptual framework storage devices (2)
Conceptual framework   storage devices (2)Conceptual framework   storage devices (2)
Conceptual framework storage devices (2)
 
OS UNIT4.pptx
OS UNIT4.pptxOS UNIT4.pptx
OS UNIT4.pptx
 
Os
OsOs
Os
 
Windows file system
Windows file systemWindows file system
Windows file system
 
Operating system
Operating systemOperating system
Operating system
 
9781111306366 ppt ch4
9781111306366 ppt ch49781111306366 ppt ch4
9781111306366 ppt ch4
 
File systems for Embedded Linux
File systems for Embedded LinuxFile systems for Embedded Linux
File systems for Embedded Linux
 
11. operating-systems-part-1
11. operating-systems-part-111. operating-systems-part-1
11. operating-systems-part-1
 
Operating Systems.pptx
Operating Systems.pptxOperating Systems.pptx
Operating Systems.pptx
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptx
 
Hadoop Distributed File System for Big Data Analytics
Hadoop Distributed File System for Big Data AnalyticsHadoop Distributed File System for Big Data Analytics
Hadoop Distributed File System for Big Data Analytics
 
Learn about log structured file system
Learn about log structured file systemLearn about log structured file system
Learn about log structured file system
 
Storage Devices
Storage DevicesStorage Devices
Storage Devices
 
virtual_memory (3).pptx
virtual_memory (3).pptxvirtual_memory (3).pptx
virtual_memory (3).pptx
 
Lecture 6
Lecture 6Lecture 6
Lecture 6
 
Linux操作系统01 简介
Linux操作系统01 简介Linux操作系统01 简介
Linux操作系统01 简介
 
Operating systems
Operating systemsOperating systems
Operating systems
 
unit 3 cyber security 19.4.22.pptx
unit 3 cyber security  19.4.22.pptxunit 3 cyber security  19.4.22.pptx
unit 3 cyber security 19.4.22.pptx
 
Windows Internal - Ch9 memory management
Windows Internal - Ch9 memory managementWindows Internal - Ch9 memory management
Windows Internal - Ch9 memory management
 

More from LeahRachael

UNIT 5-UNDERSTANDING THE OPERATION OF A NETWORK.pptx
UNIT 5-UNDERSTANDING THE OPERATION OF A NETWORK.pptxUNIT 5-UNDERSTANDING THE OPERATION OF A NETWORK.pptx
UNIT 5-UNDERSTANDING THE OPERATION OF A NETWORK.pptxLeahRachael
 
UNIT 6-EXPLAINING THE ROLE OF THE NETWORK ADMINISTRATOR AND SUPPORT.pptx
UNIT 6-EXPLAINING THE ROLE OF THE NETWORK ADMINISTRATOR AND SUPPORT.pptxUNIT 6-EXPLAINING THE ROLE OF THE NETWORK ADMINISTRATOR AND SUPPORT.pptx
UNIT 6-EXPLAINING THE ROLE OF THE NETWORK ADMINISTRATOR AND SUPPORT.pptxLeahRachael
 
UNIT 7-UNDERSTANDING LARGER NETWORKS.pptx
UNIT 7-UNDERSTANDING LARGER NETWORKS.pptxUNIT 7-UNDERSTANDING LARGER NETWORKS.pptx
UNIT 7-UNDERSTANDING LARGER NETWORKS.pptxLeahRachael
 
UNIT 3-DEMONSTRATING A COMPREHENSIVE UNDERSTANDING OF SOFTWARE DESIGN.pptx
UNIT 3-DEMONSTRATING A COMPREHENSIVE UNDERSTANDING OF SOFTWARE DESIGN.pptxUNIT 3-DEMONSTRATING A COMPREHENSIVE UNDERSTANDING OF SOFTWARE DESIGN.pptx
UNIT 3-DEMONSTRATING A COMPREHENSIVE UNDERSTANDING OF SOFTWARE DESIGN.pptxLeahRachael
 
UNIT 4 - UNDERSTANDING THE NETWORK ARCHITECTURE.pptx
UNIT 4 - UNDERSTANDING THE NETWORK ARCHITECTURE.pptxUNIT 4 - UNDERSTANDING THE NETWORK ARCHITECTURE.pptx
UNIT 4 - UNDERSTANDING THE NETWORK ARCHITECTURE.pptxLeahRachael
 
UNIT 2- UNDERSTANDING DIGITAL SIGNALS PART 2
UNIT 2- UNDERSTANDING DIGITAL SIGNALS PART 2UNIT 2- UNDERSTANDING DIGITAL SIGNALS PART 2
UNIT 2- UNDERSTANDING DIGITAL SIGNALS PART 2LeahRachael
 
UNIT 2-APPLYING THE SOFTWARE COST ESTIMATION.pptx
UNIT 2-APPLYING THE SOFTWARE COST ESTIMATION.pptxUNIT 2-APPLYING THE SOFTWARE COST ESTIMATION.pptx
UNIT 2-APPLYING THE SOFTWARE COST ESTIMATION.pptxLeahRachael
 
UNIT 3 - EXPLAINING THE NEED OF COMPUTER NETWORK
UNIT 3 - EXPLAINING THE NEED OF COMPUTER NETWORKUNIT 3 - EXPLAINING THE NEED OF COMPUTER NETWORK
UNIT 3 - EXPLAINING THE NEED OF COMPUTER NETWORKLeahRachael
 
Unit 4- State Machine in mobile programming
Unit 4- State Machine in mobile programmingUnit 4- State Machine in mobile programming
Unit 4- State Machine in mobile programmingLeahRachael
 
UNIT 1-IDENTIFY THE NEED FOR SOFTWARE ENGINEERING DEVELOPMENT.pptx
UNIT 1-IDENTIFY THE NEED FOR SOFTWARE ENGINEERING DEVELOPMENT.pptxUNIT 1-IDENTIFY THE NEED FOR SOFTWARE ENGINEERING DEVELOPMENT.pptx
UNIT 1-IDENTIFY THE NEED FOR SOFTWARE ENGINEERING DEVELOPMENT.pptxLeahRachael
 
Unit 1- PROGRAMMING IN C OPERATORS LECTURER NOTES
Unit 1- PROGRAMMING IN C OPERATORS LECTURER NOTESUnit 1- PROGRAMMING IN C OPERATORS LECTURER NOTES
Unit 1- PROGRAMMING IN C OPERATORS LECTURER NOTESLeahRachael
 
UNIT 5- UNDERSTANDING THE SYSTEM DESIGN PROCESS.pptx
UNIT 5- UNDERSTANDING THE SYSTEM DESIGN PROCESS.pptxUNIT 5- UNDERSTANDING THE SYSTEM DESIGN PROCESS.pptx
UNIT 5- UNDERSTANDING THE SYSTEM DESIGN PROCESS.pptxLeahRachael
 
UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...
UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...
UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...LeahRachael
 
UNIT 2-UNDERSTANDING THE SYNCHRONIZATION PROCESS.pptx
UNIT 2-UNDERSTANDING THE SYNCHRONIZATION PROCESS.pptxUNIT 2-UNDERSTANDING THE SYNCHRONIZATION PROCESS.pptx
UNIT 2-UNDERSTANDING THE SYNCHRONIZATION PROCESS.pptxLeahRachael
 
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.pptxLeahRachael
 

More from LeahRachael (15)

UNIT 5-UNDERSTANDING THE OPERATION OF A NETWORK.pptx
UNIT 5-UNDERSTANDING THE OPERATION OF A NETWORK.pptxUNIT 5-UNDERSTANDING THE OPERATION OF A NETWORK.pptx
UNIT 5-UNDERSTANDING THE OPERATION OF A NETWORK.pptx
 
UNIT 6-EXPLAINING THE ROLE OF THE NETWORK ADMINISTRATOR AND SUPPORT.pptx
UNIT 6-EXPLAINING THE ROLE OF THE NETWORK ADMINISTRATOR AND SUPPORT.pptxUNIT 6-EXPLAINING THE ROLE OF THE NETWORK ADMINISTRATOR AND SUPPORT.pptx
UNIT 6-EXPLAINING THE ROLE OF THE NETWORK ADMINISTRATOR AND SUPPORT.pptx
 
UNIT 7-UNDERSTANDING LARGER NETWORKS.pptx
UNIT 7-UNDERSTANDING LARGER NETWORKS.pptxUNIT 7-UNDERSTANDING LARGER NETWORKS.pptx
UNIT 7-UNDERSTANDING LARGER NETWORKS.pptx
 
UNIT 3-DEMONSTRATING A COMPREHENSIVE UNDERSTANDING OF SOFTWARE DESIGN.pptx
UNIT 3-DEMONSTRATING A COMPREHENSIVE UNDERSTANDING OF SOFTWARE DESIGN.pptxUNIT 3-DEMONSTRATING A COMPREHENSIVE UNDERSTANDING OF SOFTWARE DESIGN.pptx
UNIT 3-DEMONSTRATING A COMPREHENSIVE UNDERSTANDING OF SOFTWARE DESIGN.pptx
 
UNIT 4 - UNDERSTANDING THE NETWORK ARCHITECTURE.pptx
UNIT 4 - UNDERSTANDING THE NETWORK ARCHITECTURE.pptxUNIT 4 - UNDERSTANDING THE NETWORK ARCHITECTURE.pptx
UNIT 4 - UNDERSTANDING THE NETWORK ARCHITECTURE.pptx
 
UNIT 2- UNDERSTANDING DIGITAL SIGNALS PART 2
UNIT 2- UNDERSTANDING DIGITAL SIGNALS PART 2UNIT 2- UNDERSTANDING DIGITAL SIGNALS PART 2
UNIT 2- UNDERSTANDING DIGITAL SIGNALS PART 2
 
UNIT 2-APPLYING THE SOFTWARE COST ESTIMATION.pptx
UNIT 2-APPLYING THE SOFTWARE COST ESTIMATION.pptxUNIT 2-APPLYING THE SOFTWARE COST ESTIMATION.pptx
UNIT 2-APPLYING THE SOFTWARE COST ESTIMATION.pptx
 
UNIT 3 - EXPLAINING THE NEED OF COMPUTER NETWORK
UNIT 3 - EXPLAINING THE NEED OF COMPUTER NETWORKUNIT 3 - EXPLAINING THE NEED OF COMPUTER NETWORK
UNIT 3 - EXPLAINING THE NEED OF COMPUTER NETWORK
 
Unit 4- State Machine in mobile programming
Unit 4- State Machine in mobile programmingUnit 4- State Machine in mobile programming
Unit 4- State Machine in mobile programming
 
UNIT 1-IDENTIFY THE NEED FOR SOFTWARE ENGINEERING DEVELOPMENT.pptx
UNIT 1-IDENTIFY THE NEED FOR SOFTWARE ENGINEERING DEVELOPMENT.pptxUNIT 1-IDENTIFY THE NEED FOR SOFTWARE ENGINEERING DEVELOPMENT.pptx
UNIT 1-IDENTIFY THE NEED FOR SOFTWARE ENGINEERING DEVELOPMENT.pptx
 
Unit 1- PROGRAMMING IN C OPERATORS LECTURER NOTES
Unit 1- PROGRAMMING IN C OPERATORS LECTURER NOTESUnit 1- PROGRAMMING IN C OPERATORS LECTURER NOTES
Unit 1- PROGRAMMING IN C OPERATORS LECTURER NOTES
 
UNIT 5- UNDERSTANDING THE SYSTEM DESIGN PROCESS.pptx
UNIT 5- UNDERSTANDING THE SYSTEM DESIGN PROCESS.pptxUNIT 5- UNDERSTANDING THE SYSTEM DESIGN PROCESS.pptx
UNIT 5- UNDERSTANDING THE SYSTEM DESIGN PROCESS.pptx
 
UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...
UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...
UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...
 
UNIT 2-UNDERSTANDING THE SYNCHRONIZATION PROCESS.pptx
UNIT 2-UNDERSTANDING THE SYNCHRONIZATION PROCESS.pptxUNIT 2-UNDERSTANDING THE SYNCHRONIZATION PROCESS.pptx
UNIT 2-UNDERSTANDING THE SYNCHRONIZATION PROCESS.pptx
 
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
 

Recently uploaded

Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 

Recently uploaded (20)

Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 

UNIT 4-UNDERSTANDING VIRTUAL MEMORY.pptx

  • 2. Virtual Memory • Virtual memory is implemented by demand paging. • VM is the separation of user logical memory from physical memory. • Demand paging can be described as a memory management technique that is used in operating systems to improve memory usage and system performance. • Demand paging is a technique used in virtual memory systems where pages enter main memory only when requested or needed by the CPU. • In demand paging, the operating system loads only the necessary pages of a program into memory at runtime, instead of loading the entire program into memory at the start. • A page fault occurred when the program needed to access a page that is not currently in memory. The operating system then loads the required pages from the disk into memory and updates the page tables accordingly. This process is transparent to the running program and it continues to run as if the page had always been in memory.
  • 3. Why Virtual Memory? • Most programs do not need to keep everything resident to run efficiently: • Most error-handling routines are used rarely. • Arrays and other data structures have morestorage allocated than they usually need. • Certain program features are rarely used.
  • 4. Concept of Demand Page….. • Demand paging follows that pages should only be brought into memory if the executing process demands them. This is often referred to as lazy evaluation as only those pages demanded by the process are swapped from secondary storage to main memory. • Contrast this to pure swapping, where all memory for a process is swapped from secondary storage to main memory during the process startup. • Commonly, to achieve this process a page table implementation is used. The page table maps logical memory to physical memory. • The page table uses a bitwise operator to mark if a page is valid or invalid. A valid page is one that currently resides in main memory. • An invalid page is one that currently resides in secondary memory.
  • 5. Demand Paging in Operating system
  • 6. Benefits of Virtual Memory • Efficient use of physical memory: Query paging allows for more efficient use because only the necessary pages are loaded into memory at any given time. • Support for larger programs: Programs can be larger than the physical memory available on the system because only the necessary pages will be loaded into memory. • Faster program start: Because only part of a program is initially loaded into memory, programs can start faster than if the entire program were loaded at once. • Reduce memory usage: Query paging can help reduce the amount of memory a program needs, which can improve system performance by reducing the amount of disk I/O required.
  • 7. Drawbacks of the Demand Paging • Page Fault Overload: The process of swapping pages between memory and disk can cause a performance overhead, especially if the program frequently accesses pages that are not currently in memory. • Degraded performance: If a program frequently accesses pages that are not currently in memory, the system spends a lot of time swapping out pages, which degrades performance. • Fragmentation: Query paging can cause physical memory fragmentation, degrading system performance over time. • Complexity: Implementing query paging in an operating system can be complex, requiring complex algorithms and data structures to manage page tables and swap space.
  • 8. Introduction to File Systems • All file systems consist of structures necessary for storing and managing data. These structures typically include an operating system boot record, directories, and files. • Functions of a File System: • Tracking allocated and free space • Maintaining directories and file names • Tracking where each file is physically stored on the disk
  • 9. Definition: • Computers use particular kinds of file systems to store and organize data on media, such as a hard drive, the CDs, DVDs, and BDs in an optical drive or on a flash drive. • Any place that a PC stores data is employing the use of some type of file system. A file system can be thought of as an index or database containing the physical location of every piece of data on a hard drive. • A file system is setup on a drive during a format. See How To Format a Hard Drive for more information.
  • 10. File System • File system is the part of the operating system which is responsible for file management. • It provides a mechanism to store the data and access to the file contents including data and programs. • Some Operating systems treats everything as a file for example Ubuntu. • The File system takes care of the following issues • File Structure: The task of the file system is to maintain an optimal file structure. • Recovering Free space: if file gets deleted its space is recovered • disk space assignment to the files : Using disk scheduling algorithm • tracking data location: We need to keep track of all the blocks on which the part of the files reside.
  • 11. Types of File Systems • FAT File System • NTFS File System • Disk file systems • Flash file systems • Tape file systems • Database file systems • Transactional file systems • Network file systems • work file systems • Shared disk file systems • Special file systems • Device file systems
  • 12. FAT File System • FAT12 - The initial version of the FAT file system, FAT12 was introduced in 1977, even before MS-DOS, and was the primary file system for Microsoft operating systems up to MS-DOS 4.0. FAT12 supports drive sizes up to 32MB. • FAT16 - The second implementation of FAT was FAT16, introduced in 1988. FAT16 was the primary file system for MS-DOS 4.0 up to Windows 95. FAT16 supports drive sizes up to 2GB. • FAT32 - FAT32 is the latest version of the FAT file system. It was introduced in 1996 for Windows 95 OSR2 users and was the primary file system for consumer Windows versions through Windows ME. FAT32 supports drive sizes up to 8TB.
  • 13. NTFS File System • Definition: New Technology File System (NTFS) is a file system that was introduced by Microsoft in 1993 with Windows NT 3.1. NTFS supports hard drive sizes up to 256TB. • NTFS is the primary file system used in Microsoft's Windows 7, Windows Vista, Windows XP, Windows 2000 and Windows NT operating systems. • The Windows Server line of operating systems also primarily use NTFS. • The File Allocation Table (FAT) file system was the primary file system in Microsoft's older operating systems but it is still supported today along with NTFS.
  • 14. Disk file systems • A disk file system takes advantages of the ability of disk storage media to randomly address data in a short amount of time. • Additional considerations include the speed of accessing data following that initially requested and the anticipation that the following data may also be requested. This permits multiple users (or processes) access to various data on the disk without regard to the sequential location of the data. • Examples include FAT (FAT12, FAT16, FAT32), exFAT, NTFS, HFS and HFS+, HPFS, UFS, ext2, ext3, ext4, XFS, btrfs, ISO 9660, Files11, Veritas File System, VMFS, ZFS, ReiserFS and UDF. • Some disk file systems are journaling file systems or versioning file systems. • Optical discs • ISO 9660 and Universal Disk Format (UDF) are two common formats that target Compact Discs, DVDs and Blu-ray discs. Mount Rainier is an extension to UDF supported by Linux 2.6 series and Windows Vista that facilitates rewriting to DVDs.
  • 15. Flash file system • A flash file system considers the special abilities, performance and restrictions of flash memory devices. • Frequently a disk file system can use a flash memory device as the underlying storage media but it is much better to use a file system specifically designed for a flash device.
  • 16. Tape file systems • A tape file system is a file system and tape format designed to store files on tape in a self-describing form. • Magnetic tapes are sequential storage media with significantly longer random data access times than disks, posing challenges to the creation and efficient management of a general-purpose file system. • In a disk file system there is typically a master file directory, and a map of used and free data regions. • Any file additions, changes, or removals require updating the directory and the used/free maps. • Random access to data regions is measured in milliseconds so this system works well for disks. • Tape requires linear motion to wind and unwind potentially very long reels of media. This tape motion may take several seconds to several minutes to move the read/write head from one end of the tape to the other
  • 17. Database file systems • Another concept for file management is the idea of a database-based file system. Instead of, or in addition to, hierarchical structured management, files are identified by their characteristics, like type of file, topic, author, or similar rich metadata.
  • 18. Network file systems • A network file system is a file system that acts as a client for a remote file access protocol, providing access to files on a server. • Examples of network file systems include clients for the NFS, AFS, SMBprotocols, and file-system-like clients for FTP and WebDAV
  • 19. Shared disk file systems • A shared disk file system is one in which a number of machines (usually servers) all have access to the same external disk subsystem (usually a SAN). • The file system arbitrates access to that subsystem, preventing write collisions. • Examples include GFS2 from Red Hat, GPFS from IBM, SFS from DataPlow, CXFS from SGIand StorNext from Quantum Corporation.
  • 20. Special file systems • A special file system presents non-file elements of an operating system as files so they can be acted on using file system APIs. • This is most commonly done in Unix-like operating systems, but devices are given file names in some non-Unix-like operating systems as well.
  • 21. Device file systems • A device file system represents I/O devices and pseudo-devices as files, called device files. • Examples in Unix-like systems include devfs and, in Linux 2.6 systems, udev. • In non-Unix-like systems, such as TOPS-10 and other operating systems influenced by it, where the full filename or pathname of a file can include a device prefix, devices other than those containing file systems are referred to by a device prefix specifying the device, without anything following it.
  • 22. Flat file systems • In a flat file system, there are no subdirectories. • When floppy disk media was first available this type of file system was adequate due to the relatively small amount of data space available. CP/M machines featured a flat file system, where files could be assigned to one of 16 user areas and generic file operations narrowed to work on one instead of defaulting to work on all of them. These user areas were no more than special attributes associated with the files, that is, it was not necessary to define specific quota for each of these areas and files could be added to groups for as long as there was still free storage space on the disk..
  • 23. Aspects of file systems • Space management • File systems allocate space in a granular manner, usually multiple physical units on the device. The file system is responsible for organizing files and directories, and keeping track of which areas of the media belong to which file and which are not being used. For example, in Apple DOS of the early 1980s, 256-byte sectors on 140 kilobyte floppy disk used a track/sector map.
  • 24. Filenames • A filename (or file name) is used to identify a storage location in the file system. Most file systems have restrictions on the length of filenames. In some file systems, filenames are not case sensitive (i.e., filenames such as FOO and foo refer to the same file); in others, filenames are case sensitive (i.e., the names FOO and foo refer to two separate files).
  • 25. Directories • File systems typically have directories (also called folders) which allow the user to group files into separate collections. This may be implemented by associating the file name with an index in a table of contents or an inode in a Unix-like file system. • Directory structures may be flat (i.e. linear), or allow hierarchies where directories may contain subdirectories. • The first file system to support arbitrary hierarchies of directories was used in the Multics operating system. • The native file systems of Unix-like systems also support arbitrary directory hierarchies, as do, for example, Apple's Hierarchical File System, and its successor HFS+ in classic Mac OS (HFS+ is still used in Mac OS X), the FAT file system in MS- DOS 2.0 and later and Microsoft Windows, the NTFS file system in the Windows NT family of operating systems, and the ODS-2 (On-Disk Structure-2) and higher levels of the Files-11 file system in OpenVMS.
  • 26. File System Structure • File System provide efficient access to the disk by allowing data to be stored, located and retrieved in a convenient way. • A file System must be able to store the file, locate the file and retrieve the file. • Most of the Operating Systems use layering approach for every task including file systems. • Every layer of the file system is responsible for some activities. • The image shown below, elaborates how the file system is divided in different layers, and also the functionality of each layer.
  • 27. File System Structure… • When an application program asks for a file, the first request is directed to the logical file system. The logical file system contains the Meta data of the file and directory structure. • If the application program doesn't have the required permissions of the file then this layer will throw an error. Logical file systems also verify the path to the file. • Generally, files are divided into various logical blocks. • Files are to be stored in the hard disk and to be retrieved from the hard disk. Hard disk is divided into various tracks and sectors. • Therefore, in order to store and retrieve the files, the logical blocks need to be mapped to physical blocks. This mapping is done by File organization module. It is also responsible for free space management.
  • 28. File System Structure… • Once File organization module decided which physical block the application program needs, it passes this information to basic file system. • The basic file system is responsible for issuing the commands to I/O control in order to fetch those blocks. • I/O controls contain the codes by using which it can access hard disk. These codes are known as device drivers. • I/O controls are also responsible for handling interrupts.