logo

Crowdly

Browser

Додати до Chrome

CMPT 334 A - Principles of Operating Systems (FA 2025)

Шукаєте відповіді та рішення тестів для CMPT 334 A - Principles of Operating Systems (FA 2025)? Перегляньте нашу велику колекцію перевірених відповідей для CMPT 334 A - Principles of Operating Systems (FA 2025) в learn.twu.ca.

Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!

Suppose a system can keep 3 pages in memory at a time but uses virtual memory with the LRU Policy. Assume no pages are initially loaded. The following sequence of requests is made: 1, 2, 3, 4, 1, 2, 5, 3

How many page faults are there in this system? Enter a number.

Переглянути це питання

An OS has 64 pages each that is 1024 bytes. What is the best description of this situation.

[note: feel free to use a calculator for this or even google's calculation feature]

100%
0%
0%
0%
Переглянути це питання

The best metaphor for virtual memory is ___________

Note: Pick the answer that is most similar to the OS concept.

0%
0%
100%
0%
Переглянути це питання

What are the disadvantages (bad results) of virtual memory? 

50%
50%
0%
0%
Переглянути це питання

Suppose I have the following bookshelf and I wanted to insert the new book into it.

The best-fit algorithm would say that I would put a book in…

0%
100%
0%
0%
Переглянути це питання

The problem of memory management is most similar to what CMPT 334 unit:

0%
100%
0%
0%
Переглянути це питання

Suppose a system can keep 3 pages in memory at a time but uses virtual memory with the Least Recently Used page algorithm. Assume no pages are initially loaded. The following sequence of requests is made: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10

How many page faults are there in this system? Enter a number.

Переглянути це питання

My program only runs at memory address 433 to remind me of the GPA I wish I had. If it was run at any memory location it wouldn’t work. This code is an example of …

0%
0%
100%
0%
0%
Переглянути це питання

Written 2: Obligatory Synchronization and Multithreading Programming Questions (27 marks)

Note: This question involves coding so it may better to not spend too long working on it without reading the other questions! Also part a and b are separate questions.

Part a 18 marks) 

Suppose the Memory Management Unit stores records of each processes' base and limit value per Unit 5A. These structures are stored in three different queues: an OS process queue, a high priority queue, and a low priority queue.

Write pseudocode to find the average allocated memory of all processes. Pseudocode is fine as well as using shorthand like "<insert all relevant headers>" or changing functions to be easier to deal with.

You may assume the following struct is used or develop your own: 

struct node{

   int base;

   int limit; 

   int process_id;

   node* next; //A link to the next node

   node* back; //A link to the previous node.

}

Part b 9 marks)

The nuclear reactor that powers Wombat OS' machine learning core has three processes that manages its runtime. You are asked to ensure that process 1 runs its statement 1 (e.g., initialize the reactor) first, then process 2 runs statement 2 (e.g., fill the reactor with water), then process 3 run statement 3 (e.g., run the reactor) using synchronization tools. Any out of sequence running of these statements would result in an explosion (e.g., Statement 3 runs before Statement 1).  No justification for your code is necessary but it may help for marking. Pseudocode is fine as well as notation like

P1:

   dothing(value) //Do a thing related to unit 4.

   S1 //This run statements 1

Переглянути це питання

Written 1: Organizing Stores (18 marks)

From the Salvation Army website: Salvation Army food banks provide non-perishable and fresh food (when available) to anyone experiencing food shortage. This assistance often starts a conversation around getting more comprehensive support from one our many community programs and services.

A major question is how to decide who gets food first based on issues such as employment or whether they are from the food bank's region. Suppose that there is a group of people queued up for meals and the food bank's manager must decide who to serve first.

a 3 marks) Fill in the blank, this is an example of... Suggested Length: 2-3 Words.

b 10 marks) Suggest and justify an algorithm for this situation. Suggested Length: 2-3 sentences.

c 5 marks) Suppose the problem was changed so that if a user complains during each hour (e.g., 9 AM to 10 AM) they move up to the front of the line. Describe the type of solution (Suggested length: 1 sentence). What are some issues with applying this approach in the real world? (Suggested Length: 2-3 sentences)As in, even if an OS can run this solution properly what would go wrong if it was applied this in this real world situation... 

Переглянути це питання

Хочете миттєвий доступ до всіх перевірених відповідей на learn.twu.ca?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!

Browser

Додати до Chrome