Concurrency a cautionary tale
Grand Central Dispatch (GCD) by Apple
API for lightweight threads
Work queues hold functions (or code blocks) to be called
Queues can manage concurrency, coordinate joining of tasks
GCD manages scheduling and processor assignment
A simple practical example:
Generating image thumbnails, for all files in a directory, on a quad-core machine.
v1: Sequential program 984 seconds
v2: Nave parallelisation did not run
GCD spawns another thread each time one blocks
Each task (a) hits the disk, (b) allocates memory to decompress images
Then the OS starts swapping, i.e. more disk contention
and GCD spawns another thread
v3: Read files sequentially in a single task, compress in parallel 300 seconds
This is self-limiting, but can still thrash
(Used only 10GB RAM on a machine with 15GB!)
v4: Limit the number of tasks to 2 x number of CPU cores 279 seconds
The CPU is not the only resource that threads / processes must share.
Concurrency (and distribution) libraries provide programmer support, not solutions.
Cross address-space IPC
How would you define it ? What Is Research? Merriam-Webster's definition 1 : Careful or diligent search 2 : Studious inquiry or examination; especially : Investigation or experimentation aimed at the discovery and interpretation of facts, revision of accepted theories...
Words and music by: Joseph Scriven and Robert Lowry; Arrangement by: The Sing Team; SASB #645 What a friend we have in Jesus, All our sins and griefs to bear What a privilege to carry Everything to God in prayer!...
Jeremy Bentham and Utilitarianism. Goal of society should be "greatest happiness for greatest number" of citizens. Laws should be only if they are USEFUL. Influenced John Stuart Mill, who wanted laws to protect workers
RAISE Online data is not fully available to the public. It is available to education professionals through the (password protected) RAISE Online service. Poole and Isle of Scilly have been excluded from the data set due to small cohort numbers...
Paul D. Miller, MD Distinguished Clinical Professor of Medicine University of Colorado Medical Center Colorado Center for Bone Research Lakewood, CO Strategies for Reducing Fracture Risk Antiresorptive Agents Estrogen Calcitonin Bisphosphonates SERMs (selective estrogen receptor modulators) Anti-RANK ligand antibody (in...
B1.2.1 The nervous system. ... Draw a pyramid of biomass and a pyramid of numbers for oak tree, aphids, ladybirds, label the producer, primary and secondary consumer . Why does it get smaller as it gets to the top? ......
Ready to download the document? Go ahead and hit continue!