In this video, we explore the concept of overlays in operating systems. Overlays are a classic memory management technique that allows programs larger than the available memory to run by loading only essential parts into memory at a given time.

Key Topics Covered:

What are overlays in operating systems?
How overlays help manage memory in constrained environments
History and practical applications of overlays
Step-by-step explanation of how overlays work
Comparison with modern memory management techniques
This video is perfect for students, developers, or anyone interested in the inner workings of operating systems and memory management.

Subscribe for more deep dives into OS concepts, computer science tutorials, and tech knowledge!

If you find this helpful, make sure to like, comment, and ask your questions below!

---------------------------------------------
#Chapter5
#MemoryManagement
#Overlays
The main problem in Fixed partitioning is the size of a process has to be limited by the maximum size of the partition, which means a process can never be span over another.In order to solve this problem, earlier people have used some solution which is called as Overlays.

The concept of overlays is that whenever a process is running it will not use the complete program at the same time, it will use only some part of it.Then overlays concept says that whatever part you required, you load it an once the part is done, then you just unload it, means just pull it back and get the new part you required and run it.
Formally,
“The process of transferring a block of program code or other data into internal memory, replacing what is already stored”.
Sometimes it happens that compare to the size of the biggest partition, the size of the program will be even more, then, in that case, you should go with overlays.

So overlay is a technique to run a program that is bigger than the size of the physical memory by keeping only those instructions and data that are needed at any given time.Divide the program into modules in such a way that not all modules need to be in the memory at the same time.
Example –
The best example of overlays is assembler.Consider the assembler has 2 passes, 2 pass means at any time it will be doing only one thing, either the 1st pass or the 2nd pass.Which means it will finish 1st pass first and then 2nd pass.Let assume that available main memory size is 150KB and total code size is 200KB

Pass 1.......................70KB
Pass 2.......................80KB
Symbol table.................30KB
Common routine...............20KB
As the total code size is 200KB and main memory size is 150KB, it is not possible to use 2 passes together.So, in this case, we should go with the overlays technique.According to the overlays concept at any time only one pass will be used and both the passes always need symbol table and common routine.Now the question is if overlays-driver* is 10KB, then what is the minimum partition size required?For pass 1 total memory needed is = (70KB + 30KB + 20KB + 10KB) = 130KB and for pass 2 total memory needed is = (80KB + 30KB + 20KB + 10KB) = 140KB.So if we have minimum 140KB size partition then we can run this code very easily.

*Overlays driver:-It is the user responsibility to take care of overlaying, the operating system will not provide anything.Which means the user should write even what part is required in the 1st pass and once the 1st pass is over, the user should write the code to pull out the pass 1 and load the pass 2.That is what is the responsibility of the user, that is known as the Overlays driver.Overlays driver will just help us to move out and move in the various part of the code.

#OperatingSystem #OS #asadnomanee #banglalecture #CSE
#Lecturelia #MBSTU #MBSTU_CSE
#lecturelia #banglatutorial #bangla