Advertisement
Guest User

Untitled

a guest
Mar 26th, 2019
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.70 KB | None | 0 0
  1. Chapter 5 {{{ ------------------------------------------------------------------
  2. 2
  3. 3
  4. 5
  5. 6
  6. 7
  7. 8
  8. mutual exclusion
  9. race condition
  10. 10
  11. PCBS
  12. Allocate resources
  13. protect data and resources
  14. need mechanicsm to deal with race conditions
  15. 11
  16. unaware to each otehr
  17. basic competition
  18. indirectly aware
  19. cooperation
  20. directly communicating
  21. copoerating
  22. 12
  23. Mtual Exclusion
  24. Deadlock
  25. Starvation
  26. 13
  27. Need some way to enter critical section atomically (critical section)
  28. 14
  29. Data coherience == data consistent
  30. 16
  31. deadlock
  32. starvation
  33. 17
  34. encforcement
  35. non-interference
  36. no deadlock nor starvation
  37. Critical section open then something being done
  38. no assumptions about process speeds or cPU count
  39. finite time in critical section
  40. 18
  41. software
  42. hardware
  43. OS implementation
  44. 21
  45. Alternation
  46. 22
  47. Freed from alternation with different flags
  48. Problem arises when we haven't set both flags
  49. 23
  50. could deadlock when both set at the same time
  51. 27
  52. if one decides to let go at the same let go, then we have a live lock.
  53. neither proceeding to do instructions
  54. 29 ***
  55. Dekker's alogithm
  56. only defer if it's my turn to defer
  57. 30 ***
  58. Peterson's algorithm
  59. Simpler to code than Dekker's algorithm
  60. 32
  61. 33
  62. Interrupt disabling
  63. Option: turn off interrupts. good for 1 processor systems ONLY
  64. 34
  65. 35
  66. Must be performed atomically
  67. 36
  68. 37
  69. Pros:
  70. Simple and easy to verify
  71. permits multiple critical sections
  72. Cons:
  73. Busy waiting
  74. Starving
  75. Deadlock
  76. 38
  77. Semaphors
  78. Dijkstra in 1965
  79. wait(s)
  80. signal(s)
  81. Queue
  82. 39
  83. Strong semaphore
  84. Weak semaphore
  85. Could starve process that was repeadidly not released
  86. 40
  87. Semaphore different from mutex
  88. mutex basically a lock
  89. process locking is same process unlocking
  90. 41
  91. In general, no way to know before process calls wait whether it will block
  92. or not.
  93. What happens win process calls signal
  94. When you signal a semaphore
  95. 42
  96. Know how to go through the code
  97. Signal and wait are atomic functions
  98. 43
  99. often used for exam questions
  100. 45
  101. 47
  102. 49
  103. 51
  104. Expect semaphore code
  105. What value is going to be printed?
  106. What values could be printed given some number of threads running?
  107. 52
  108. If wait(n) and wait(s) were swapped, could possibly get deadlocked
  109. 54
  110. Full buffer protection
  111. Producer is supposed to wait for consumer(?)
  112. protection on empty buffer, full buffer, take, and append
  113. 57
  114. Barber shop
  115. 58
  116. Lots of stuff
  117. 60
  118. writer can only write at a time
  119. Reader effectively the same, but only first reader in and last reader out
  120. trigger the signal.
  121. Notice we can starve writer.
  122. 61
  123. equivalent if not more organized to semaphore
  124. 62
  125. monitor conceptual view
  126. 63
  127. conditional variable
  128. if no one waiting, nothing happens
  129. 64
  130. run through the code
  131. 65
  132. used for synchronization and communication (passing data)
  133. 66
  134. rendezvous - send and recieve both blocked
  135. 67
  136. definitions
  137. 68
  138. only 1 process can continue. all other ones are waiting. Ie only running one
  139. by one.
  140. Chapter 5 }}} ------------------------------------------------------------------
  141.  
  142. Chapter 6 - Conditions of deadlock and ways to avoid {{{ -----------------------
  143. 2
  144. no efficient solution
  145. state of permanent blocking
  146. 3
  147. Intersection picture
  148. 4
  149. Deadlock code
  150. 6
  151. no deadlock code
  152. 8
  153. resuable and consume definition
  154. 14
  155. What are the 4 conditions of deadlock? (Very likley to be asked on the exam)
  156. Mutual exclusion
  157. hold & wait
  158. no preemption
  159. circular wait
  160. 15
  161. First 3 conditions give rise to the 4th
  162. Cannot have circular wait without the first 3
  163. 16
  164. Prevention
  165. Avoidance
  166. Detection
  167. 17
  168. Limited due to efficiency problems
  169. files need to be written one at a time. needs mutual exclusion
  170. 19
  171. Introduces delay
  172. 20
  173. Solution 2: setting up policy that once I can't get the next resource i
  174. need to get it released for others
  175. 21
  176. Ordering of resource requests
  177. not efficient
  178. 22
  179. Definition
  180. 23
  181. Methods (know definitions)
  182. 24
  183. 25 ******
  184. Banker's algorithm to determine saftey (most likely on the exam)
  185. 26
  186. Know how to do banker's algorithm
  187. 31
  188. know about unsafe state
  189. 32/33
  190. not going to be on exam probably
  191. 34
  192. know advantages and disadvantages
  193. for advantages, all but first are the big ones to be concered of
  194. 35
  195. 38
  196. Run through table
  197. 39
  198. Know the different methods for recovery
  199. 40
  200. 41
  201. KNow only the first 2 columns
  202. 42
  203. APply different strats for different groups
  204. 44
  205. Know the concept
  206. 46
  207. Dining philosipher using semaphore
  208. 47
  209. monitor based solution of 46
  210. 49 - END
  211. Skip it :D
  212. Chapter 6 }}} ------------------------------------------------------------------
  213.  
  214. Chapter 7 - Pros/Cons of partiion schemes. Placement and buddy scheme. Pagging, address translation {{{
  215. 2
  216. 3
  217. Relocation
  218. want to protect memory from iterference of others
  219. mainly done by hardware
  220. 5
  221. 6
  222. may want memory manager to recognize pieces of program
  223. segmentation
  224. 7
  225. physically want mem manager moving one piece of memory from one place to
  226. another
  227. 9
  228. Equal-sized vs Unequal-size partition
  229. Internal fragmentation
  230. 13
  231. Using queues for fixed partition
  232. 14
  233. Utilization issue
  234. 16
  235. Know how dynamic partition works
  236. Problem: gaps develop ie external fragmentation
  237. 17
  238. compaction solve external fragmentation
  239. problem: takes a while
  240. 18
  241. Know definitions of placement alg
  242. 19
  243. best fit worst
  244. first fit tends to be best
  245. next-fit in the middle
  246. 25
  247. Know buddy system
  248. can mit limit on how much is wasted
  249. don't really have set number of things to run at once
  250. 28
  251. physical address actual memory addres
  252. logical address is what OS is using
  253. eg: relative addres
  254. 31
  255. paging and segmentation
  256. 35
  257. Need to keep track of everything in the page table
  258. 36
  259. diagram for address translation
  260. 38
  261. translate from logical to physical
  262. 39
  263. no equal sized pieces
  264. benefit to be able to set attributes more easily
  265. 40
  266. diagram for when dealing with segments
  267. Chapter 7 }}} ------------------------------------------------------------------
  268.  
  269. Chapter 8 {{{ ------------------------------------------------------------------
  270. 2
  271. Characteristics
  272. Know last bullet
  273. 3
  274. Pieces in memory are resident set
  275. 4
  276. doing this allows more things to be loaded at once
  277. can run something that can't normally be ran by breaking things up
  278. 5
  279. virtual memory can be traded to and fro from main memory and hard drive
  280. 6
  281. Locality of reference allows us to do it for pages.
  282. Have the more widley used pages loaded for longer
  283. 8
  284. Must stop and load page that's not in main memory
  285. serious performance loss
  286. 10
  287. added modified bit, control bit, etc.
  288. 12
  289. HOw to do it with page table and virtual address
  290. 15
  291. Hierarchical approach
  292. 16
  293. Organize by frame instead of pages. Likely smaller because less frames than
  294. pages. Can share one table than having seperate page tables
  295.  
  296. Search now is linear time unless doing hash lookup
  297. 21
  298. 23
  299. Enhanced translation conversion with TLB
  300. 24
  301. not indexbale
  302. it's associative map is in hardware
  303. 26
  304. 28
  305. 31
  306. show relation of page size and faulting
  307. If page size too large, not really getitng benefits of paging
  308. 34
  309. first segement number lookup
  310. to get page table pointer
  311. page table lookup to get frame number
  312. finally get real address
  313. 37
  314. paging alone or segmentatino alone is more common
  315. 40
  316. determine which one we want/need to override
  317. might rely on locality of reference
  318. want something simple
  319. 41
  320. don't want to replace locked frames
  321. 42 ****** (Important question) Clock policy most importatn
  322. Know how to do four page replacement algorithm
  323. 51
  324. lets free frame list kind of like a buffer
  325. 52-54
  326. Lots of stuff that I couldn't write down
  327. 57
  328. Understand table
  329. 58
  330. dealing with writing of modified pages
  331. demand cleaning: only write when replaced. fault handling will be longer
  332. though
  333. preclaiming: get a batch. write them out all at once. May write same thing
  334. over and over again repeadidly
  335. page buffer: best of both worlds
  336. 61
  337. If have too many things at once, thrashing gonna happen and performance
  338. drops
  339. 61
  340. If have too many things at once, thrashing gonna happen and performance
  341. drops.
  342. 62
  343. Know stuff
  344. Chapter 8 }}} ------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement