Talks
Speakers
Events
Topics
Search
Sign in
Search
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
search talks for
⏎
Suggest modification to this talk
Title
Description
RubyConf AU 2013: http://www.rubyconf.org.au Here's a situation we've all be in at one point. We have a program. We want to make that program faster. We know about threads, processes, fibers. Then you start programming and you have no clue what to do. I was there. It sucks. This talk guides you down the rabbit hole and brings out the other side. Points covered: Threads, Fibers Processes, Forking, Detaching Parellelism vs Concurrency The many many different ways I crashed my computer learning these things Gotchas of each Common ways you shoot yourself in the foot Celluoid This is a learning and informative talk. It's target at intermediate developers who have ruby experience but never written any multi threaded code.
Date
Summarized using AI?
If this talk's summary was generated by AI, please check this box. A "Summarized using AI" badge will be displayed in the summary tab to indicate that the summary was generated using AI.
Show "Summarized using AI" badge on summary page
Summary
Markdown supported
The video titled "Dear God What Am I Doing? Concurrency and Parallel Processing" features Adam Hawkins at RubyConf AU 2013. The talk addresses the complexities of concurrency and parallel processing in programming, particularly within the Ruby programming language. Adam shares his personal journey of overcoming the confusion surrounding threads, processes, and fibers while aiming to enhance program speed. This informative session targets intermediate Ruby developers who may lack experience with multi-threaded code. Key points covered in the talk include: - **Introduction to Concurrency and Parallelism**: Adam explains the distinction between concurrency (managing multiple tasks simultaneously) and parallelism (executing multiple tasks at the same time). - **Machine Architecture Basics**: The talk simplifies the concept of threads and processes with a humorous analogy of a hamster running in a wheel, representing threads within processes. - **Understanding Threads, Processes, and Fibers**: - **Processes**: They operate independently with their own memory space, making inter-process communication (IPC) necessary. - **Threads**: They share memory space, making them easier to work with; however, they can lead to complexities such as race conditions requiring the use of locks. - **Fibers**: Offer finer control over execution and can aid in concurrency. - **Handling I/O Operations**: Ruby's versions 1.8 and 1.9 treated threading differently, affecting performance particularly during blocking I/O operations. - **Parallelizing Operations**: Adam explains experimenting with multi-threading to optimize response times for tasks such as making web queries. His findings showed that while using four threads substantially reduced execution time, scaling beyond that proved inefficient due to context switching overhead. - **Global Interpreter Lock (GIL)**: Hawkins discusses how the GIL in MRI affects true parallelism in Ruby, a limitation mitigated by using JRuby or Rubinius. - **Key Libraries and Tools**: The session introduces Celluloid as a library that simplifies concurrent programming and helps prevent issues like deadlocks, although it also faces GIL limitations. - **Practical Examples**: Real-life scenarios, such as querying Google and computational tasks like Bitcoin hashing, illustrate the challenges and considerations when working with concurrency. In conclusion, Adam’s talk emphasizes that understanding the nuances of concurrency and parallel processing is crucial for Ruby developers seeking to optimize their applications. He encourages exploring different Ruby interpreters and libraries like Celluloid to leverage the full potential of concurrency in programming.
Suggest modifications
Cancel