 And why is it that writers write, but fingers don’t fing, grocers don’t groce, and hammers don’t ham?
View full slide show




Duplicating Hamilton’s Strategy • Neural network: train a program to “learn” the strategy. This strategy is then applied to 1930-1997. Over the whole period, 5.48 vs 9.87 • • • • • • • 1930-39: Buy-Hold=1.48, Ham=11.10 1940-49: Buy-Hold=3.21, Ham=6.04 1950-59: Buy-Hold=9.64, Ham=9.91 1960-69: Buy-Hold=7.71, Ham=9.68 1970-79: Buy-Hold=0.41, Ham=6.74 1980-89: Buy-Hold=12.63, Ham=11.29 1990-97: Buy-Hold=15.44, Ham=16.24
View full slide show




Forging Hammers (Drop Hammers) • Apply an impact load against workpart - two types: – Gravity drop hammers - impact energy from falling weight of a heavy ram – Power drop hammers - accelerate the ram by pressurized air or steam • Disadvantage: impact energy transmitted through anvil into floor of building • Most commonly used for impression-die forging ISE 316 - Manufacturing Processes Engineering
View full slide show




Producer Consumer Synchronized Circular Buffer Produced 1 into cell 0 write 1 read 0 buffer: Produced 2 into cell 1 write 2 read 0 buffer: Consumed 1 from cell 0 write 2 read 1 buffer: Produced 3 into cell 2 write 3 read 1 buffer: Produced 4 into cell 3 write 4 read 1 buffer: Produced 5 into cell 4 write 0 read 1 buffer: Produced 6 into cell 0 write 1 read 1 buffer: BUFFER FULL WAITING TO PRODUCE 7 Consumed 2 from cell 1 write 1 read 2 buffer: Produced 7 into cell 1 write 2 read 2 buffer: BUFFER FULL WAITING TO PRODUCE 8 Consumed 3 from cell 2 write 2 read 3 buffer: Produced 8 into cell 2 write 3 read 3 buffer: BUFFER FULL WAITING TO PRODUCE 9 Consumed 4 from cell 3 write 3 read 4 buffer: Produced 9 into cell 3 write 4 read 4 buffer: BUFFER FULL WAITING TO PRODUCE 10 Consumed 5 from cell 4 write 4 read 0 buffer: Produced 10 into cell 4 write 0 read 0 buffer: BUFFER FULL ProduceInteger finished producing values Terminating ProduceInteger 1 -1 -1 -1 -1 1 2 -1 -1 -1 1 2 -1 -1 -1 1 2 3 -1 -1 1 2 3 4 -1 1 2 3 4 5 6 2 3 4 5 Consumed 6 from cell 0 write 0 read 1 buffer: Consumed 7 from cell 1 write 0 read 2 buffer: Consumed 8 from cell 2 write 0 read 3 buffer: Consumed 9 from cell 3 write 0 read 4 buffer: Consumed 10 from cell 4 write 0 read 0 buffer: BUFFER EMPTY ConsumeInteger retrieved values totaling: 55 Terminating ConsumeInteger 6 6 6 6 6 6 2 3 4 5 6 7 3 4 5 6 7 3 4 5 6 7 8 4 5 6 7 8 4 5 6 7 8 9 5 6 7 8 9 5 6 7 8 9 10 7 7 7 7 7 8 8 8 8 8 9 9 9 9 9 10 10 10 10 10 Ref: http://userhome.brooklyn.cuny.edu/irudowdky/OperatingSystems.htm & Silberschatz, Gagne, & Galvin, Operating Systems Concepts, 7th ed, Wiley (ch 1-3)
View full slide show




Java Readers-Writers with Monitors public class Database { private int readers; private boolean writers; public Database() {readers=0; writers=false; } public synchronized void acquireRead() throws InterruptedException { while (writers) wait(); ++readers; } public synchronized void releaseRead() { if (--readers==0) notify(); } public synchronized void acquireWrite() throws InterruptedException { while (readers>0||writers) wait(); writers=true;} public synchronized void releaseWrite() { writers=false; notifyAll(); } }
View full slide show




Other Devices (cont’d) ● ● ● Magnetic strip ● Readers& writers ● Make credit cards ID card writers Smart cards ● ● RFID ● ● Writers & readers Writers & readers Security systems ● Home grown gear – Check writers – Bar code writers – Hologram writers – Special printers ● Counterfeiting
View full slide show




Java Readers-Writers with Monitors public class Database { private int readers; private boolean writers; public Database() {readers=0; writers=false; } public synchronized void acquireRead() throws InterruptedException { while (writers) wait(); ++readers; } public synchronized void releaseRead() { if (--readers==0) notifyAll(); } public synchronized void acquireWrite() throws InterruptedException { while (readers>0||writers) wait(); writers=true;} public synchronized void releaseWrite() { writers=false; notifyAll(); } }
View full slide show




Evaluation Measures (1) Result judgement Ham Spam Ham a b Spam c d a: ham (correctly classified) [true negative] b: spam misclassification [false negative] c: ham misclassification [false positive] d: spam (correctly classified) [true negative] • Accuracy: (a+d)/(a+b+c+d) • • Spam recall: d/(b+d) Spam precision: d/(d+c) • • Ham misclassification rate: c/(a+c) Spam misclassification rate: b/(b+d) 29
View full slide show




Hammers A sledge hammer is the power house of the hammer world. Sledge Hammers tend to be extremely heavy on the metal striking end, and generally have a much longer handle to apply more force to the striking surface. Sledge hammers come in a variety of sizes for working and for crushing or breaking things.
View full slide show




Write-back State Machine-III CPU Read hit • State machine for CPU requests for each cache block and for bus requests for each cache block Write miss for this block Shared CPU Read Invalid (read/only) Place read miss on bus CPU Write Place Write Miss on bus Write miss CPU read miss CPU Read miss for this block Write back block, Place read miss Write Back Place read miss on bus CPU Write Block; (abort on bus Place Write Miss on Bus memory access) Cache Block State CPU read hit CPU write hit 03/24/19 Exclusive (read/write) Read miss for this block Write Back Block; (abort memory access) CPU Write Miss Write back cache block Place write miss on bus 39
View full slide show




Write-back State Machine - All Requests CPU Read hit • State machine for CPU requests for each cache block and for bus requests for each cache block Write miss for this block Shared CPU Read Invalid (read/only) Place read miss on bus CPU Write Place Write Miss on bus Write miss CPU Read miss CPU read miss for this block Place read miss Write Back Write back block, on bus Block; (abort Place read miss CPU Write memory on bus access) Place Write Miss on Bus Read miss Cache Block for this block Write Back States Exclusive Block; (abort (read/write) memory access) CPU read hit CPU Write Miss Write back cache block CPU write hit Place write miss on bus 38 3/24+4/5-7/10 CSE502-S10, Lec 16-18-SMP
View full slide show




class Output Stream Decorators Ex 6: (Char) Writers io::FilterOutputStream io::OutputStream + + + + + write(int) : void #out write(byte[]) : void write(byte[], int, int) : void flush() : void close() : void # out: OutputStream + + + + + + FilterOutputStream(OutputStream) write(int) : void write(byte[]) : void write(byte[], int, int) : void flush() : void close() : void  OutputStreams write (8-bit) bytes.  Writers write 16-bit Unicode code-points io:: Obj ectOutputStream io:: PipedOutputStream io::DataOutputStream io::FileOutputStream Writer io::PrintWriter Appendable io::PrintStream -psOut  You can wrap a PrintWriter around a PrintStream  You cannot wrap a PrintStream around a PrintWriter (unless you write the code yourself.) SE-2811 Dr. Mark L. Hornick 8
View full slide show




What to do on a write-miss?    AM LaCASA Write allocate (or fetch on write) The block is loaded on a write-miss, followed by the write-hit actions No-write allocate (or write around) The block is modified in the memory and not loaded into the cache Although either write-miss policy can be used with write through or write back, write back caches generally use write allocate and write through often use no-write allocate 24
View full slide show




What to do on a write-miss?  Write allocate (or fetch on write) The block is loaded on a write-miss, followed by the write-hit actions  No-write allocate (or write around) The block is modified in the memory and not loaded into the cache  Although either write-miss policy can be used with write through or write back, write back caches generally use write allocate and write through often use no-write allocate 14
View full slide show




Table 10.13: Intrinsic Muscles of the Hand: Fine Movements of the Fingers • Small, weak muscles that lie entirely within palm of hand control precise movements of metacarpals and fingers (example: threading a needle) • Abductors and adductors of fingers produce opposition—move thumb toward little finger • Flexion: thumb bends medially along palm, and fingers bend anteriorly • Extension: thumb points laterally, and fingers move posteriorly © 2016 Pearson Education, Inc.
View full slide show




CPE 631 AM Snoopy-Cache State Machine-III CPU Read hit State machine for CPU requests for each cache block and for bus requests for each cache block Cache State Write miss for this block Shared CPU Read Invalid (read/only) Place read miss on bus CPU Write Place Write Miss on bus Write miss CPU read miss CPU Read miss for this block Write back block, Place read miss Place read miss on bus Write Back CPU Write on bus Block; (abort Place Write Miss on Bus memory access) Block Read miss Write Back for this block Block; (abort Exclusive memory access) (read/write) CPU Write Miss CPU read hit Write back cache block CPU write hit Place write miss on bus 24/03/19 UAH-CPE631 3
View full slide show