Page 130 - Computer_Science_F5
P. 130

for automatic parallelisation by       3.  Discuss two common data
                  compilers or runtime systems, leading     partitioning strategies, domain
                  to efficient utilisation of processing    decomposition and spatial
                  resources.                                decomposition, and provide a real-

                                                            world application example for each.
          FOR ONLINE READING ONLY
              In conclusion, functional programming      4.  Research and identify two emerging    Chapter Two: Performance and optimisation of computer processor
              offers a unique approach to DLP. By           challenges or limitations associated
              embracing immutability and pure               with thread-level parallelism (TLP)
              functions, functional programs naturally      in modern processor architectures.
              lend themselves to parallel processing.    5.  Briefly discuss potential solutions or
              This style promotes thread safety,            mitigation strategies that computer
              simplifies reasoning about concurrent         architects might consider to address
              execution, and allows for efficient           emerging TLP challenges.
              utilization of multiple processing units   6.  Imagine a program that downloads
              in data-intensive applications.               a large file (Thread A) and performs
                                                            a complex mathematical calculation
                                                            (Thread B) concurrently. Analyse
                   Exercise 2.10
                                                            two scenarios:
               1.  Analyse the following applications        (a)  Scenario 1: No data
                   and explain how SIMD instructions             dependencies exist between
                   can be beneficial in each scenario:           Thread A and Thread B.
                   (a)  Image processing (applying           (b)  Scenario 2: Thread B relies on
                       a filter to a high-resolution             the completion of Thread A
                       image)                                    to access specific downloaded
                   (b)  Audio processing (encoding/              data for the calculation.
                       decoding an audio file)           7.  Explain how the presence or
                   (c)  Scientific     computing            absence of data dependencies
                       (performing vectorised               would impact the execution flow
                       calculations on large datasets)      and potential performance benefits
                                                            of multithreading in these scenarios
               2.  Imagine you are working on a
                   program that analyses website
                   traffic data from millions of users.
                   How can data partitioning be              Chapter summary
                   advantageous  in  this scenario?
                   Consider factors such as improved     Reflect on what you have learnt from
                   performance, scalability, and         this chapter, summarise and keep it in
                   efficient resource utilisation.       your portfolio.



                                                    121
               Student’s Book  Form Five



     Computer Science Form 5.indd   121                                                     23/07/2024   12:33
   125   126   127   128   129   130   131   132   133   134   135