YouTube2Text

Sistemas Operativos, Manejo de la memoria 1 Introducción — Transcript

by Mtro. José Luis Elvira · 1,111 words · 167 segments · language en · Watch on YouTube

Full transcript

  1. 0:00Hello, how are you? How are you doing?
  2. 0:03Welcome to the Operating Systems
  3. 0:05Fundamentals course. We are going to
  4. 0:08start looking at memory management, for
  5. 0:10which I will base myself on Chapter 8
  6. 0:12of the textbook by Silberschatz and
  7. 0:14Galvin. We will cover this topic in the
  8. 0:19following sections. First, we will
  9. 0:21begin with an introduction to what
  10. 0:23memory management is. Later, we will
  11. 0:27see what the logical address space is
  12. 0:29versus the physical address space. We
  13. 0:34will talk about swapping, contiguous
  14. 0:37allocation, paging, segmentation, and
  15. 0:40segmentation combined with paging. We
  16. 0:45will start with the introduction. So
  17. 0:49let's begin. Here I have, for example,
  18. 0:53some programs on a disk. Over here, I
  19. 0:56have the memory. So, what happens?
  20. 1:00These programs will be brought into
  21. 1:03memory and established as processes
  22. 1:06that will be executed. For this, there
  23. 1:11will be an input queue, and this way,
  24. 1:14programs are brought into memory for
  25. 1:18execution, and these are now processes.
  26. 1:25Now, user programs go through several
  27. 1:28stages before being executed. For
  28. 1:33example, here I have an assembly
  29. 1:35program. This program, as we are seeing
  30. 1:41, has references to some labels, such
  31. 1:44as the label "data," which refers to a
  32. 1:47piece of data in the data segment area,
  33. 1:50and it has a jump to a "loop" label
  34. 1:53that is inside the code segment. When
  35. 1:58this program is brought into memory,
  36. 2:01these labels, for example, the label "
  37. 2:05data," must be translated into the
  38. 2:08corresponding address. That is, we will
  39. 2:11no longer have "sub R1 data," but
  40. 2:14rather "sub R1," which is the content
  41. 2:18of address 100. And this jump will be
  42. 2:22to address 200, which is where the "
  43. 2:25loop" label is, or the next instruction
  44. 2:28after the "loop" label. Now, this
  45. 2:34association of instructions and data to
  46. 2:38memory addresses can occur in the
  47. 2:41following three ways. One is at compile
  48. 2:46time. What is this? It means that the
  49. 2:50memory addresses where each of the
  50. 2:52program's instructions and data will be
  51. 2:54located are known a priori. This is
  52. 2:57also called absolute code. And if
  53. 3:00something changes in the program, that
  54. 3:03is, if an address or the starting
  55. 3:05address changes, the program must be
  56. 3:07recompiled. This is obviously very
  57. 3:11useful when the software is going to be
  58. 3:14burned into ROM, and in a way, there
  59. 3:16will be no further changes to where in
  60. 3:19memory this program will be located
  61. 3:21when it starts its execution. This can
  62. 3:26also happen at load time, meaning it is
  63. 3:30code that will now be relocatable. Once
  64. 3:35the code is loaded into memory, it can
  65. 3:37no longer be moved. It will stay there.
  66. 3:41But it can also happen at runtime. And
  67. 3:45when it is at runtime, the process can
  68. 3:48move in memory during its execution.
  69. 3:52And in this way, address assignment is
  70. 3:55done until the moment the program
  71. 3:57begins execution. This requires special
  72. 4:01hardware. For example, here I have the
  73. 4:07same program I showed you a moment ago,
  74. 4:10where I already have, for example, the
  75. 4:12labels translated into memory addresses
  76. 4:15. For example, here we are subtracting
  77. 4:19the data at address 100 from register
  78. 4:21one, that is, the data that is here.
  79. 4:25And here we perform a jump to address
  80. 4:27200. If this program leaves memory and
  81. 4:31returns, but returns loaded into a
  82. 4:34different memory address, then
  83. 4:36obviously these references are no
  84. 4:39longer valid. Agreed? Why? Well,
  85. 4:42because it is no longer address 100
  86. 4:45that we have to subtract from register
  87. 4:47R1, nor is it address 200 where we have
  88. 4:50to jump. In other words, these
  89. 4:53addresses must now be updated. Dynamic
  90. 4:59loading. What is this? It means a
  91. 5:01routine will not be loaded into memory
  92. 5:04until that routine is called. That is
  93. 5:10to say, a routine that is never used
  94. 5:12will never be loaded, and therefore
  95. 5:14this allows us to have better memory
  96. 5:16space utilization, agreed? I won't have
  97. 5:20routines that are not being used. This
  98. 5:26is useful when large amounts of code
  99. 5:28are needed to handle cases that don't
  100. 5:31occur frequently, and no special
  101. 5:33operating system support is required
  102. 5:36and it can be implemented by program
  103. 5:38design. A very clear example, well, I'm
  104. 5:44going to tell you about MS-DOS and the
  105. 5:48microprocessor on which MS-DOS ran,
  106. 5:51which was the Intel 8086/8088, although
  107. 5:54of course, the Intel 80386, 486, and
  108. 5:57Pentium were also used, but running in
  109. 6:01a mode where they behaved like a faster
  110. 6:048086/8088, that is, a very limited mode
  111. 6:07. Agreed? The MS-DOS operating system
  112. 6:12is an operating system, or was an
  113. 6:14operating system, that was very limited
  114. 6:17in terms of many functions that modern
  115. 6:19operating systems perform today. Here I
  116. 6:23have the memory and I have a space
  117. 6:26assigned to this program. Agreed? What
  118. 6:31happens? Well, the main module is
  119. 6:34loaded into memory, and when this main
  120. 6:37module needs to use routines that are
  121. 6:40in module one, this module one is
  122. 6:42brought into memory; but, once module
  123. 6:45one is no longer used and routines from
  124. 6:48another module are needed, then that
  125. 6:51module one is unloaded and the next
  126. 6:54module we need, in this case, module
  127. 6:57two, is brought into memory. In the
  128. 7:01same way, when module 2 is no longer
  129. 7:05required in memory, it disappears and
  130. 7:08module 3 is loaded into memory. This
  131. 7:14was used a lot in the late 80s and 90s,
  132. 7:17when MS-DOS was the operating system
  133. 7:20used on personal computers, and above
  134. 7:23all, the memory allocated for programs
  135. 7:27to execute was a very limited space. I
  136. 7:32can tell you that back then there were
  137. 7:35only 640 KB available for programs to
  138. 7:38run. Okay. Well, dynamic linking. What
  139. 7:46is this? Well, you know that when you
  140. 7:49normally compile a program and build
  141. 7:52the executable, a linking process
  142. 7:54occurs. What do I mean by this? That
  143. 7:57all the libraries are added to that
  144. 8:00program, sometimes leaving an
  145. 8:02executable program that can be quite
  146. 8:04large. Dynamic linking means that the
  147. 8:08linking is now postponed until runtime.
  148. 8:14In this way, the programs will have a
  149. 8:17stub, which is a small piece of code
  150. 8:20used to locate the library routine that
  151. 8:23will be resident in memory. That is,
  152. 8:28now the library routines will no longer
  153. 8:31be part of the executable program,
  154. 8:33which sometimes leaves us with a rather
  155. 8:36large executable, but now those
  156. 8:39routines will be resident in memory.
  157. 8:43And the programs will simply invoke
  158. 8:45those routines. What happens then? Well
  159. 8:50, that stub is replaced with the
  160. 8:52address of the routine, and the routine
  161. 8:54is executed. In this way, the operating
  162. 8:59system is needed to check if the
  163. 9:01routine is in the process's memory
  164. 9:03addresses. Thank you very much for your
  165. 9:07attention. I hope it was clear, and in
  166. 9:10any case, we will discuss it and answer
  167. 9:12any questions.

About this transcript

This page contains the full transcript of Sistemas Operativos, Manejo de la memoria 1 Introducción by Mtro. José Luis Elvira, generated from the public captions YouTube serves with the video. The transcript has 1,111 words across 167 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.