Basics of OS (Storage Structure)

Neso Academy
21 Aug 201710:02

Summary

TLDRThis lecture delves into the storage structure hierarchy of operating systems, illustrating the progression from fast but small Registers to larger, slower secondary storage devices. It emphasizes the importance of main memory, or RAM, where data is executed, contrasting it with secondary memory, which stores data and programs. The concept of volatile and nonvolatile memory is clarified, with main memory being volatile and secondary storage nonvolatile, except for special cases like NVRAM. The lecture aims to clarify the basics of storage devices in operating systems.

Takeaways

  • 📚 The lecture discusses the storage structure hierarchy in operating systems, starting from the smallest and fastest registers to the largest and slowest magnetic tapes.
  • 🔍 Registers are the smallest and fastest storage devices, storing data in bits and providing quick access.
  • 💡 Cache is slightly larger than registers but slower in speed, sitting between registers and main memory in the hierarchy.
  • 🧠 Main memory, or RAM, is crucial for executing programs loaded from secondary storage and is volatile, meaning it loses data when power is off.
  • 💾 Secondary storage devices like electronic disks, magnetic disks, optical disks, and magnetic tapes are larger, slower, and nonvolatile, retaining data even without power.
  • 📈 As you move up the storage hierarchy, devices become more expensive, faster, and have smaller capacities with shorter access times.
  • 📉 Conversely, moving down the hierarchy increases cost per bit, access time, and device size, offering more storage for less speed.
  • 🏢 The function of main memory is to hold and execute data and programs temporarily, while secondary memory serves as long-term storage.
  • 🔄 The process of loading data from secondary to main memory is essential for execution, highlighting the importance of RAM size for computer speed.
  • 📚 An analogy is made comparing secondary memory to a bookshelf and main memory to a reading table, emphasizing the limited space for active tasks.
  • 🔑 Volatile storage devices lose their content upon power loss, whereas nonvolatile devices retain data, with special mention of NVRAM as a nonvolatile form of RAM.
  • 🔑.1 The nature of storage devices as volatile or nonvolatile is fundamental to understanding how data is managed and preserved in computer systems.

Q & A

  • What is the hierarchy of storage devices in a computer system?

    -The hierarchy of storage devices in a computer system, from top to bottom, includes Registers, Cache, Main Memory (RAM), Electronic Disk, Magnetic Disk, Optical Disk, and Magnetic Tapes.

  • What are the characteristics of Registers in terms of size and speed?

    -Registers are the smallest storage devices, storing data in bits (0's or 1's). They are the fastest to access due to their small size.

  • How does the size and speed of Cache compare to Registers?

    -Cache is slightly larger in size than Registers and its speed is slightly slower compared to Registers.

  • What is the role of Main Memory in a computer system?

    -Main Memory, also known as RAM (Random Access Memory), is where data and programs are loaded for execution. It is volatile in nature and has a limited size.

  • What are the features of Secondary Storage devices?

    -Secondary Storage devices like Electronic Disk, Magnetic Disk, Optical Disk, and Magnetic Tapes are nonvolatile, meaning they retain data even when power is removed. They are larger in size and slower in access time compared to primary storage.

  • Why is the cost per bit higher in devices higher in the storage hierarchy?

    -As you go up the storage hierarchy, devices become more expensive, smaller in size, and faster in access time, which results in a higher cost per bit.

  • How does the size of RAM affect the performance of a computer?

    -A larger RAM allows more data and programs to be loaded into the main memory, which can improve the speed and performance of a computer.

  • What is the difference between volatile and nonvolatile memory?

    -Volatile memory, such as Registers, Cache, and Main Memory, loses its contents when power is removed. Nonvolatile memory, like Secondary Storage devices, retains its data even when power is removed.

  • What is the analogy used in the script to explain the relationship between main memory and secondary memory?

    -The analogy used is that of a bookshelf and a table. The bookshelf represents secondary memory where data is stored, and the table represents main memory where data is loaded for execution.

  • What is NVRAM and how does it differ from typical RAM?

    -NVRAM (Non-Volatile Random Access Memory) is a type of RAM that retains its data even when power is removed, typically through a battery backup. This is different from typical RAM, which is volatile and loses its data when power is removed.

  • Why is it important to understand the nature of storage devices in an operating system?

    -Understanding the nature of storage devices helps in optimizing the use of memory, managing data storage efficiently, and improving the overall performance of the computer system.

Outlines

00:00

💾 Storage Device Hierarchy and Main Memory Basics

This paragraph introduces the concept of storage structures in operating systems, focusing on the hierarchy of storage devices. It starts with the smallest and fastest storage units, registers, which store data in bits. The explanation then moves to cache, which is slightly larger and slower than registers. The main memory, or RAM, is highlighted as a crucial component where data is loaded and executed. The paragraph also introduces secondary storage devices like electronic, magnetic, optical disks, and magnetic tapes. The hierarchy is characterized by increasing cost, decreasing access time, and smaller size as one moves up. The importance of RAM's speed and its limited, volatile nature is emphasized, explaining that data in RAM is lost when power is removed, unlike secondary storage which retains data even without power.

05:04

📚 Main Memory and Secondary Memory: A Practical Analogy

The second paragraph uses an analogy to explain the relationship between main memory (RAM) and secondary memory. It likens the secondary memory to a large bookshelf that stores many books (data), and the main memory to a small table where only one book (data set) can be read at a time. The analogy illustrates the concept that the size of the main memory limits the amount of data that can be actively used, regardless of the size of secondary storage. The paragraph further clarifies the difference between volatile (main memory, cache, registers) and nonvolatile (secondary storage) storage, emphasizing that volatile storage loses data when power is off, while nonvolatile storage retains data. It also mentions special cases like NVRAM, a nonvolatile type of RAM with battery backup, providing a comprehensive understanding of memory characteristics.

Mindmap

Keywords

💡Storage Structure

Storage structure refers to the hierarchy of different storage devices within a computer system and their organization. It is central to the video's theme as it sets the stage for understanding how data is stored and accessed at various levels. In the script, the concept is introduced with a diagram that outlines the hierarchy from registers to magnetic tapes.

💡Registers

Registers are the smallest and fastest storage units within a computer's CPU, capable of storing data in binary form. They are highlighted in the script as the starting point of the storage hierarchy, emphasizing their quick access time and minimal size, which is measured in bits.

💡Cache

Cache is a type of fast memory that sits between the CPU and main memory to facilitate quicker data retrieval. The script explains that cache is larger than registers but slower in speed, illustrating the trade-off between speed and size in the storage hierarchy.

💡Main Memory

Main memory, also known as RAM (Random Access Memory), is where active data and program code are stored for immediate use by the CPU. The script underscores its importance by stating that it is where data is executed, highlighting its role in the computer's operational speed and efficiency.

💡Secondary Storage

Secondary storage encompasses devices like electronic disks, magnetic disks, optical disks, and magnetic tapes, which are used for long-term data storage. The script describes these as non-volatile, meaning they retain data even when power is off, in contrast to main memory.

💡Volatile

Volatile refers to the nature of certain types of memory that lose their contents when power is removed. The script uses this term to describe registers, cache, and main memory, emphasizing their temporary nature in storing data.

💡Non-volatile

Non-volatile memory retains data even after the power is turned off. The script contrasts this with volatile memory, pointing out that secondary storage devices are non-volatile, thus suitable for long-term data retention.

💡Random Access Memory (RAM)

RAM is the primary form of main memory in computers, where data and program code are loaded for execution. The script explains that having more RAM can make a computer faster, as it allows more data to be loaded and processed simultaneously.

💡Access Time

Access time is the duration it takes for a storage device to locate and retrieve data. The script discusses how access time increases as you move up the storage hierarchy, with registers having the fastest access time and larger storage devices having slower access times.

💡Cost per Bit

Cost per bit is the cost associated with storing a single unit of data, typically measured in bits. The script mentions that as you ascend the storage hierarchy, the cost per bit increases, reflecting the higher expense of faster, smaller storage devices.

💡NVRAM

NVRAM, or Non-Volatile Random Access Memory, is a special type of RAM that retains its data even when power is not supplied, often through a battery backup. The script introduces NVRAM as an exception to the volatile nature of main memory, highlighting the advancement in memory technology.

Highlights

Introduction to the storage structure in operating systems.

Explanation of different storage devices in computer systems and their functions and features.

Diagram of the storage device hierarchy, including Registers, Cache, Main Memory, Electronic disk, Magnetic disk, Optical disk, and Magnetic Tapes.

Registers are the smallest storage devices, storing data in bits and offering the fastest access time.

Cache is larger than registers but slower in speed.

Main memory, exemplified by RAM, is crucial for loading and executing data.

Secondary storage devices include Electronic disk, Magnetic disk, Optical disk, and Magnetic tapes.

As you move up the hierarchy, devices become more expensive, faster, and smaller in size.

Registers have the fastest access time, and cost per bit increases as you move down the hierarchy.

Electronic disk, Magnetic disk, Optical disk, and Magnetic tape have increasing cost and access time.

Main memory (RAM) is where data is loaded for execution, emphasizing its importance.

Secondary memory stores data and programs, which are loaded into main memory for execution.

Example given of Microsoft Word software residing in secondary memory and being loaded into main memory when used.

Larger RAM results in faster computer performance.

Analogy of a bookshelf and table to explain the relationship between secondary memory and main memory.

Main memory is volatile, losing its contents when power is removed, unlike secondary memory which is nonvolatile.

Electronic disk can be both volatile and nonvolatile, depending on its design.

NVRAM is a nonvolatile RAM with battery backup to retain data even when power is removed.

Summary of the storage structures and devices as basics of the operating system.

Transcripts

play00:00

As we continue to study the basics of the Operating system,

play00:03

In this lecture we will study the storage structure.

play00:07

So, as we study the storage structure, we will see

play00:10

different storage devices that we have in our computer systems

play00:14

and we will see what are their functions and what are their features.

play00:18

So, here we have a diagram given.

play00:21

And the diagram represents the storage device hierarchy.

play00:26

So, on the top, we have Registers, followed by Cache,

play00:31

then we have the Main memory and then Electronic disk

play00:34

then Magnetic disk, then Optical disk and Magnetic Tapes.

play00:40

So, if you look at these devices, starting from Registers

play00:44

Registers are the smallest storage devices.

play00:48

They store data in bits, that means in 0's or 1's.

play00:54

So, they are the smallest devices and since they store only in bits,

play01:00

they can be accessed very quickly and then the next one is the Cache.

play01:06

The size of the cache is a little bigger than that of the registers.

play01:10

but its speed is a little slower as compared to the registers.

play01:15

And then after that, we have the main memory,

play01:18

Which is a very important thing that you need to know,

play01:20

Examples of main memory are

play01:22

random access memory or RAM, which I will discuss in detail.

play01:27

and then we have Electronic disk, Magnetic disk,

play01:31

Optical disk and Magnetic tapes.

play01:33

So, these are the secondary storage devices.

play01:37

So, I shall explain to you what is the main memory?

play01:40

and what are the secondary storage devices as we proceed further.

play01:44

So, if we look at this Hierarchy, when you go up

play01:49

It becomes expensive, they are expensive but fast.

play01:53

And then the size also becomes smaller as you go up the hierarchy.

play01:58

So, this is the biggest size and when you go up to this

play02:02

the size of the devices becomes smaller and smaller.

play02:05

But their access time and cost become higher and higher as we go up the hierarchy.

play02:14

So, we can say that the registers are the smallest

play02:17

but their access time is the fastest.

play02:21

And as you go down the hierarchy the cost per bit increases,

play02:27

then the access time also increases and their size also increases

play02:33

So, we can see that if you want small size and fast access

play02:37

then this is where you have to go, and if you want a bigger size for storing more data

play02:44

then you have to go down this hierarchy.

play02:46

Coming to this Electronic disk, Magnetic disk, Optical disk, and Magnetic tape,

play02:51

the cost and access time increases.

play02:55

Now, as we talk about this, we have to talk about our main memory.

play02:59

This is the most important thing that we need to talk about.

play03:01

So, the main memory is your RAM or the random access memory.

play03:05

And what is the function of the main memory?

play03:08

In the main memory, anything that you load into your computer

play03:12

gets loaded into your main memory.

play03:14

And that is where it is executed.

play03:16

So, things are stored in your secondary memory

play03:20

but things are loaded to your main memory for the execution purpose.

play03:25

Now, what do we mean by secondary memory?

play03:27

This main memory is fast, but its size is limited also it is volatile in nature.

play03:35

And I will explain you what is the meaning of volatile.

play03:37

but, remember that the size of the main memory is small.

play03:42

So, you can not store all your programs and data into the main memory.

play03:47

So, for that purpose we have our secondary memory.

play03:51

so, in our secondary memory we store all our data and all other things that we need.

play03:58

And when it has to be loaded or executed,

play04:01

it is loaded into the main memory and then executed.

play04:04

So for example, let's say that you have

play04:07

a word-processing software that is the Microsoft Word.

play04:11

So, if you have Microsoft Word, it is installed in the secondary memory.

play04:15

It stays or resides in the secondary memory

play04:18

but when you double clicked or open it, then it gets loaded in the main memory

play04:23

because you are going to perform some task in that Microsoft word.

play04:27

So, whenever you execute something it gets loaded into the main memory,

play04:32

otherwise it resides in the secondary memory.

play04:35

So, all your data reside in the secondary memory

play04:38

and are loaded to the main memory at the time of execution.

play04:42

Now, we say that if you have a larger or a bigger RAM

play04:48

then your computer works faster.

play04:50

you must have heard this many times.

play04:53

when you have more random access memory or RAM, your computer is faster.

play04:59

So, remember that the main memory is your RAM.

play05:04

So, for explaining this let me take a simple example.

play05:07

Imagine that you are in a room, in your study room

play05:11

and then you have a bookshelf.

play05:13

You have a big bookshelf, where you can store many books.

play05:17

and on that bookshelf, you have lots of books.

play05:21

And beside you there is a table, a small table on which you keep your books for reading.

play05:29

Now think of the bookshelf as the secondary memory and books as the data.

play05:35

So, all the data, that is your books are kept on the bookshelf.

play05:40

But when you want to read a book, what do you do?

play05:44

You take out the book from the bookshelf, keep it on the table, and then you read it.

play05:49

So, just assume that you only read the books on the table,

play05:52

you don't like to read it on other ways.

play05:54

So, whenever you want to read, you take a book from the bookshelf,

play05:58

and you keep it on the table and then you read it.

play06:01

Consider the table to be your main memory or your RAM.

play06:06

Now, let's say that your table is very small.

play06:10

So, if your table is very small, what happens?

play06:12

Let's say you can keep only one book at a time on your table.

play06:16

So, if you can keep only one book at a time,

play06:19

you cannot use more than one book for studying.

play06:23

Even if you want to refer two three books for study, you cannot do

play06:26

because you can only accommodate one book on your table.

play06:29

No matter how big your shelf is

play06:32

the number of books that you can study at a time depends upon the size of the table.

play06:38

So, the table you can consider as the main memory.

play06:42

So, in the same way, even if you have a large secondary memory,

play06:46

you load and dis-load things into the main memory.

play06:50

So, if you have a bigger main memory,

play06:52

you can load multiple things and your computer works faster.

play06:56

And if you have a smaller main memory then things will be loaded in a slower way

play07:01

and your computer will be slower.

play07:03

So, that is why you usually hear that when you have more RAM,

play07:07

your computer audio system performs faster.

play07:11

now, as I was explaining to you I said that

play07:13

main memory is volatile as compared to secondary memory which is non volatile.

play07:19

Now, let's try to understand the meaning of the volatile and nonvolatile.

play07:23

So, volatile means that it loses its contents when the power is removed.

play07:28

So,all these devices like your main memory, cache, and your registers,

play07:33

they are volatile in nature.

play07:35

which means that when the power of these devices is switched off

play07:40

then whatever was stored in these devices will be removed or erased.

play07:45

Alright!

play07:46

And on the other hand, the secondary memory that you have is nonvolatile

play07:51

which means that,

play07:52

it retains its contains even when the power is removed.

play07:56

So, even if you switched off the power of these nonvolatile devices

play08:01

there contains will not get erased.

play08:04

They will be retained even when the power supply is removed.

play08:07

So here Registers, Cache, and Main Memory are volatile.

play08:11

Whereas Electronic disk, Magnetic disk, Optical disk, and Magnetic tape,

play08:16

which basically are secondary storage devices, are nonvolatile.

play08:20

This electronic disk sometimes it can be made to be

play08:23

volatile as well as nonvolatile.

play08:25

And even in your main memory, your RAM,

play08:28

there are different kinds of RAM that you have.

play08:30

And there is also a nonvolatile RAM called NVRAM,

play08:34

which has a battery backup

play08:36

in order to retain its contains even when the power is removed.

play08:39

So, those are some special cases.

play08:41

But, basically these registers, cache, main memory are volatile.

play08:46

whereas the secondary storage devices are nonvolatile.

play08:51

So, once more let me tell you what is the meaning of volatile.

play08:55

So, in volatile when the power supply is there,

play08:58

then these devices will retain their data or contains.

play09:02

But when the power is removed or the power supply is gone

play09:07

then whatever contains or data that are there in these volatile devices

play09:13

will be removed or erased.

play09:16

So, in nonvolatile whether the power is there or not its contains are retained.

play09:22

So, in volatile devices only when the power is there

play09:26

its contains will be retained, otherwise it will be removed.

play09:29

So, these are some of the things that you should know

play09:32

about storage structures and storage devices.

play09:36

which are also basics of the operating system.

play09:38

So, we understood the hierarchy,

play09:40

and we understood what are main memory, and secondary memory,

play09:43

We also understood there natures and features.

play09:47

So, I hope its all clear to you.

play09:49

Thank you for watching and see you in the next one!

Rate This

5.0 / 5 (0 votes)

الوسوم ذات الصلة
Storage HierarchyOperating SystemComputer MemoryMain MemorySecondary StorageCache MemoryRegistersRAMVolatile StorageNonvolatile StorageData Access
هل تحتاج إلى تلخيص باللغة الإنجليزية؟