L-5.1: Memory Management and Degree of Multiprogramming | Operating System

Gate Smashers
21 Mar 201823:41

Summary

TLDRThis video script delves into the critical role of memory management in operating systems, focusing on efficient utilization of memory resources like RAM, registers, and cache. It explains the concept of primary memory, emphasizing RAM's significance due to its direct connection with the CPU. The script introduces the idea of multiprogramming, illustrating how increasing the number of processes in RAM can boost CPU utilization and system performance. It uses numerical examples to demonstrate the impact of RAM size on CPU efficiency and touches on challenges like process allocation, deallocation, and security within memory management. The video concludes with a teaser on advanced memory management techniques like paging and segmentation.

Takeaways

  • 💡 Memory Management in Operating Systems is crucial for efficiently handling various types of memory resources like RAM, Hard Disk, and registers.
  • 📚 The primary focus of memory management is on RAM because it holds the majority of the data that the CPU actively processes.
  • 🔗 CPU is directly connected with registers, cache memory, and RAM, but not with secondary memory due to speed differences.
  • 💻 The size of RAM affects the cost of a system, which is why typical consumer devices have limited RAM capacities.
  • 🛠️ Multiprogramming is the practice of keeping multiple programs in the secondary memory and bringing them into RAM for execution by the CPU.
  • 🔄 CPU utilization increases with the Degree of Multiprogramming, which is the number of programs or processes in RAM.
  • 📈 As RAM size increases, more processes can be accommodated, leading to higher CPU utilization and system performance.
  • 🔢 A numerical example illustrates that increasing RAM from 4MB to 16MB can significantly boost CPU utilization from 30% to approximately 94%.
  • 🛡️ The Operating System is responsible for managing memory allocation and deallocation, ensuring process isolation and security.
  • 🔍 Advanced memory management techniques like Paging and Segmentation will be explored in future videos to further optimize memory usage and process handling.

Q & A

  • What is the primary function of memory management in an operating system?

    -The primary function of memory management in an operating system is to manage the various types of memory resources efficiently, focusing mainly on the RAM, which is the primary memory.

  • Why is RAM considered the primary memory in a computer system?

    -RAM is considered the primary memory because it is directly connected to the CPU and is used to store the data and instructions that are currently being used for processing.

  • How does the CPU interact with memory in a computer system?

    -The CPU interacts with memory by executing instructions stored in the primary memory (RAM). It is directly connected to registers and cache memory, and indirectly with secondary memory through RAM.

  • What is the significance of the Degree of Multiprogramming in memory management?

    -The Degree of Multiprogramming is significant because it determines how many processes can be kept in the primary memory (RAM) simultaneously. A higher degree of multiprogramming leads to higher CPU utilization and improved system performance.

  • How does increasing the size of RAM affect CPU utilization?

    -Increasing the size of RAM allows more processes to be accommodated in the primary memory, which in turn increases the chances that the CPU will always have a process ready for execution, thus increasing CPU utilization.

  • What is the relationship between the size of RAM and the cost of a computer system?

    -The size of RAM directly affects the cost of a computer system. As RAM size increases, so does the cost, which can impact the affordability for the average user.

  • Why is it important to manage the allocation and deallocation of memory in an operating system?

    -Managing the allocation and deallocation of memory is important to ensure that each process gets the required memory resources without interference from other processes, maintaining system security and efficiency.

  • What is the role of the operating system in preventing process interference in the RAM?

    -The operating system ensures that each process in the RAM is allocated a specific memory space and prevents its instructions from interfering with those of other processes, thus maintaining process isolation and system security.

  • How does the concept of multiprogramming relate to the efficiency of a computer system?

    -Multiprogramming improves the efficiency of a computer system by allowing multiple processes to be in memory at the same time, reducing the chances of the CPU being idle and increasing the overall utilization of the CPU.

  • What is the practical implication of the script's discussion on memory management for computer users?

    -The practical implication for computer users is understanding that the performance and efficiency of their systems are closely tied to how well the operating system manages memory, particularly in terms of multiprogramming and the efficient use of RAM.

Outlines

00:00

💾 Memory Management in Operating Systems

This paragraph introduces the concept of Memory Management in Operating Systems, emphasizing its role in efficiently handling various memory types such as RAM, Hard Disk, and registers. It highlights the primary focus on RAM due to its significance in system operations. The paragraph explains the connection between CPU, registers, cache memory, and RAM, and contrasts the direct connection of these with the indirect connection of secondary memory due to speed differences. It also touches on the balance between memory size and system cost, and the necessity of moving programs from secondary memory to RAM for execution by the CPU.

05:05

🔁 Degree of Multiprogramming and CPU Utilization

The second paragraph delves into the concept of Degree of Multiprogramming, which involves loading multiple processes into RAM to maximize CPU utilization. It explains how executing only one process at a time can lead to CPU idleness during I/O operations, and how increasing the number of processes in RAM can prevent this. The paragraph uses a numerical example to illustrate how increasing RAM size from 4MB to 8MB and then to 16MB allows for more processes to be loaded, thereby increasing CPU utilization from 30% to approximately 76% and 94% respectively. It emphasizes the importance of multiprogramming in enhancing system performance and efficiency.

10:10

📈 Impact of RAM Size on CPU Utilization

This paragraph continues the discussion on the relationship between RAM size and CPU utilization. It uses the probability 'K' to represent the time a process spends on I/O operations, and explores how increasing RAM size allows more processes to be loaded, which in turn increases CPU utilization. The example provided shows that with a 4MB process size and a 16MB RAM, four processes can be accommodated, leading to a CPU utilization of approximately 94%. The paragraph concludes by suggesting that increasing RAM size to accommodate more processes is key to achieving higher CPU utilization and system efficiency.

15:15

🛠️ Memory Management Techniques and Process Handling

The fourth paragraph discusses the techniques of memory management, particularly the importance of managing RAM effectively. It points out that the operating system is responsible for bringing processes from secondary memory to RAM, and the challenges this presents, such as process size and system efficiency. The paragraph introduces the concepts of allocation and deallocation, which become more critical as more processes are loaded into RAM. It also mentions the need for security to prevent process interference and the operating system's role in ensuring each process uses only its allocated memory. The paragraph sets the stage for further discussion on Paging and Segmentation, which are memory management techniques that will be explored in later videos.

20:17

🔍 Linking Degree of Multiprogramming with Memory Management

The final paragraph wraps up the discussion by linking the Degree of Multiprogramming with memory management. It reiterates the importance of increasing RAM size to accommodate more processes, which in turn increases CPU utilization and system performance. The paragraph also touches on the challenges of bringing entire processes into RAM versus dividing them into smaller blocks, a topic that will be further explored in the context of Paging and Segmentation. It concludes by encouraging viewers to like, share, and subscribe for more content on these topics.

Mindmap

Keywords

💡Memory Management

Memory Management refers to the techniques and methods used by an operating system to organize and allocate memory resources efficiently. In the context of the video, it is the primary functionality of the operating system to handle various types of memory, such as RAM, hard disk, and registers, ensuring they are used optimally. The video emphasizes the importance of managing primary memory, particularly RAM, due to its significant role in the system's performance.

💡Primary Memory

Primary memory, also known as main memory, is the memory that a computer's processor can directly access to read or write data. The video highlights RAM as the primary memory because it is where the majority of the memory is located and is crucial for the execution of programs. The script discusses how managing primary memory is key to the system's efficiency.

💡CPU

CPU stands for Central Processing Unit, which is the component of a computer that performs most of the processing inside the computer. The video script explains that the CPU is responsible for executing instructions and programs. It is directly connected to registers and cache memory, and indirectly to RAM and secondary memory, emphasizing the CPU's role in memory management.

💡Registers

Registers are small, very fast storage locations located within the CPU. They are used to hold temporary data during processing. The video mentions registers as part of the CPU's direct connections, indicating their importance in the quick execution of instructions and their role in memory hierarchy.

💡Cache Memory

Cache memory is a small, fast memory that stores frequently accessed data to reduce access time. The video script positions cache memory as an intermediate between the CPU and RAM, highlighting its role in speeding up data retrieval for the CPU.

💡Secondary Memory

Secondary memory refers to storage devices like hard disks that store data even when the computer is turned off. The video script explains that secondary memory is not directly connected to the CPU due to its slower speed, and that data from secondary memory must be brought into RAM for processing.

💡Degree of Multiprogramming

Degree of Multiprogramming is the number of processes that can be kept in the main memory at the same time. The video script discusses how increasing this degree can improve CPU utilization by ensuring that the CPU has multiple processes ready to execute, thus reducing idle time.

💡I/O Operation

I/O Operation stands for Input/Output operation, which is the communication between the CPU and external devices like printers or disk drives. The video script uses I/O operations as an example of activities that can cause a process to be temporarily suspended, affecting CPU utilization.

💡CPU Utilization

CPU Utilization is the percentage of time the CPU is actively executing processes rather than being idle. The video script explains how the degree of multiprogramming and the size of RAM can influence CPU utilization, with higher utilization indicating better system performance.

💡Cost

In the context of the video, cost refers to the financial implications of increasing memory sizes, such as RAM, cache, and registers. The script mentions that increasing the size of these memory components can lead to higher system costs, which is a consideration for both manufacturers and consumers.

💡Paging and Segmentation

Paging and Segmentation are memory management techniques used by operating systems to allocate memory to processes. The video script briefly mentions these concepts as methods that will be explored in further detail to explain how processes can be divided into manageable blocks for efficient memory use.

Highlights

Memory Management in Operating Systems is crucial for efficiently handling various memory types like RAM, Hard Disk, and registers.

The primary memory, especially RAM, is the focus of memory management due to its significant role in system operations.

CPU executes instructions and is directly connected with registers, cache memory, and RAM, which are faster than secondary memory.

Secondary memory, although slower, stores all programs that need to be executed by the CPU.

The concept of Degree of Multiprogramming is introduced, emphasizing the importance of having multiple processes in RAM for efficient CPU utilization.

An increase in the number of processes in RAM leads to higher CPU utilization, thus improving system performance.

A numerical example illustrates how increasing RAM size from 4MB to 8MB and then to 16MB significantly boosts CPU utilization from 30% to approximately 94%.

The theoretical concept of bringing more processes into RAM for higher CPU utilization is practically demonstrated through the example.

The challenge of managing memory includes the trade-off between the size of RAM and the cost of the system.

Memory management techniques are not only about allocation but also about ensuring security and preventing process interference.

The Operating System plays a critical role in memory management by allocating and deallocating memory to processes efficiently.

The video discusses the practical implications of memory management on system performance and cost.

The relationship between the Degree of Multiprogramming and Memory Management is explored, highlighting the need for a balance between process count and system resources.

The video provides a real-life example of how increasing the size of RAM can lead to a near 100% CPU utilization in an ideal scenario.

Future videos will delve into Paging and Segmentation, which are memory management techniques for dividing processes into manageable blocks.

The video concludes by emphasizing the importance of Degree of Multiprogramming in achieving efficient memory management.

Transcripts

play00:00

Memory Management in Operating System. Memory Management in Operating System is what?

play00:05

It is a kind of method or it is a kind of functionality to manage the various kind of memories.

play00:11

Means in our laptop, in our system, there are lot of different types of memories available

play00:17

like we are having RAM, like we are having Hard Disk, like we are having registers,

play00:21

so how we can manage all the memory resources in a more and more efficient manner?

play00:28

This is the functionality of the Operating System. So I have written a single line that

play00:34

method of managing the primary memory. Why I have written the primary memory?

play00:38

Because out of all the types of memories, the majority of the memory is what? The RAM.

play00:44

Means we have to concentrate more on the RAM, means our system, how it actually works.

play00:51

Let's see with a simple diagram.

play00:57

CPU. The purpose of CPU is what? To execute the instruction, to execute the program.

play01:02

So program is what? A collection of instruction. So one by one instructions are to be executed,

play01:07

who does this? CPU. So CPU, it is generally directly connected with the registers,

play01:15

registers as well as cache memory.

play01:22

CPU is directly connected with the registers and cache.

play01:27

And it is also connected with the RAM,

play01:34

which also known as Primary Memory.

play01:43

And RAM is generally connected with the secondary memory.

play01:50

So we will see the hierarchy in the future videos on how the system is actually,

play01:58

how the memories are connected with each other, this I will tell you later.

play02:02

But the concept is what? The CPU executes instructions one by one and

play02:07

CPU is generally connected with what? With Register, cache and RAM. There is a direct connection.

play02:15

But secondary memory is not connected directly with the CPU. The reason is what? Speed.

play02:20

Because secondary memory is very slow, CPU is very fast so that's why

play02:24

we generally cannot directly connect them. So that's why in between we put faster memories

play02:30

that is Register, cache and RAM. Now there is a funda of science that here we have

play02:36

some size of register, some size of cache, some size of RAM. But

play02:41

like we are having an important part that is the RAM. Here if I increase size of RAM,

play02:50

then it will directly affect the cost of the system. Means RAM, cache and register

play02:57

if the size of any of these three, means if I put more registers in the system,

play03:01

put more cache or increase the RAM, then cost of the system will also get high.

play03:08

So if cost is very high then it is possible that it goes out of budget of normal user.

play03:13

So that's why generally the laptops or computers we purchase from the market,

play03:17

they have limited, like 4GB RAM is there, now 8GB RAM upto 16GB RAM is now available,

play03:23

but primarily the value was less. The funda is what? Why are we discussing about RAM here?

play03:31

Because in secondary memory almost all programs, whatever number of processes

play03:37

or generally we call programs, all the programs are available in the secondary memory.

play03:43

All the programs are available in the secondary memory which are to be executed now.

play03:49

CPU will execute them, but how will CPU execute these processes?

play03:55

For that I will have to bring the processes here,

play04:01

for CPU I will have to bring processes from secondary memory in the RAM so that

play04:08

CPU can directly interact with the processes and it can execute.

play04:13

This is a very important part. All the programs, like we make programs in C, in C++

play04:18

all the normal programs we make, the programs are sitting idle in the secondary memory.

play04:23

because size of secondary memory is very big so there accommodate as many programs as you can.

play04:30

Now when you have to execute these programs then to execute CPU is required.

play04:36

And how will CPU execute? CPU is not connected to secondary memory. So means

play04:41

we have to pick the programs and bring them where? In the RAM, so that

play04:48

CPU can directly interact with the RAM. And why does it have to come in RAM only?

play04:53

Because you can also use cache and register, size of register and cache is very less than RAM.

play04:59

The registers generally in our laptops, they are in the KBs, Kilobytes. So that is very small size.

play05:05

Although they are very fast, but the size is very less. Just for the simplification

play05:11

what I am trying to say, let's remove this hierarchy.

play05:16

We are not talking about the register and cache at this point of time.

play05:20

So means we are now talking directly about this. So means as many processes, as many programs or processes

play05:29

are present in secondary memory, we need to swap in all these processes,

play05:35

means those processes we will have to bring in the RAM, when the process enters the RAM

play05:39

now CPU can directly interact with the process and it can execute them one by one.

play05:46

And this is called the Degree of Multiprogramming. What Multiprogramming concept says,

play05:56

Multiprogramming means

play06:00

whenever we are keeping the programs in the secondary memory and

play06:05

when we are bringing that program in the RAM then don't bring one program in the RAM

play06:11

try to bring more than one processes in the RAM. That is called the Multiprogramming.

play06:18

We can know from the name multiple programs, why multiple programs? why there is a need?

play06:24

That maximum, what is the line here? That bring maximum number of programs or processes

play06:30

from secondary memory in the RAM, in the main memory so that CPU can execute them.

play06:37

Now what is the advantage of bringing maximum number of programs? The advantage is that

play06:42

higher the Degree of Multiprogramming higher the utilization of CPU. If we take simple example,

play06:50

let's say that if I bring P1 process in the RAM. I bring only one process in the RAM.

play06:59

CPU starts executing that process, it is executing, as we already know each process

play07:08

can have 2 types of things, one is the CPU, one is the I/O. Means a process will get executed

play07:17

how will it execute? Either CPU will execute it and it is possible that

play07:22

that process makes a request for Input/Output in between.

play07:25

Means it wants to use printer or scanner or wants to read a particular file from secondary memory,

play07:33

then it is possible that it makes an I/O request. So when a process makes an I/O request,

play07:39

then CPU at that time makes it free, means okay, get blocked and go there and start using I/O.

play07:48

So let's say that P1 was being executed, CPU is executing P1,

play07:53

CPU is executing this P1, and in between P1 says that I want to do some I/O operation.

play08:02

If I want to do some I/O operations, if P1 is saying that then what will CPU say?

play08:09

Okay, you can do the I/O operation. Now that process exits CPU so at that time

play08:16

what is the CPU executing? CPU is free at that time because P1 process exits from here,

play08:23

exits from RAM, and it is doing I/O work, when it is doing I/O work then CPU at that time

play08:30

is not executing P1. So means we can say CPU will sit idle.

play08:37

And this is what we should not do. If CPU is idle means obviously

play08:42

efficiency of the system will be down. Performance will be down.

play08:46

And we don't have to let it be down. So what is the Degree of Multiprogramming?

play08:53

Degree of Multiprogramming is keep more and more number of processes in the RAM.

play09:00

Means bring as many number of processes as you can and try keep in the RAM so that

play09:05

efficiency of the system is very high, means when utilization of CPU is very high

play09:10

then performance of system will automatically increase.

play09:13

For more detail let's solve one numerical. We'll solve this with a numerical

play09:19

you will get more clarity from that.

play09:22

Let's say

play09:25

I'm having

play09:28

RAM of size 4MB.

play09:37

Let's say I'm having RAM of size 4MB and there is one process,

play09:41

process size is also 4MB.

play09:45

RAM size is 4MB, process size is 4MB. Now how many processes can be there in the RAM?

play09:52

Simple, one. Because what is the RAM size? 4MB and what is the process size? 4MB.

play09:57

So it will be 1. So how many number of processes can come in the RAM?

play10:02

There is only 1 process that can come. So let's say that process P1 comes in the RAM.

play10:10

Now there is a probability that process will go for the I/O operation.

play10:16

Let's say there is a probability K,

play10:32

K is a probability or we can say K is time, amount of time that a process will do I/O operation.

play10:40

K is time for I/O operation.

play10:47

A process will take K amount of time to do the I/O operation. So if out of total time,

play10:55

it is doing I/O operation for K time then for how much time is it executed in CPU?

play11:00

For CPU it will execute for (1-K) time. As we already know that one process does only 2 jobs,

play11:09

either it will be executed by CPU or it will perform I/O operation. So one process is going on,

play11:15

it is being executed by CPU, in between it says that I want to do some I/O operation.

play11:21

Then okay, it will go for the I/O operation, so at that time CPU cannot execute it.

play11:27

So that's what we have taken here. Let's say that for K amount of time any process,

play11:33

take this P1 process, that P1 process for K amount of time is performing I/O operation.

play11:39

So if it is performing I/O operation for K amount of time,

play11:42

then how much will be CPU utilization here? CPU utilization is 1-K.

play11:52

Because subtracted K from total so 1-K. Now let's say this K amount of time is let's say 70%.

play12:01

Means out of total time 70% of the time it does I/O operation so remaining

play12:08

1-K that is 30% it does what? Performing in CPU. Means 70% it does I/O, so means

play12:17

1-70%, 1 is 100%, so 100%-70% it will be 30%. So 30% what it is performing? CPU utilization.

play12:28

Means using the CPU. So check, what is the utilization here? How much is CPU utilization? Only 30%.

play12:37

Why? The reason, because there was only one process. Now what we are doing,

play12:44

let's increase the size of the RAM. Let's say that now RAM size let's take as 8MB.

play12:53

Process size is same, process is still 4MB.

play13:00

So size of one process is 4MB, size of RAM is 8MB, number of processes

play13:06

number of processes

play13:09

that can come in the RAM, that can accommodate in the RAM it will be 2.

play13:15

8MB divided by 4MB it will be 2. So now we can say 2 number of processes can come in the RAM.

play13:25

Now that same thing that if one process for K amount of time,

play13:30

single, one process for K amount of time what is it doing? Performing I/O operation.

play13:37

If one process for K amount of time is performing I/O operation then here how many I have? 2 K.

play13:44

So means total time becomes how much? K square. So what is the total time? Upto K square

play13:50

time the processes are performing what? I/O operation. Then what will be the CPU utilization?

play13:57

CPU utilization will be 1-K^2.

play14:07

First here it was only single because there was only 1 process,

play14:10

that's why what we did, what is I/O operation? For K amount of time. Here what is I/O? K^2

play14:18

because here there are 2 processes both are using K amount of time so K*K will be K^2

play14:25

will be the total time used for the I/O operation. So if K^2 is for I/O then

play14:31

how much for CPU utilization? 1-K^2. And value of K we have taken let's say 70% what is it doing?

play14:39

I/O operation. So CPU utilization here will be how much? 1-let's say (0.7)^2

play14:47

which is equal to near about 76%. Approximately 76%. So see the difference,

play14:54

when there was only 1 process, the utilization was only 30%.

play14:59

Now I just increased the size of the RAM,

play15:02

CPU utilization is increased by a huge amount of time that is 76%.

play15:08

Let's say again increase, again we increase the size,

play15:15

Now let's say the RAM is 16MB and the process is still 4MB.

play15:25

Process still 4MB, RAM is 16MB, now how many number of processes?

play15:30

Number of processes will be 4.

play15:36

How many number of processes can I accommodate in the RAM? Will be 4.

play15:40

So now 4 processes can be accommodated in the RAM. So same we are doing,

play15:46

if K is the amount of time that one process is doing the I/O operation.

play15:54

One process is performing I/O operation for K amount of time so here if we say that

play16:01

let's say all 4 are doing the I/O operation at same time, what is the probability that

play16:07

all 4 are doing the I/O operation at same time? The total will be K to the power 4.

play16:21

Then what will be the CPU utilization? CPU utilization will be 1-K^4.

play16:32

And K value we have already taken as 70% that out of total time, 70% of the time

play16:39

it does I/O, so means if all 4 perform I/O operation at the same time

play16:44

then the time will be K^4. So what is the CPU utilization? 1-K^4.

play16:50

So if you simply substitute the value K that is 70% so here I will have an answer

play16:56

Near about 93%. Approximately it will come 93 or maybe around 94% the result will come.

play17:05

You can simply substitute the value and you can find out it will be 93 or approximately 94 we can say.

play17:13

93 point something so let's say approximately it is 94%, it is also approximate 76,

play17:21

so let's say approximate it is 94.

play17:23

See what is the point? Point is that whenever we increase the size of RAM,

play17:30

the CPU utilization is increased. So means if I make number of processes very high

play17:38

or you can say, how will number of prcocesses be high? Here what was the number of processes? 1.

play17:45

Number of processes here? 2. Number of processes here? 4.

play17:49

But how did they become 4? We can only accommodate 4 when the size of RAM is big.

play17:57

So there are 2 points here, first we have to increase the number of processes.

play18:00

To increase the number of processes means to increase the Degree of Multiprogramming,

play18:05

I will have to increase size of RAM. And if we increase size of RAM then obviously

play18:11

more and more processes will be accommodated, and when more and more processes are accommodated

play18:16

then CPU utilization will be high. So this is the concept.

play18:20

So here if I take number of processes upto 'n', means let's say if I take it upto 1-K^n,

play18:31

then value will come near about 100%. Means my CPU utilization will be 100%.

play18:37

Because already it is increasing upto 94%, now if you want you can do 32MB,

play18:44

increase size of RAM to 32MB and then, size of process is fixed that is 4MB,

play18:50

so automatically you can see the utilization is increasing. So what is my point here?

play18:56

Generally we say, in all the theory, we generally say that Degree of Multiprogramming

play19:02

means more and more number of processes in the RAM. This is the only definition.

play19:07

But how we can bring more and more number of processes?

play19:12

For that I will have to increase size of the RAM and when I increase size of the RAM

play19:17

then definitely more and more number of processes will be accommodated there.

play19:21

And then CPU utilization will automatically increase. A real life example of this,

play19:27

a numerical we solved here so you can easily judge this from here also.

play19:32

So here my memory management technique, memory management technique says what?

play19:37

Although we have to manage all memories, Operating System manages all memories,

play19:43

but here for which memory this management is most important? RAM. Reason is that

play19:49

whatever number of processes which are present in the secondary memory,

play19:58

and this is my RAM, and this is the CPU.

play20:02

so whatever number of processes which are present where? In the secondary memory.

play20:05

So from the secondary memory, to bring more and more number of processes in the RAM,

play20:11

this is also responsibility of what? Operating System.

play20:14

So this is a part of the memory management.

play20:17

Second, we said that bring more and more processes in the RAM,

play20:21

so due to this functionality of Operating System increased, what is the functionality?

play20:27

Allocation, deallocation. It will have to concentrate more on allocation and deallocation.

play20:32

When more and more number of processes come in the RAM

play20:35

then more and more allocation will happen and when the processes will go back

play20:40

then deallocation will be there. And here funda of security will also be used. Why?

play20:44

Because the more processes we bring in the RAM, it is possible that

play20:49

one or two processes may interfere with each other,

play20:53

means their instructions may interfere with each other. So Operating System takes care of this also

play20:59

that no, this type of problem should not happen. The size or memory allocated to some process,

play21:09

it will use only that much space, more than that its instruction cannot come out.

play21:13

So funda of security, allocation deallocation, that is done by the

play21:17

Operating System in the memory management. So that's why this is the important part

play21:22

that why we relate Degree of Multiprogramming to memory management and here

play21:27

the entire memory management, the majority of memory management is that

play21:33

bring more and more processes in the memory, in which memory? In RAM.

play21:38

But that is a challenge in itself. Challenge is in one more sense that

play21:43

it may happen that I bring a process entirely, one full process I bring in the RAM,

play21:49

and second can also be that I divide the process into fractions, and some of its part,

play21:56

the part that is required I bring only that, that will be seen in Paging and Segmentation further.

play22:01

But yes, we can also bring the entire process in the RAM.

play22:06

But let's say that a process of 4MB we bring in the RAM, then it is possible that

play22:10

only 1 or 2 instructions we to be executed in it, so 1 or 2 instructions are in bytes,

play22:16

means CPU only wanted data of 1 or 2 bytes, but I bring 4MB data in the RAM to execute,

play22:24

then obviously here also efficiency of system can be affected because this much data

play22:29

through buses, through the data bus you have to travel, so instead of travelling more data

play22:35

what we do? We generally divide the process in fractions, in multiple blocks and

play22:41

we bring blocks of some processes like we bring one block of P1, second block of P2,

play22:47

some other block of P3, some other block of P4 process, some other block of P5, some other of P6,

play22:53

means we try to bring their blocks in the RAM. But how we divide these blocks and all,

play22:59

that will be seen in the further videos of Paging and Segmentation.

play23:03

So this is all about how we relate Degree of Multiprogramming and Memory Management with each other

play23:09

and why the Degree of Multiprogramming is very important, and how to achieve it?

play23:15

Concept is simple, increase the size of RAM and when you increase the size of RAM,

play23:20

more and more processes will be accommodated. And how will CPU utilization increase?

play23:26

You can easily check through this example.

play23:29

So this is all about Memory Management and Degree of Multiprogramming.

play23:33

So if you like the video then please like it, share it and please subscribe my channel, thank you.

Rate This

5.0 / 5 (0 votes)

الوسوم ذات الصلة
Memory ManagementOperating SystemCPU UtilizationRAMSecondary MemoryMultiprogrammingEfficiencyAllocationDeallocationPaging
هل تحتاج إلى تلخيص باللغة الإنجليزية؟