SlideShare a Scribd company logo
1 of 19
Download to read offline
OPERATING SYSTEM
UNIT - 3
2 MARKS
1) What are overlays?
• Overlays are a programming method that
allows programs to be larger than the
computer's main memory.
• An embedded system would normally use
overlays because of the limitation of physical
memory, which is internal memory for a
system-on-chip, and the lack of virtual
memory facilities.
2). Explain Process Id.
• The process identifier (process ID or
PID) is a number used by most
operating system kernels such as those
of Unix, macOS and Windows to
uniquely identify an active process.
3) What is virtual address space?
• The virtual address space for a process
is the set of virtual memory addresses
that it can use. The address space for
each process is private and cannot be
accessed by other processes unless it is
shared.
4) What is process control block?
• Process Control Block is a data structure that
contains information of the process related to it. The
process control block is also known as a task control
block, entry of the process table, etc.
• It is very important for process management as the
data structuring for processes is done in terms of
the PCB. It also defines the current state of the
operating system.
5) List the functions of dispatcher.
• Functions of Dispatcher are,
• It is involved in the CPU-scheduling function
is the dispatcher, which is the module that
gives control of the CPU to the process
selected by the short-term scheduler.
• It receives control in kernel mode as the
result of an interrupt or system call
6) What is fragmentation?
• Fragmentation is an problem where the
memory blocks cannot be allocated to the
processes due to their small size and the
blocks remain unused.
• Types:
1. Internal Fragmentation.
2. External Fragmentation.
7) What is meant by best fit and
first fit?
• The best fit means it deals with allocating the smallest free
partition which meets the requirement of the requesting
process.
• This algorithm first searches the entire list of free partitions
and considers the smallest hole that is adequate. It then tries
to find a hole which is close to actual process size needed.
• First fit means the partition is allocated which is first sufficient
from the top of Main Memory. It is the fastest search as it
searches only the first block i.e. enough to assign a process.
8) What is internal fragmentation?
• Internal Fragmentation it occurs when a
process needs more space than the size of
allotted memory block or use less space.
• Internal Fragmentation it occurs when
Paging is employed.
9) What is address binding?
• Address binding is the process of
mapping from one address space to
another address space.
10). Define 50 Percent rule.
• Statistical analysis of first fit, for instance, reveals
that, even with some optimization, given N allocated
blocks another 0.5 N blocks will be lost to
fragmentation.
• That is, one-third of memory may be unusable.
• This property is known as the 50-percent rule.
5 MARKS
1.Distinguish between internal fragmentation
and external fragmentation.
Sr.
No.
Key Internal Fragmentation External Fragmentation
1 Definition When there is a difference between
required memory space vs allotted
memory space, problem is termed as
Internal Fragmentation.
When there are small and non-
contiguous memory blocks which
cannot be assigned to any process, the
problem is termed as External
Fragmentation.
2 Memory Block
Size
Internal Fragmentation occurs when
allotted memory blocks are of fixed size.
External Fragmentation occurs when
allotted memory blocks are of varying
size.
3 Occurrence Internal Fragmentation occurs when a
process needs more space than the size
of allotted memory block or use less
space.
External Fragmentation occurs when a
process is removed from the main
memory.
4 Solution Best Fit Block Search is the solution for
internal fragmentation.
Compaction is the solution for external
fragmentation.
5 Process Internal Fragmentation occurs when
Paging is employed.
External Fragmentation occurs when
Segmentation is employed.
2) Discuss about memory partitioning. Also explain how it
could be implemented in operating systems.
• Memory Management is the function responsible for allocating and
managing computer’s main memory. Memory Management function keeps
track of the status of each memory location, either allocated or free to
ensure effective and efficient use of Primary Memory.
• There are two Memory Management Techniques: Contiguous, and Non-
Contiguous. In Contiguous Technique, executing process must be loaded
entirely in main-memory. Contiguous Technique can be divided into:
1. Fixed (or static) partitioning
2. Variable (or dynamic) partitioning
Fixed Partitioning:
❖ This is the oldest and simplest technique used to put more
than one processes in the main memory. In this
partitioning, number of partitions (non-overlapping) in RAM
are fixed but size of each partition may or may not be same.
As it is contiguous allocation, hence no spanning is allowed.
Here partition are made before execution or during system
configure.
❖ As illustrated in above figure, first process is only
consuming 1MB out of 4MB in the main memory.
❖ Hence, Internal Fragmentation in first block is (4-1) = 3MB.
Sum of Internal Fragmentation in every block = (4-1)+(8-
7)+(8-7)+(16-14)= 3+1+1+2 = 7MB.
Variable Partitioning:
It is a part of Contiguous allocation technique. It is used to
alleviate the problem faced by Fixed Partitioning. In contrast
with fixed partitioning, partitions are not made before the
execution or during system configure. Various features
associated with variable Partitioning
1. Initially RAM is empty and partitions are made during the
run-time according to process’s need instead of partitioning
during system configure.
2. The size of partition will be equal to incoming process.
3. The partition size varies according to the need of the
process so that the internal fragmentation.
4. can be avoided to ensure efficient utilization of RAM.
5. Number of partitions in RAM is not fixed and depends on
the number of incoming process and Main Memory’s size
3.Illustrate contiguous memory allocation
schemes with example
Algorithms for Partition Allocation-
Popular algorithms used for allocating the partitions to the
arriving processes are :-
❖ First Fit Algorithm
❖ Best Fit Algorithm
❖ Worst Fit Algorithm
1. First Fit Algorithm-
• This algorithm starts scanning the partitions serially from the starting.
• When an empty partition that is big enough to store the process is
found, it is allocated to the process.
• Obviously, the partition size has to be greater than or at least equal to
the process size.
2. Best Fit Algorithm-
• This algorithm first scans all the empty partitions.
• It then allocates the smallest size partition to the process.
3. Worst Fit Algorithm-
• This algorithm first scans all the empty partitions.
• It then allocates the largest size partition to the process.

More Related Content

Similar to DB ppt OS unit - 3.pdf

Analysis of Allocation Algorithms in Memory Management
Analysis of Allocation Algorithms in Memory ManagementAnalysis of Allocation Algorithms in Memory Management
Analysis of Allocation Algorithms in Memory Management
ijtsrd
 

Similar to DB ppt OS unit - 3.pdf (20)

local_media3192961381667787861026781.pptx
local_media3192961381667787861026781.pptxlocal_media3192961381667787861026781.pptx
local_media3192961381667787861026781.pptx
 
memory managment on computer science.ppt
memory managment on computer science.pptmemory managment on computer science.ppt
memory managment on computer science.ppt
 
07-MemoryManagement.ppt
07-MemoryManagement.ppt07-MemoryManagement.ppt
07-MemoryManagement.ppt
 
UNIT-2 OS.pptx
UNIT-2 OS.pptxUNIT-2 OS.pptx
UNIT-2 OS.pptx
 
Memory management OS
Memory management OSMemory management OS
Memory management OS
 
Chapter07_ds.ppt
Chapter07_ds.pptChapter07_ds.ppt
Chapter07_ds.ppt
 
CSI-503 - 6. Memory Management
CSI-503 - 6. Memory Management CSI-503 - 6. Memory Management
CSI-503 - 6. Memory Management
 
Memory Management
Memory ManagementMemory Management
Memory Management
 
Unit-4 swapping.pptx
Unit-4 swapping.pptxUnit-4 swapping.pptx
Unit-4 swapping.pptx
 
Ch4 memory management
Ch4 memory managementCh4 memory management
Ch4 memory management
 
Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory management
 
M20CA1030_391_2_Part2.pptx
M20CA1030_391_2_Part2.pptxM20CA1030_391_2_Part2.pptx
M20CA1030_391_2_Part2.pptx
 
Memory management
Memory managementMemory management
Memory management
 
Memory Management Strategies - II.pdf
Memory Management Strategies - II.pdfMemory Management Strategies - II.pdf
Memory Management Strategies - II.pdf
 
OS Unit 2.pptx
OS Unit 2.pptxOS Unit 2.pptx
OS Unit 2.pptx
 
Unit 4-Memory Management - operating systems.pptx
Unit 4-Memory Management - operating systems.pptxUnit 4-Memory Management - operating systems.pptx
Unit 4-Memory Management - operating systems.pptx
 
Operating System
Operating SystemOperating System
Operating System
 
Memory Management
Memory ManagementMemory Management
Memory Management
 
Analysis of Allocation Algorithms in Memory Management
Analysis of Allocation Algorithms in Memory ManagementAnalysis of Allocation Algorithms in Memory Management
Analysis of Allocation Algorithms in Memory Management
 
unit5_os (1).pptx
unit5_os (1).pptxunit5_os (1).pptx
unit5_os (1).pptx
 

Recently uploaded

Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
fonyou31
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Krashi Coaching
 

Recently uploaded (20)

Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 

DB ppt OS unit - 3.pdf

  • 3. 1) What are overlays? • Overlays are a programming method that allows programs to be larger than the computer's main memory. • An embedded system would normally use overlays because of the limitation of physical memory, which is internal memory for a system-on-chip, and the lack of virtual memory facilities.
  • 4. 2). Explain Process Id. • The process identifier (process ID or PID) is a number used by most operating system kernels such as those of Unix, macOS and Windows to uniquely identify an active process.
  • 5. 3) What is virtual address space? • The virtual address space for a process is the set of virtual memory addresses that it can use. The address space for each process is private and cannot be accessed by other processes unless it is shared.
  • 6. 4) What is process control block? • Process Control Block is a data structure that contains information of the process related to it. The process control block is also known as a task control block, entry of the process table, etc. • It is very important for process management as the data structuring for processes is done in terms of the PCB. It also defines the current state of the operating system.
  • 7. 5) List the functions of dispatcher. • Functions of Dispatcher are, • It is involved in the CPU-scheduling function is the dispatcher, which is the module that gives control of the CPU to the process selected by the short-term scheduler. • It receives control in kernel mode as the result of an interrupt or system call
  • 8. 6) What is fragmentation? • Fragmentation is an problem where the memory blocks cannot be allocated to the processes due to their small size and the blocks remain unused. • Types: 1. Internal Fragmentation. 2. External Fragmentation.
  • 9. 7) What is meant by best fit and first fit? • The best fit means it deals with allocating the smallest free partition which meets the requirement of the requesting process. • This algorithm first searches the entire list of free partitions and considers the smallest hole that is adequate. It then tries to find a hole which is close to actual process size needed. • First fit means the partition is allocated which is first sufficient from the top of Main Memory. It is the fastest search as it searches only the first block i.e. enough to assign a process.
  • 10. 8) What is internal fragmentation? • Internal Fragmentation it occurs when a process needs more space than the size of allotted memory block or use less space. • Internal Fragmentation it occurs when Paging is employed.
  • 11. 9) What is address binding? • Address binding is the process of mapping from one address space to another address space.
  • 12. 10). Define 50 Percent rule. • Statistical analysis of first fit, for instance, reveals that, even with some optimization, given N allocated blocks another 0.5 N blocks will be lost to fragmentation. • That is, one-third of memory may be unusable. • This property is known as the 50-percent rule.
  • 14. 1.Distinguish between internal fragmentation and external fragmentation. Sr. No. Key Internal Fragmentation External Fragmentation 1 Definition When there is a difference between required memory space vs allotted memory space, problem is termed as Internal Fragmentation. When there are small and non- contiguous memory blocks which cannot be assigned to any process, the problem is termed as External Fragmentation. 2 Memory Block Size Internal Fragmentation occurs when allotted memory blocks are of fixed size. External Fragmentation occurs when allotted memory blocks are of varying size. 3 Occurrence Internal Fragmentation occurs when a process needs more space than the size of allotted memory block or use less space. External Fragmentation occurs when a process is removed from the main memory. 4 Solution Best Fit Block Search is the solution for internal fragmentation. Compaction is the solution for external fragmentation. 5 Process Internal Fragmentation occurs when Paging is employed. External Fragmentation occurs when Segmentation is employed.
  • 15. 2) Discuss about memory partitioning. Also explain how it could be implemented in operating systems. • Memory Management is the function responsible for allocating and managing computer’s main memory. Memory Management function keeps track of the status of each memory location, either allocated or free to ensure effective and efficient use of Primary Memory. • There are two Memory Management Techniques: Contiguous, and Non- Contiguous. In Contiguous Technique, executing process must be loaded entirely in main-memory. Contiguous Technique can be divided into: 1. Fixed (or static) partitioning 2. Variable (or dynamic) partitioning
  • 16. Fixed Partitioning: ❖ This is the oldest and simplest technique used to put more than one processes in the main memory. In this partitioning, number of partitions (non-overlapping) in RAM are fixed but size of each partition may or may not be same. As it is contiguous allocation, hence no spanning is allowed. Here partition are made before execution or during system configure. ❖ As illustrated in above figure, first process is only consuming 1MB out of 4MB in the main memory. ❖ Hence, Internal Fragmentation in first block is (4-1) = 3MB. Sum of Internal Fragmentation in every block = (4-1)+(8- 7)+(8-7)+(16-14)= 3+1+1+2 = 7MB.
  • 17. Variable Partitioning: It is a part of Contiguous allocation technique. It is used to alleviate the problem faced by Fixed Partitioning. In contrast with fixed partitioning, partitions are not made before the execution or during system configure. Various features associated with variable Partitioning 1. Initially RAM is empty and partitions are made during the run-time according to process’s need instead of partitioning during system configure. 2. The size of partition will be equal to incoming process. 3. The partition size varies according to the need of the process so that the internal fragmentation. 4. can be avoided to ensure efficient utilization of RAM. 5. Number of partitions in RAM is not fixed and depends on the number of incoming process and Main Memory’s size
  • 18. 3.Illustrate contiguous memory allocation schemes with example Algorithms for Partition Allocation- Popular algorithms used for allocating the partitions to the arriving processes are :- ❖ First Fit Algorithm ❖ Best Fit Algorithm ❖ Worst Fit Algorithm
  • 19. 1. First Fit Algorithm- • This algorithm starts scanning the partitions serially from the starting. • When an empty partition that is big enough to store the process is found, it is allocated to the process. • Obviously, the partition size has to be greater than or at least equal to the process size. 2. Best Fit Algorithm- • This algorithm first scans all the empty partitions. • It then allocates the smallest size partition to the process. 3. Worst Fit Algorithm- • This algorithm first scans all the empty partitions. • It then allocates the largest size partition to the process.