Top Banner
The Brave New World of Software Adam Kemp Staff Software Engineer National Instruments
22

The Brave New World of Software Adam Kemp Staff Software Engineer National Instruments.

Apr 01, 2015

Download

Documents

Maxim Purks
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: The Brave New World of Software Adam Kemp Staff Software Engineer National Instruments.

The Brave New World of Software

Adam KempStaff Software EngineerNational Instruments

Page 2: The Brave New World of Software Adam Kemp Staff Software Engineer National Instruments.

Back in my day…

• Programmers had it tough…– No fancy high-level languages (except C…)– What’s an “IDE”?– Debuggers? Just use printf– No Internet (i.e., no Google)

• Good for you, old man…

Page 3: The Brave New World of Software Adam Kemp Staff Software Engineer National Instruments.

Back to reality

• Programming is still just as hard• Problems keep getting harder as tools get

better• The tools are never good enough• Also applies to hardware

Page 4: The Brave New World of Software Adam Kemp Staff Software Engineer National Instruments.

Hardware comparison

• RAM– Then: 640 kB should be enough for anyone– Now: 2 GB minimum

• Clock speed:– Then: 8-10 MHz (“turbo mode”)– Now: 2-3 GHz

Page 5: The Brave New World of Software Adam Kemp Staff Software Engineer National Instruments.

Moore’s Law

• The number of transistors on a chip will double about once every 2 years

Page 6: The Brave New World of Software Adam Kemp Staff Software Engineer National Instruments.

Clock speed reality check

• 3 GHz in 2002– => 48 GHz next year?

Page 7: The Brave New World of Software Adam Kemp Staff Software Engineer National Instruments.

Clock speed history

1982 1985 1989 1992 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 200810

100

1000

10000

Intel Clock Speed History

Clock Speed (MHz)

Page 8: The Brave New World of Software Adam Kemp Staff Software Engineer National Instruments.

Speed limits

• Heat• Power

Page 9: The Brave New World of Software Adam Kemp Staff Software Engineer National Instruments.

How is that a software problem?

• “I hate it when the computer gets in the way of my computer science.” – Some LabVIEW developer

Page 10: The Brave New World of Software Adam Kemp Staff Software Engineer National Instruments.

“Intel pledges 80 cores in five years” - Headline following Intel Developer Forum

September 2006

The solution: Multi-core• Dual-core• Quad-core• N-core

Page 11: The Brave New World of Software Adam Kemp Staff Software Engineer National Instruments.

How can software keep up?

• Optimize– Only goes so far

• Do more in parallel

Page 12: The Brave New World of Software Adam Kemp Staff Software Engineer National Instruments.

Programming the old way:

void doSomeStuff(){

doTask1();doTask2();

}

Page 13: The Brave New World of Software Adam Kemp Staff Software Engineer National Instruments.

Programming the new way:

void doSomeStuff(){

startTask1();startTask2();

waitForTasks();}

startTask1()startTask2()

doTask2()doTask1()

waitForTasks()

Page 14: The Brave New World of Software Adam Kemp Staff Software Engineer National Instruments.

Threads

• Threads are tasks that can be run at the same time as other tasks

startTask1()startTask2()

doTask2()doTask1()

waitForTasks()

Page 15: The Brave New World of Software Adam Kemp Staff Software Engineer National Instruments.

Programming Paradigms

• Procedural/Imperative– Sequence of steps executed in order– Difficult to visualize multiple threads– Difficult to write multiple threads– Even harder to write safe code for multiple

threads

“Probably the greatest cost of concurrency is that concurrency really is hard...”

– Herb Sutter

Page 16: The Brave New World of Software Adam Kemp Staff Software Engineer National Instruments.

Programming Paradigms

• Dataflow– Emphasis on data– Data “flows” through the program

Page 17: The Brave New World of Software Adam Kemp Staff Software Engineer National Instruments.

Dataflow Example

Control/indicator terminals

Wires Primitives (built-in functions)

Page 18: The Brave New World of Software Adam Kemp Staff Software Engineer National Instruments.

Dataflow

• Data flows through “wires”– Produced by output terminals– Consumed by input terminals

• Execution order defined by flow– A node runs when it has all of its inputs– A node’s outputs are available only after it runs

Page 19: The Brave New World of Software Adam Kemp Staff Software Engineer National Instruments.

Dataflow Example

Page 20: The Brave New World of Software Adam Kemp Staff Software Engineer National Instruments.

Dataflow Example

Page 21: The Brave New World of Software Adam Kemp Staff Software Engineer National Instruments.

Conclusion

• Programming is just as hard today• Hardware is not getting faster• Parallel programming is the future• Dataflow may be a better way to do parallel

programming

Page 22: The Brave New World of Software Adam Kemp Staff Software Engineer National Instruments.

Advice

• Learn on your own– Keep up with tech trends– Work on your own pet projects– Work with other people

• Get an internship• Try LabVIEW– http://www.ni.com/labview/