Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Chapter 5 {{{ ------------------------------------------------------------------
- 2
- 3
- 5
- 6
- 7
- 8
- mutual exclusion
- race condition
- 10
- PCBS
- Allocate resources
- protect data and resources
- need mechanicsm to deal with race conditions
- 11
- unaware to each otehr
- basic competition
- indirectly aware
- cooperation
- directly communicating
- copoerating
- 12
- Mtual Exclusion
- Deadlock
- Starvation
- 13
- Need some way to enter critical section atomically (critical section)
- 14
- Data coherience == data consistent
- 16
- deadlock
- starvation
- 17
- encforcement
- non-interference
- no deadlock nor starvation
- Critical section open then something being done
- no assumptions about process speeds or cPU count
- finite time in critical section
- 18
- software
- hardware
- OS implementation
- 21
- Alternation
- 22
- Freed from alternation with different flags
- Problem arises when we haven't set both flags
- 23
- could deadlock when both set at the same time
- 27
- if one decides to let go at the same let go, then we have a live lock.
- neither proceeding to do instructions
- 29 ***
- Dekker's alogithm
- only defer if it's my turn to defer
- 30 ***
- Peterson's algorithm
- Simpler to code than Dekker's algorithm
- 32
- 33
- Interrupt disabling
- Option: turn off interrupts. good for 1 processor systems ONLY
- 34
- 35
- Must be performed atomically
- 36
- 37
- Pros:
- Simple and easy to verify
- permits multiple critical sections
- Cons:
- Busy waiting
- Starving
- Deadlock
- 38
- Semaphors
- Dijkstra in 1965
- wait(s)
- signal(s)
- Queue
- 39
- Strong semaphore
- Weak semaphore
- Could starve process that was repeadidly not released
- 40
- Semaphore different from mutex
- mutex basically a lock
- process locking is same process unlocking
- 41
- In general, no way to know before process calls wait whether it will block
- or not.
- What happens win process calls signal
- When you signal a semaphore
- 42
- Know how to go through the code
- Signal and wait are atomic functions
- 43
- often used for exam questions
- 45
- 47
- 49
- 51
- Expect semaphore code
- What value is going to be printed?
- What values could be printed given some number of threads running?
- 52
- If wait(n) and wait(s) were swapped, could possibly get deadlocked
- 54
- Full buffer protection
- Producer is supposed to wait for consumer(?)
- protection on empty buffer, full buffer, take, and append
- 57
- Barber shop
- 58
- Lots of stuff
- 60
- writer can only write at a time
- Reader effectively the same, but only first reader in and last reader out
- trigger the signal.
- Notice we can starve writer.
- 61
- equivalent if not more organized to semaphore
- 62
- monitor conceptual view
- 63
- conditional variable
- if no one waiting, nothing happens
- 64
- run through the code
- 65
- used for synchronization and communication (passing data)
- 66
- rendezvous - send and recieve both blocked
- 67
- definitions
- 68
- only 1 process can continue. all other ones are waiting. Ie only running one
- by one.
- Chapter 5 }}} ------------------------------------------------------------------
- Chapter 6 - Conditions of deadlock and ways to avoid {{{ -----------------------
- 2
- no efficient solution
- state of permanent blocking
- 3
- Intersection picture
- 4
- Deadlock code
- 6
- no deadlock code
- 8
- resuable and consume definition
- 14
- What are the 4 conditions of deadlock? (Very likley to be asked on the exam)
- Mutual exclusion
- hold & wait
- no preemption
- circular wait
- 15
- First 3 conditions give rise to the 4th
- Cannot have circular wait without the first 3
- 16
- Prevention
- Avoidance
- Detection
- 17
- Limited due to efficiency problems
- files need to be written one at a time. needs mutual exclusion
- 19
- Introduces delay
- 20
- Solution 2: setting up policy that once I can't get the next resource i
- need to get it released for others
- 21
- Ordering of resource requests
- not efficient
- 22
- Definition
- 23
- Methods (know definitions)
- 24
- 25 ******
- Banker's algorithm to determine saftey (most likely on the exam)
- 26
- Know how to do banker's algorithm
- 31
- know about unsafe state
- 32/33
- not going to be on exam probably
- 34
- know advantages and disadvantages
- for advantages, all but first are the big ones to be concered of
- 35
- 38
- Run through table
- 39
- Know the different methods for recovery
- 40
- 41
- KNow only the first 2 columns
- 42
- APply different strats for different groups
- 44
- Know the concept
- 46
- Dining philosipher using semaphore
- 47
- monitor based solution of 46
- 49 - END
- Skip it :D
- Chapter 6 }}} ------------------------------------------------------------------
- Chapter 7 - Pros/Cons of partiion schemes. Placement and buddy scheme. Pagging, address translation {{{
- 2
- 3
- Relocation
- want to protect memory from iterference of others
- mainly done by hardware
- 5
- 6
- may want memory manager to recognize pieces of program
- segmentation
- 7
- physically want mem manager moving one piece of memory from one place to
- another
- 9
- Equal-sized vs Unequal-size partition
- Internal fragmentation
- 13
- Using queues for fixed partition
- 14
- Utilization issue
- 16
- Know how dynamic partition works
- Problem: gaps develop ie external fragmentation
- 17
- compaction solve external fragmentation
- problem: takes a while
- 18
- Know definitions of placement alg
- 19
- best fit worst
- first fit tends to be best
- next-fit in the middle
- 25
- Know buddy system
- can mit limit on how much is wasted
- don't really have set number of things to run at once
- 28
- physical address actual memory addres
- logical address is what OS is using
- eg: relative addres
- 31
- paging and segmentation
- 35
- Need to keep track of everything in the page table
- 36
- diagram for address translation
- 38
- translate from logical to physical
- 39
- no equal sized pieces
- benefit to be able to set attributes more easily
- 40
- diagram for when dealing with segments
- Chapter 7 }}} ------------------------------------------------------------------
- Chapter 8 {{{ ------------------------------------------------------------------
- 2
- Characteristics
- Know last bullet
- 3
- Pieces in memory are resident set
- 4
- doing this allows more things to be loaded at once
- can run something that can't normally be ran by breaking things up
- 5
- virtual memory can be traded to and fro from main memory and hard drive
- 6
- Locality of reference allows us to do it for pages.
- Have the more widley used pages loaded for longer
- 8
- Must stop and load page that's not in main memory
- serious performance loss
- 10
- added modified bit, control bit, etc.
- 12
- HOw to do it with page table and virtual address
- 15
- Hierarchical approach
- 16
- Organize by frame instead of pages. Likely smaller because less frames than
- pages. Can share one table than having seperate page tables
- Search now is linear time unless doing hash lookup
- 21
- 23
- Enhanced translation conversion with TLB
- 24
- not indexbale
- it's associative map is in hardware
- 26
- 28
- 31
- show relation of page size and faulting
- If page size too large, not really getitng benefits of paging
- 34
- first segement number lookup
- to get page table pointer
- page table lookup to get frame number
- finally get real address
- 37
- paging alone or segmentatino alone is more common
- 40
- determine which one we want/need to override
- might rely on locality of reference
- want something simple
- 41
- don't want to replace locked frames
- 42 ****** (Important question) Clock policy most importatn
- Know how to do four page replacement algorithm
- 51
- lets free frame list kind of like a buffer
- 52-54
- Lots of stuff that I couldn't write down
- 57
- Understand table
- 58
- dealing with writing of modified pages
- demand cleaning: only write when replaced. fault handling will be longer
- though
- preclaiming: get a batch. write them out all at once. May write same thing
- over and over again repeadidly
- page buffer: best of both worlds
- 61
- If have too many things at once, thrashing gonna happen and performance
- drops
- 61
- If have too many things at once, thrashing gonna happen and performance
- drops.
- 62
- Know stuff
- Chapter 8 }}} ------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement