Page 87 - Computer_Science_F5
P. 87

Computer Science      Turning off the stove (halt): This instruction puts the processor

                             into a low-power state,  effectively  stopping all  program
                             execution. It is like the head chef turning off the stove (halting
                             operations) when the kitchen is closed.
          FOR ONLINE READING ONLY
             (b) Why is it important to restrict access to privileged instructions? Think about
                potential consequences if junior cooks had unrestricted access to all ingredients
                and appliances.

             (c) A new recipe (user program) requires deep-frying (privileged operation) a
                specific ingredient. How can the junior cooks (user program) achieve this task
                securely and efficiently, following the access control protocols of the kitchen
                (CPU)?



           Function of memory and I/O                user programs cannot execute their tasks
           system                                    without accessing data stored in memory.
           Recall the previous analogy of a restaurant
           kitchen (CPU) where the head chef         I/O System: The delivery entrance and
           (operating system) leads a team of cooks                 exit
           (user programs) to prepare delicious meals   The I/O system functions like the kitchen’s
                                                     delivery entrance and exit. It handles the
           (processed data). To function smoothly,   flow of ingredients (data) from external
           this kitchen relies on two critical systems:   sources (like refrigerators and freezers)
           memory and the Input/Output (I/O)         and delivers prepared meals (processed
           system.                                   data) to customers (external devices).

                                                     Similar to how cooks would not have
           Memory: The well-stocked pantry           everything they need readily available in
           Memory acts like the kitchen’s well-      the pantry, user programs often require data
           stocked pantry, storing all the ingredients  from external devices like hard drives or
           (data) required for the cooks to prepare   network cards. The I/O system facilitates
           dishes (programs). The head chef carefully   this communication, ensuring a smooth
           organises the pantry (memory) to ensure   exchange of information. Additionally,
           ingredients (data) are easily retrievable   the I/O system is crucial for delivering
           when needed. This organisation often      the final results (processed data) generated
           involves techniques like paging and       by the user programs. This could involve
                                                     sending data to a display screen (like
           segmentation, similar to categorising     serving a dish to a customer) or storing it
           ingredients on shelves or in labelled     on a storage device (like packing leftovers
           containers. Just like cooks cannot prepare   for takeaway). In essence, memory and
           a meal without the necessary ingredients,   the I/O system work together seamlessly


                                                  78
                                                                for Advanced Secondary Schools



     Computer Science Form 5.indd   78                                                      23/07/2024   12:33
   82   83   84   85   86   87   88   89   90   91   92