Looking for CMPT 334 A - Principles of Operating Systems (FA 2025) test answers and solutions? Browse our comprehensive collection of verified answers for CMPT 334 A - Principles of Operating Systems (FA 2025) at learn.twu.ca.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
Written 5: Safe Wombat Storage (25 Marks)
Alternative Partial Credit Problem: For part marks, you can instead solve the following multithreading problem: write psuedocode to find if a file with a specific name exists in a two-level directory. Your answer should use at least two threads and should use the level of complexity of multithreading described in the course. You may assume the specific data structures.
Full Mark Problem: After a considerable emotional and monetary investment, I have developed an IO device that allows users to input an image, remove all non-wombat aspects of the image, store it on the device for future access, then later retrieve it for the user.
Figure 1: Ceci n'est pas une wombat.
For the custom OS that uses this device, there are two commands for IO: iowrite(device_id, device_register, input) and ioread(device_id, device_register, variable_to_read). This device has the unique id "Wmbt" that allows for the OS to communicate with it.You are provided the following additional details: - The wombat device's "0 register" refers to the busy bit register.- The wombat device's "1 register" refers to the data input register. Users can either input in a filename and an image (to save the image) or a filename without an image to retrieve the image edited to remove all non-wombat data.- The wombat device's "2 register" refers to the image output register.- The wombat device's "3 register" refers to a status register.- The wombat device's "4 register" encodes errors as three bits.- The wombat device's data "input" and data "output" represent input and output.For example, ioread("Wmbt", 2, output) would copy over the device's output register data to the local variable output and only continue the program after the it is copied over.
a 2 marks) Describe what type of device is this based on course terminology. (Suggested Length: 4-5 words.) For a hint, I am thinking of terminology like "sharable"b 9 marks) Write psuedocode for a function to take an image and file name and save it using the above details. Basically, you want to make sure that you properly can save a wombat image then receive the output. Assume that no other processes can interact with the device at the same time.c 3 marks) What kind of errors related to Unit 6C would be relevant to this system? Suggested Length: 1-2 sentences.d 9 marks) Now develop a system to handle requests from multiple programs to use the wombat identifier device.Hints/Grading: Your program should make sure that multiple processes can send requests for wombat storage without errors or wombat related confusion, the worst kind. You can assume whatever program calls and structure are necessary to design your system. Part of the mark will be from the technical complexity of your answer and a correct use of Unit 4 and 6 concepts.
Written 4: Driving Forward (15 marks)
Modern cars have a custom Operating System that manages a car's systems. For example, a touch screen may manage what profile is active, with specific settings for mirrors or seat height based on the user's settings, while another system may manage analytics on the car, such as readings on the engine temperature and efficiency. In fact, devices may interface with other devices automatically, such as bluetooth connections to phones to broadcast music or even receive instructions to turn on the car's heater to help remove snow.
1 mark 4.a) What type of environment is this OS? Suggested Length: 1-2 words.
5 marks 4.b) A car company wants to add a customized cache to this Smart Car OS hardware that allows for faster read/write access of small data structures (less than 4 kilobytes). What data structure from either Unit 5 or 6 would you suggest to be stored in this cache? Why? Suggested Length 2-5 sentences.
4 marks 4.c) The marketing department wants to add more wireless adapters (e.g., bluetooth) and usb connection ports. What are the advantage/disadvantages of these additions? Suggested Length 3-5 sentences. Reminder: This is a class on a certain topic
5 marks 4.d) Suppose they want to add a local file system to record each profile's logs to their car (for insurance purposes of tracking speed and other information). What are the advantage/disadvantages of these additions especially in terms of unit 2 and 3 concepts? Suggested Length 3-5 sentences.
Written 3: Myriad of Memory Management Matters (25 marks)
Let's see if you remember Unit 5 material...
4 marks a) Define paging and virtual memory in a way that computing science students that didn't take this course could understand. Suggested Length: 2-4 sentences. Note that there is an emphasis on avoiding too complex descriptions or course terminology.2 marks b) Could you run virtual memory without using paging? Suggested Length: 1-2 sentences.4 marks c) One situation is that programs often have two parts: code and data. Give suggestions for improving memory management using this information. Suggested Length: 2-4 sentences. Marking Focus: Demonstrating insight from the suggested length.4 marks d) Explain why setting your virtual memory to be 1 terabyte is a bad idea using only course/textbook concepts. Suggested Length: 2-4 sentences.6 marks e) A common use case is a process looping over the same set of data. For example in Machine Learning, a data set may be split into pages 1, 2, 3, 4 and an algorithm would continuously loop over data on page 1 then page 2 then page 3 then 4 then loop back to 1 always in that order to adjust the neural network's parameters.e.1) What is the worst performing page request policy for such a loop? Why? Suggested Length: 1-2 sentence.e.2) Design an improved paging policy for this situation. Suggested Length: 1-2 sentence.
Written 2: Oh the Humane-AI-ty! (15 marks)
Your Mission: Pick exactly one prompt and respond to it:
Prompt 1: Wearable devices, such as the much maligned [word meaning "made fun of"] Humane AI (https://www.wired.com/review/humane-ai-pin/) tool from last year, integrate with Machine Learning to handle tasks such identifying objects in a room from video or informing users about directions to specific landmarks given audio. If you were to design such a device's OS, how would you consider synchronization, multithreading, paging, virtual memory, and IO management in its design? Suggested Length 1-2 paragraphs.
Prompt 2: Agree/Disagree: Operating systems, through synchronization, multithreading, paging, virtual memory, and IO management, have improved society's ability to deal with British Columbia's flooding and other natural disasters.
Grading Criteria for Either Prompt: Writing quality, demonstrating knowledge of OS (e.g., it is clear from terminology used that you understand these topics), and a demonstrated nuance (or good insight) in comparing/contrasting the systems. Your answer should cover at least three of the mentioned topics. You are welcome to perform research on the topic but it isn't necessary.
Written 1: Spreading RAM this Holiday Season (9 Marks).
A major driver of modern society is supply chain management. For example, factories produce RAM from raw materials that is then distributed to different stores, companies, and needy students. List each unit in the course, give a 1 sentence description (or title) of the unit, and explain how each unit can improve or relate to computer part supply chain management in 1-2 sentences.
Marking Criteria: Correctness and linking to each of the main units. Note that you should talk about how the unit helps solve the problems whether in terms of actual solutions or hypothetically (e.g., if we apply method X to problem Y it can help with Z).Important Note: I have heard that good students will find some DDR2 RAM under their Christmas tree according to some guy with a beard I know!
Written 4: Driving Forward (15 marks)
Modern cars have a custom Operating System that manages a car's systems. For example, a touch screen may manage what profile is active, with specific settings for mirrors or seat height based on the user's settings, while another system may manage analytics on the car, such as readings on the engine temperature and efficiency. In fact, devices may interface with other devices automatically, such as bluetooth connections to phones to broadcast music or even receive instructions to turn on the car's heater to help remove snow.
1 mark 4.a) What type of environment is this OS? Suggested Length: 1-2 words.
5 marks 4.b) A car company wants to add a customized cache to this Smart Car OS hardware that allows for faster read/write access of small data structures (less than 4 kilobytes). What data structure from either Unit 5 or 6 would you suggest to be stored in this cache? Why? Suggested Length 2-5 sentences.
4 marks 4.c) The marketing department wants to add more wireless adapters (e.g., bluetooth) and usb connection ports. What are the advantage/disadvantages of these additions? Suggested Length 3-5 sentences. Reminder: This is a class on a certain topic
5 marks 4.d) Suppose they want to add a local file system to record each profile's logs to their car (for insurance purposes of tracking speed and other information). What are the advantage/disadvantages of these additions especially in terms of unit 2 and 3 concepts? Suggested Length 3-5 sentences.
Written 5: Safe Wombat Storage (25 Marks)
Alternative Partial Credit Problem: For part marks, you can instead solve the following multithreading problem: write psuedocode to find if a file with a specific name exists in a two-level directory. Your answer should use at least two threads and should use the level of complexity of multithreading described in the course. You may assume the specific data structures.
Full Mark Problem: After a considerable emotional and monetary investment, I have developed an IO device that allows users to input an image, remove all non-wombat aspects of the image, store it on the device for future access, then later retrieve it for the user.
Figure 1: Ceci n'est pas une wombat.
For the custom OS that uses this device, there are two commands for IO: iowrite(device_id, device_register, input) and ioread(device_id, device_register, variable_to_read). This device has the unique id "Wmbt" that allows for the OS to communicate with it.You are provided the following additional details: - The wombat device's "0 register" refers to the busy bit register.- The wombat device's "1 register" refers to the data input register. Users can either input in a filename and an image (to save the image) or a filename without an image to retrieve the image edited to remove all non-wombat data.- The wombat device's "2 register" refers to the image output register.- The wombat device's "3 register" refers to a status register.- The wombat device's "4 register" encodes errors as three bits.- The wombat device's data "input" and data "output" represent input and output.For example, ioread("Wmbt", 2, output) would copy over the device's output register data to the local variable output and only continue the program after the it is copied over.
a 2 marks) Describe what type of device is this based on course terminology. (Suggested Length: 4-5 words.) For a hint, I am thinking of terminology like "sharable"b 9 marks) Write psuedocode for a function to take an image and file name and save it using the above details. Basically, you want to make sure that you properly can save a wombat image then receive the output. Assume that no other processes can interact with the device at the same time.c 3 marks) What kind of errors related to Unit 6C would be relevant to this system? Suggested Length: 1-2 sentences.d 9 marks) Now develop a system to handle requests from multiple programs to use the wombat identifier device.Hints/Grading: Your program should make sure that multiple processes can send requests for wombat storage without errors or wombat related confusion, the worst kind. You can assume whatever program calls and structure are necessary to design your system. Part of the mark will be from the technical complexity of your answer and a correct use of Unit 4 and 6 concepts.
Written 3: Myriad of Memory Management Matters (25 marks)
Let's see if you remember Unit 5 material...
4 marks a) Define paging and virtual memory in a way that computing science students that didn't take this course could understand. Suggested Length: 2-4 sentences. Note that there is an emphasis on avoiding too complex descriptions or course terminology.2 marks b) Could you run virtual memory without using paging? Suggested Length: 1-2 sentences.4 marks c) One situation is that programs often have two parts: code and data. Give suggestions for improving memory management using this information. Suggested Length: 2-4 sentences. Marking Focus: Demonstrating insight from the suggested length.4 marks d) Explain why setting your virtual memory to be 1 terabyte is a bad idea using only course/textbook concepts. Suggested Length: 2-4 sentences.6 marks e) A common use case is a process looping over the same set of data. For example in Machine Learning, a data set may be split into pages 1, 2, 3, 4 and an algorithm would continuously loop over data on page 1 then page 2 then page 3 then 4 then loop back to 1 always in that order to adjust the neural network's parameters.e.1) What is the worst performing page request policy for such a loop? Why? Suggested Length: 1-2 sentence.e.2) Design an improved paging policy for this situation. Suggested Length: 1-2 sentence.
Written 2: Oh the Humane-AI-ty! (15 marks)
Your Mission: Pick exactly one prompt and respond to it:
Prompt 1: Wearable devices, such as the much maligned [word meaning "made fun of"] Humane AI (https://www.wired.com/review/humane-ai-pin/) tool from last year, integrate with Machine Learning to handle tasks such identifying objects in a room from video or informing users about directions to specific landmarks given audio. If you were to design such a device's OS, how would you consider synchronization, multithreading, paging, virtual memory, and IO management in its design? Suggested Length 1-2 paragraphs.
Prompt 2: Agree/Disagree: Operating systems, through synchronization, multithreading, paging, virtual memory, and IO management, have improved society's ability to deal with British Columbia's flooding and other natural disasters.
Grading Criteria for Either Prompt: Writing quality, demonstrating knowledge of OS (e.g., it is clear from terminology used that you understand these topics), and a demonstrated nuance (or good insight) in comparing/contrasting the systems. Your answer should cover at least three of the mentioned topics. You are welcome to perform research on the topic but it isn't necessary.
Written 1: Spreading RAM this Holiday Season (9 Marks).
A major driver of modern society is supply chain management. For example, factories produce RAM from raw materials that is then distributed to different stores, companies, and needy students. List each unit in the course, give a 1 sentence description (or title) of the unit, and explain how each unit can improve or relate to computer part supply chain management in 1-2 sentences.
Marking Criteria: Correctness and linking to each of the main units. Note that you should talk about how the unit helps solve the problems whether in terms of actual solutions or hypothetically (e.g., if we apply method X to problem Y it can help with Z).Important Note: I have heard that good students will find some DDR2 RAM under their Christmas tree according to some guy with a beard I know!