Assume three (3) processes (Process 1, 2, and 3), which share access to two semaphores U and V, as follows:
In each process, all commands are sequentially executed. Processes start their execution, request access to their critical section controlled by the acquire() method, and leave their critical section with the release() method. The method print('x') prints to the standard output (e.g., display/monitor) the character 'x'. The 'goto L' command transfers the control of the process execution to the command attached to the label 'L:'. Note: It is assumed that all the processes run (are scheduled) as often as possible; i.e. the semaphores are the only constraints on process execution.
Now consider the following cooperating processes A and B that share the (common) variable X:
The initial value of X is 5 (X=5;) before any process execution. The commands within each process are executed sequentially.
Let us modify both programs by adding a semaphore S, which is initialized to 1 (S=1;), and X is initially 5 (X=5;). That is:
Let us modify again the initial programs by adopting a semaphore T, which is initialized to 0 (T=0;), and X is initially 5 (X=5;). That is:
Assume there are processes P and Q with the semaphores s and t, both initialized to 1 (s=1; t=1). Which of the following sequences of the commands P1, ..., P8, Q1, ..., Q5, leads those processes to a deadlock state, if any?
Imagine a system with an 8-bit byte-addressable physical address space.
Look at the following memory configuration, based on an 8-bit byte-addressable virtual address space with single- level paging. In each 8-bit virtual address, the most significant byte refers to the page number and the least significant byte refers to the offset within the page.
Consider the following low-level C memory copy operations, involving the routine
void memcpy(void *dst, void *src, size_t n)
which copies n bytes from address src to address dst. With reference to the above page table, answer the questions below.