YouTube2Text

03 05 Processes Part 5 — Transcript

by Santelmo · 997 words · 225 segments · language en · Watch on YouTube

Full transcript

  1. 0:08[Music]
  2. 0:20next would be synchronization
  3. 0:23okay
  4. 0:24so synchronization either the sending or
  5. 0:26receiving of messages or neither or both
  6. 0:30me either blocking or not blocking
  7. 0:34okay
  8. 0:37next so
  9. 0:39the producer consumer message passing
  10. 0:42okay
  11. 0:43so what do we have here the producer
  12. 0:46produce an item
  13. 0:48in the next produced
  14. 0:50and then send next produced on the
  15. 0:52consumer side
  16. 0:54okay so while true same thing with that
  17. 0:56of the producer receive
  18. 0:59next consumed
  19. 1:00okay
  20. 1:02and then of course they consume the item
  21. 1:04in the next consume
  22. 1:07okay so that's the implementation of
  23. 1:09pesos passing
  24. 1:11on
  25. 1:13that problem
  26. 1:15okay
  27. 1:16so next would be buffering
  28. 1:18okay so queue up messages attached to
  29. 1:20the link
  30. 1:21implemented in one of three ways so
  31. 1:23you've got the zero
  32. 1:24capacity bounded capacity
  33. 1:27and unbounded capacity
  34. 1:31okay so with a zero capacity messages
  35. 1:34cannot be stored in the queue or senders
  36. 1:37must block until receivers accept the
  37. 1:39message
  38. 1:41okay
  39. 1:42or the bounded capacity there is a
  40. 1:44certain predetermined
  41. 1:46infinite capacity in the queue
  42. 1:50senders must block if the queue is full
  43. 1:52until the space becomes available in the
  44. 1:55in the queue
  45. 1:57but maybe either blocking or
  46. 1:58non-blocking otherwise
  47. 2:01okay so unbounded capacity the queue has
  48. 2:04a theoretical infinite capacity so
  49. 2:06senders can never force to block
  50. 2:10okay
  51. 2:14next
  52. 2:15so
  53. 2:16we have here an example of inter process
  54. 2:18communications in unix okay
  55. 2:21so the posix
  56. 2:24so for the implementation of the shared
  57. 2:26memory the the process first creates a
  58. 2:29shared memory segment
  59. 2:30also used to open an existing segment
  60. 2:33and then set the size of the object okay
  61. 2:37so we use
  62. 2:38uh mnap
  63. 2:40to memory map okay so a file pointer to
  64. 2:43a shared memory object so reading and
  65. 2:45writing to shared memory is done
  66. 2:48by using the pointer returned memory map
  67. 2:50or map
  68. 2:52okay
  69. 2:53so this is the
  70. 2:56complete program implementing the shared
  71. 2:58memory and opposing systems
  72. 3:02okay
  73. 3:06this is the continuation
  74. 3:08earlier this is the posix implementation
  75. 3:11on the producer
  76. 3:12and the posix implementation on the
  77. 3:14consumer
  78. 3:16okay
  79. 3:17now how about on other operating systems
  80. 3:19like mac
  81. 3:21okay
  82. 3:23so mac communication is message based
  83. 3:27so even system calls are messages
  84. 3:31each task gets two ports at creation so
  85. 3:35get kernel and notify
  86. 3:37okay
  87. 3:38so the kernel sends notification of
  88. 3:40events to the notify mail box
  89. 3:43three system calls are used for message
  90. 3:45transfer you've got message send
  91. 3:48sends a message to a mailbox
  92. 3:50message received receives a message
  93. 3:53and
  94. 3:54message rpc
  95. 3:56sends a message and waits for exactly
  96. 3:58one message and response from the sender
  97. 4:01so the port allocate
  98. 4:03creates a new mailbox an associated
  99. 4:06queue for holding messages so the
  100. 4:08default size is eight
  101. 4:11all right
  102. 4:15next
  103. 4:17only one task at a time can own or
  104. 4:20receive message from any given mailbox
  105. 4:23but this are transferable so messages
  106. 4:27from the same sender
  107. 4:30to the same receiver are guaranteed to
  108. 4:32arrive in the first in first off order
  109. 4:35but no guarantees are made regarding
  110. 4:38messages from multiple senders
  111. 4:40okay
  112. 4:41so messages consists of a fixed length
  113. 4:45header followed by a variable length
  114. 4:47data
  115. 4:48the header contains mailbox number
  116. 4:51okay
  117. 4:52or just the address of the receiver and
  118. 4:55the sender
  119. 4:56so the section or data section consists
  120. 4:58of a list of type data items
  121. 5:01it's containing a type
  122. 5:04size and value
  123. 5:06okay
  124. 5:08now here's the implementation of message
  125. 5:11passing on the client okay client code
  126. 5:14on mac
  127. 5:16okay so if the receiver's mailbox is
  128. 5:18full the sender has four choices
  129. 5:20okay
  130. 5:21so wait indefinitely until there is a
  131. 5:23room
  132. 5:24in the mailbox
  133. 5:26wait at most 10 milliseconds
  134. 5:29okay so or do not wait at all
  135. 5:32okay
  136. 5:33so temporarily
  137. 5:35cache the message with the kernel for
  138. 5:37delivery when the mailbox becomes
  139. 5:39available
  140. 5:40so only one such message can be pending
  141. 5:42at any given time
  142. 5:44from any given sender to any given
  143. 5:46receiver so normally
  144. 5:49only used by certain system tasks such
  145. 5:52as the prince pooler
  146. 5:53which must notify the client
  147. 5:56for the completion of their job
  148. 5:58but cannot wait around for the mailbox
  149. 6:01to become available
  150. 6:03okay so we have a lot of technical terms
  151. 6:07and technical discussions here
  152. 6:09okay
  153. 6:11next
  154. 6:13so receive calls must specify the
  155. 6:16mailbox
  156. 6:17or mailbox set from which they wish to
  157. 6:20receive message
  158. 6:22okay
  159. 6:23so port status
  160. 6:25okay so the purge status reports the
  161. 6:28number of messages waiting at any given
  162. 6:30mailbox so if there are no messages
  163. 6:32available in the mailbox so we're using
  164. 6:34sept
  165. 6:35the receiver can either block for n
  166. 6:38milliseconds
  167. 6:39or not block at all so in order to avoid
  168. 6:41delays caused by capping messages
  169. 6:44multiple times
  170. 6:45okay mac remaps the memory space
  171. 6:49for the message from the sender address
  172. 6:51space to the receiver's address space
  173. 6:54so using virtual memory techniques
  174. 6:56to be covered
  175. 6:58on the next chapter that we have
  176. 7:00okay so it does not actually move the
  177. 7:02message
  178. 7:04anywhere at all so when the sending and
  179. 7:06receiving tasks are both on the same
  180. 7:09computer
  181. 7:10okay
  182. 7:12so that's the implementation for mac how
  183. 7:14about implementation for windows
  184. 7:17okay
  185. 7:19so for windows
  186. 7:20message passing centric via advanced
  187. 7:23local procedures call or the lpc
  188. 7:25facility
  189. 7:26okay it only works between processes on
  190. 7:30the same system
  191. 7:34okay
  192. 7:35so
  193. 7:35it uses ports
  194. 7:37like mailbox
  195. 7:39supports here
  196. 7:41pertains to the socket okay socket or
  197. 7:45communication socket okay so in other
  198. 7:48operating systems that we discussed they
  199. 7:50call it mailboxes to establish and
  200. 7:52maintain communication channels
  201. 7:55all right so communication works as
  202. 7:57follows so the client open a handle to
  203. 8:00subsystems connection port object
  204. 8:02the client sends a connection request
  205. 8:04the server creates two private
  206. 8:07communication ports and returns the
  207. 8:08handle to one of the client
  208. 8:12so the client and server use a
  209. 8:15corresponding port handle to send
  210. 8:17message or callbacks and to listen for
  211. 8:20replies
  212. 8:22okay
  213. 8:23now in here
  214. 8:25we have the local procedure calls in
  215. 8:27windows
  216. 8:28okay
  217. 8:29so if you will observe here
  218. 8:31it establishes connections from the
  219. 8:33client going to the server
  220. 8:36okay so and it uses
  221. 8:39a different procedure calls to do the
  222. 8:41tasks
  223. 8:43all right
  224. 8:54[Music]
  225. 9:01you

About this transcript

This page contains the full transcript of 03 05 Processes Part 5 by Santelmo, generated from the public captions YouTube serves with the video. The transcript has 997 words across 225 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 translate the transcript into 100+ languages.

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, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.