Locking and AMO Homework EX1 Which of the following locking primitives can be described as a single integer that records the number of resources remaining? mutex conditional variable semaphore barrier...

2 answer below »
hello find attached a quiz assignmement


Locking and AMO Homework EX1 Which of the following locking primitives can be described as a single integer that records the number of resources remaining? mutex conditional variable semaphore barrier 2) Which of the following locking primitives describes a special semaphore whose values may only be 0 or 1? semaphore conditional variable barrier mutex 3)Which of the following cannot be used for locking? semaphore spin lock barrier mutex 4) A barrier whose value is 5 requires how many barrier entries before continuing? 5 4 3 2 1 0 5) Which of the following describes an uninterruptible memory read or write? atomic memory operation uninterruptible memory operation cooperative memory operation preemptible memory operation 6) The (Type in the answer)  instruction takes three registers: destination, source, and memory. This instruction takes a value from memory and stores it into destination. Atomically, it also takes the value from source and stores it into memory. 7) The term atomic means which of the following? The operation block (hangs) until the resources are available. The operation is preemptible. The operation occurs within one clock cycle. The operation is not preemptible. 8) Write the assembly code to swap a value in memory stored in the a1 register and store the old value into the t1 register. All the while, the new value to be stored in memory will be in the s1 register. All values are double words. Finally, the instruction must not acquire nor release any orderings.  (type answer) 9) A/an Type answer in  is a locking primitive that only allows one entrance into the critical section at a time. 10) A/an Type answer in  is not a lock itself, but rather a strategy to continually try to acquire a lock in a loop. Exo 2   1)The page size for a leaf at level 0 is how many bytes? 4,096 1,073,741,824 2,097,152 2,048 1,024 512 2) The page size for a leaf at level 1 is how many bytes? 1,073,741,824 2,097,152 2,048 1,024 512 4,096 3) The page size for a leaf at level 2 is how many bytes? 2048 1,024 2,097,152 1,073,741,824 512 4,096 4) The MMU first consults which of the following registers before translating? sscratch sepc stranslate smmu sstatus satp 5) A page table entry whose RWX bits are all 0 signifies which of the following? memory has not read, write, or execute permissions memory has read, write, and execute permissions the page is a branch the page is a leaf 6) A page fault caused while the CPU is running a LOAD instruction will have which of the following cause numbers? 10 12 2 11 1 7 15 8 13 14 7) An SFENCE.VMA instruction should be executed when which of the following conditions apply? (Select all that apply) When software recycles an ASID When software modifies a non-leaf PTE When software modifies a leaf PTE When software reads a non-leaf PTE When software reads a leaf PTE When a pmpcfg or pmpaddr register has been modified. 8) The PPN portion of the SATP register must be shifted left by how many places to calculate the physical page address? 4 12 20 1 8 2 16 9) Each HART has its own MMU. True False 10) The memory address 0x12345600 is appropriate for the location of a page table. True False 11) How many page table entries are in a page table? 16 8 32 512 1024 128 64 12) Which of the following fields in the SATP register are used to tag the translation lookaside buffer entries to avoid TLB flushes across context switches? MODE SATP PPN ASID 13 In your repository's template code, what is given as the kernel's address space identifier?  (Type in your answer) 14) To turn the MMU on in SV39 (39-bit virtual address) mode, which of the following values must be set in the MODE field of the SATP register? 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 15) Only the upper (type in your answer) bits of a 56-bit physical address are stored in the SATP register.
Answered 2 days AfterSep 22, 2022

Answer To: Locking and AMO Homework EX1 Which of the following locking primitives can be described as a single...

Nidhi answered on Sep 24 2022
60 Votes
Locking and AMO Homework
EX1
Which of the following locking primitives can be described as a single integer
that records t
he number of resources remaining?
mutex
conditional variable
semaphore
barrier

2) Which of the following locking primitives describes a special semaphore
whose values may only be 0 or 1?
semaphore
conditional variable
barrier
mutex
3)Which of the following cannot be used for locking?
semaphore
spin lock
barrier
mutex

4) A barrier whose value is 5 requires how many barrier entries before
continuing?
5
4
3
2
1
0

5) Which of the following describes an uninterruptible memory read or write?
atomic memory operation
uninterruptible memory operation
cooperative memory operation
preemptible memory operation
6) The (Type in the answer) XLAT instruction takes three registers: destination, source, and
memory. This instruction takes a value from memory and stores it into destination.
Atomically, it also takes the value from source and stores it into memory.

7) The term atomic means which of the following?
The operation block (hangs) until the resources are available.
The operation is preemptible.
The operation occurs within one clock cycle.
The operation is not...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here