YouTube2Text

03 03 Processes Part 3 — Transcript

by Santelmo · 1,546 words · 338 segments · language en · Watch on YouTube

Full transcript

  1. 0:08[Music]
  2. 0:20all right
  3. 0:22so next would be the multitasking in
  4. 0:25mobile system
  5. 0:27okay so let's talk about
  6. 0:29an ios here so some mobile systems
  7. 0:31example the early versions of ios
  8. 0:34okay allow only one process to run and
  9. 0:38then others are suspended so we look at
  10. 0:40it as multitasking because multiple
  11. 0:42processes are being executed but they
  12. 0:45are not executed all at the same time
  13. 0:48all right so that's what i said earlier
  14. 0:50the concept here is that the cpu can
  15. 0:52execute process one
  16. 0:54one job at a time
  17. 0:56okay or one process at a time
  18. 0:59so due to screen real estate user
  19. 1:01interface limits ios provides for a
  20. 1:04single foreground process
  21. 1:06controlled by uh user interface
  22. 1:09and multiple background processors so
  23. 1:11these are in the memory running but not
  24. 1:14on the display and with its limits
  25. 1:17okay
  26. 1:18so for android
  27. 1:20android runs foreground and background
  28. 1:22with fewer limits so background
  29. 1:24processes uses a service to perform
  30. 1:26tasks
  31. 1:28okay
  32. 1:29while the service can keep running even
  33. 1:31if the bracket process is suspended
  34. 1:33so service has no user interface
  35. 1:37and it uses only a small amount of
  36. 1:39memory
  37. 1:41okay
  38. 1:44next
  39. 1:45so operations under processes
  40. 1:48so systems
  41. 1:50must provide mechanism for
  42. 1:52process creation and
  43. 1:55process termination
  44. 1:57okay
  45. 1:58now let's talk about process creation
  46. 1:59first
  47. 2:01so in process creation there might be a
  48. 2:03parent process
  49. 2:05creating a child or children processes
  50. 2:08which in turn
  51. 2:10create other processes forming a tree of
  52. 2:13processes
  53. 2:14you've got the parent you've got the
  54. 2:17root
  55. 2:18and then you've got different branches
  56. 2:20and then each branch has a tree or as a
  57. 2:24leave
  58. 2:24or leaf
  59. 2:26okay
  60. 2:27so
  61. 2:28that forms a tree of a process
  62. 2:31so generally
  63. 2:32process identified and managed via
  64. 2:35process identifier
  65. 2:38so resource sharing options
  66. 2:40is available so the parent and the
  67. 2:42children
  68. 2:44share all the resources
  69. 2:46so we're talking about process and
  70. 2:48thread relationships here
  71. 2:50okay
  72. 2:51so children share subset of the parent
  73. 2:54resources
  74. 2:55or the parent and child share no
  75. 2:58resources at all
  76. 2:59okay
  77. 3:00now on the execution options so the
  78. 3:03parent and children execute concurrently
  79. 3:06all at the same time
  80. 3:07okay so next would be the parent waits
  81. 3:11until the children
  82. 3:12terminate
  83. 3:14can we terminate the parent without
  84. 3:16terminating the children or the child
  85. 3:18first the answer is no
  86. 3:20okay
  87. 3:21we have to ensure or the operating
  88. 3:23system has to ensure that all the
  89. 3:25children processes has ended before we
  90. 3:27terminate
  91. 3:29a parent
  92. 3:33next process creation so the child
  93. 3:36duplicate of parent
  94. 3:39this is in terms of outer space and the
  95. 3:42child has a program loaded into it
  96. 3:44so in unix okay when you say fork
  97. 3:48this is a system call
  98. 3:51that creates a new process
  99. 3:53okay so basically everything in an
  100. 3:55operating system so if you want the
  101. 3:57operating operating system to do
  102. 3:59something you just have to issue a
  103. 4:01system call
  104. 4:02okay a system called to execute or to
  105. 4:05create a new process
  106. 4:07a system called to close the application
  107. 4:09or terminate the applications so
  108. 4:11basically everything in the operating
  109. 4:13system is
  110. 4:15in the principle of system calls
  111. 4:18okay
  112. 4:19and in unix
  113. 4:21to create a new process
  114. 4:23means fork
  115. 4:26okay
  116. 4:27exec
  117. 4:28is a system called for
  118. 4:30uh executing the program okay so after
  119. 4:33the fork
  120. 4:34so the process
  121. 4:36is replaced
  122. 4:37from the memory
  123. 4:39space with a new program so we call it
  124. 4:42exec
  125. 4:42so the parent
  126. 4:44process calls weight
  127. 4:46waiting for the child to
  128. 4:48terminate
  129. 4:51all right
  130. 4:54next so you've got a three of processes
  131. 4:57in linux so we have mentioned about the
  132. 4:59three of processes earlier okay
  133. 5:02so
  134. 5:03processes may create other process
  135. 5:07through appropriate system calls such as
  136. 5:09fork or spoon
  137. 5:11okay
  138. 5:12so the process which does the creating
  139. 5:15is termed the parent
  140. 5:17of the other process
  141. 5:19so which is termed as its child
  142. 5:23okay so each process is given an integer
  143. 5:26identifier
  144. 5:27okay we have here a process id
  145. 5:30or the pid
  146. 5:33okay
  147. 5:34so
  148. 5:35the parent pid is also stored on each of
  149. 5:38the process
  150. 5:40okay
  151. 5:41so on a typical unix systems the process
  152. 5:44scheduler is termed sched
  153. 5:46and is given a pid of zero
  154. 5:50all right so the first thing it does at
  155. 5:54system startup time
  156. 5:55is to launch init
  157. 5:58or initialize
  158. 6:00which gives the process pid equals one
  159. 6:03okay
  160. 6:04the init or initialize then launches all
  161. 6:07system demons
  162. 6:09and user logins and becomes the ultimate
  163. 6:11parent for all the processes here
  164. 6:15okay so depending on the system
  165. 6:17implementation
  166. 6:18a system process may receive some amount
  167. 6:21of shared resources
  168. 6:23with its parent
  169. 6:25so the child processes may or may not
  170. 6:29be limited to subsets
  171. 6:31of the resources originally allocated to
  172. 6:33a parent
  173. 6:35so preventing runaway children
  174. 6:37from consuming all of certain system
  175. 6:41resources
  176. 6:43all right
  177. 6:46okay so i have here a c program for king
  178. 6:50separate process so this is written in c
  179. 6:53okay
  180. 6:54so it shows a typical process tree for
  181. 6:57linux system and other systems will have
  182. 6:59similar
  183. 7:00do not identical trees
  184. 7:03okay referring to the previous diagram
  185. 7:06okay
  186. 7:07next would be creating a separate
  187. 7:09process via the windows api okay so
  188. 7:12mostly
  189. 7:14the operating systems are made of or
  190. 7:16made from the c or c c language c plus
  191. 7:19plus
  192. 7:20okay
  193. 7:21so in here it shows more complicated
  194. 7:24process for windows okay
  195. 7:26so you'll have sort of um pointers
  196. 7:30all right or memory by reference
  197. 7:33which must provide all the parameter
  198. 7:36information
  199. 7:37for new process as part of the forking
  200. 7:39process
  201. 7:41okay
  202. 7:42next would be process termination
  203. 7:45so how do we terminate a process so we
  204. 7:47just close the application
  205. 7:50okay then we are terminating a process
  206. 7:53so process may be terminated by the
  207. 7:55system for a variety of reasons
  208. 7:57including first
  209. 7:59the inability of the system to deliver
  210. 8:00necessary system resources
  211. 8:05okay
  212. 8:06in response to a kill command
  213. 8:08or other unhandled process interrupt so
  214. 8:11the parent may kill its children
  215. 8:15if the task assigned to them is no
  216. 8:17longer needed
  217. 8:18so again we say kill here
  218. 8:20okay so we mean termination we mean we
  219. 8:24close the application
  220. 8:26okay
  221. 8:27so on unix systems or panned processes
  222. 8:31are generally inherited by init
  223. 8:35which then proceeds to kill them
  224. 8:38the unix no hop command allows a child
  225. 8:41to continue executing after the parent
  226. 8:43has exited
  227. 8:45okay
  228. 8:46so
  229. 8:49that is in the process termination
  230. 8:51concepts in unix
  231. 8:54all right
  232. 8:56next when a process terminates
  233. 8:58all of its system resources are freed up
  234. 9:01open files flashed and closed okay so
  235. 9:05the process termination status and
  236. 9:07execution times
  237. 9:08are returned to the parent if the parent
  238. 9:10is waiting for the child to terminate or
  239. 9:13eventually
  240. 9:14return to init
  241. 9:16if the process becomes an orpan
  242. 9:20okay so we have here the term orphan
  243. 9:24process which are trying to terminate
  244. 9:26but which cannot because their parent
  245. 9:29is not wanting for them
  246. 9:31and termed zombies
  247. 9:33okay so if no parent is waiting did not
  248. 9:36invoke the weight the process is what we
  249. 9:38call a zombie
  250. 9:40if the parent is terminated without
  251. 9:42invoking weight the process is called an
  252. 9:44orphan
  253. 9:45okay so these are eventually inherited
  254. 9:48by init as orphans and killed off
  255. 9:51so note that modern unique shells do not
  256. 9:54produce as many our puns and zombies as
  257. 9:57the older systems do
  258. 10:00all right so we have that term zombie
  259. 10:02and rpa
  260. 10:05okay
  261. 10:07so next would be the android process
  262. 10:10importance hierarchy
  263. 10:12okay
  264. 10:13so mobile operating system often have
  265. 10:16determinate process to reclaim the
  266. 10:18system resources such as the memory
  267. 10:21from most to least important so
  268. 10:22foreground process visible process
  269. 10:24service processes
  270. 10:26background and empty processes
  271. 10:28okay so android will begin terminating
  272. 10:30the process that are least important
  273. 10:33okay so take note that maybe you are
  274. 10:35experiencing a fast
  275. 10:37uh low bet on a mobile devices
  276. 10:41and maybe without noticing it you have a
  277. 10:43lot of processes running on your system
  278. 10:46okay so we can store we we can save the
  279. 10:49resource okay by closing the
  280. 10:51applications
  281. 10:52which you don't need
  282. 10:54okay
  283. 10:55so and with that
  284. 10:57okay so we are freeing the resources
  285. 11:00specifically the ram
  286. 11:04all right
  287. 11:06next let's talk about the multi-process
  288. 11:09architecture so let's talk about the
  289. 11:11chrome browser okay so many websites
  290. 11:14active content such as javascript flash
  291. 11:17html5 okay so to provide rich media
  292. 11:21and dynamic web browsing experience
  293. 11:25unfortunately
  294. 11:26this web application may contain
  295. 11:29software bugs
  296. 11:31which result in sluggish response
  297. 11:34and can never cause the browser to cross
  298. 11:37okay
  299. 11:39now
  300. 11:40the google chrome browser
  301. 11:42is a multi-process with three different
  302. 11:45types of processes
  303. 11:46okay you've got a browser
  304. 11:49okay so process manages user interface
  305. 11:52disk and network io
  306. 11:54you also have the renderer okay so the
  307. 11:57process
  308. 11:58renders web pages
  309. 12:00deals with html and javascript
  310. 12:03a new renderer created for each website
  311. 12:05opened
  312. 12:07okay
  313. 12:08runs in sandbox
  314. 12:09restricting disk and io or specifically
  315. 12:12the network io minimizing the effect of
  316. 12:15the security exploits
  317. 12:18all right
  318. 12:20so the advantage of a multi-process
  319. 12:22approach is that the website run in
  320. 12:25isolation from one computer
  321. 12:27so if the website crosses it only
  322. 12:30okay affects or only its renderer
  323. 12:33process is affected
  324. 12:36okay
  325. 12:36so all other processes remain unharmed
  326. 12:39so furthermore
  327. 12:40render our process which is mentioned
  328. 12:43earlier running in a sandbox which means
  329. 12:46that the access to disk and network io
  330. 12:49is restricted
  331. 12:50okay minimizing
  332. 12:52the effects of any security exploits
  333. 12:55here
  334. 12:58okay
  335. 12:59so each tab in a chrome represents a
  336. 13:02separate process
  337. 13:15[Music]
  338. 13:23you

About this transcript

This page contains the full transcript of 03 03 Processes Part 3 by Santelmo, generated from the public captions YouTube serves with the video. The transcript has 1,546 words across 338 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.