Шукаєте відповіді та рішення тестів для 2025W Operating Systems (CS-3520-01)? Перегляньте нашу велику колекцію перевірених відповідей для 2025W Operating Systems (CS-3520-01) в moodle31.upei.ca.
Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!
Consider a system that has a 16KB address space and 64 byte pages in a two-level page table. How many pages are required to store the page directory (assuming each page directory entry (PDE) is 4 bytes)?
Suppose there are two processes P1 and P2 whose 1KB address spaces are allocated in physical memory with base relocation (only base, no bounds). Suppose P1 has a base equal to 1024 and P2 has base equal to 4096. Which of the following virtual memory addresses can P1 use that will give it access P2's memory?
The following C code was our first attempt to make a lock using a flag to indicate if the lock was acquired.
typedef struct __lock_t { int flag; } lock_t;void init(lock_t *mutex) {
mutex->flag = 0;
}
void lock(lock_t *mutex) {
while (mutex->flag == 1) // TEST the flag
; // spin-wait (do nothing)
mutex->flag = 1; // now SET it !
}
void unlock(lock_t *mutex) {
mutex->flag = 0;
}
How will this code perform in terms of correctness and efficiency?