Solutions to the 15 June 2017 preliminary examination, with all 46 printed subparts answered. Source: released examination archive, member
a10101w1-1.pdf.Use four request bits and four grant bits . A high requests service for the coming allocation period, and a high identifies the requester granted the resource during the current period. At most one grant may be high. An all-zero grant vector means idle. The synchronous sequential circuit also has a clock and an initialization signal.
Requests are sampled at a clock edge; the resulting allocation appears during the following cycle. This fixes the Moore machine timing convention: current grants depend on the stored state, rather than combinationally on requests that can change within the cycle.
Store three state bits: a two-bit index identifying the most recent recipient, and a valid bit indicating whether that recipient is receiving service in the current cycle. ThenWhen no requests are present at a decision edge, clear but preserve . Preserving implements round-robin arbitration with idle memory. Four possible last recipients each have an active and an idle state, giving eight states. The four idle states have equal outputs but different future priorities, so they cannot all be merged. One valid reset is , which gives requester zero first priority at startup.
All requester indices in the following expressions are interpreted modulo four. Let mean that requester is the first asserted request after last recipient :An empty logical conjunction is true. Decode the remembered index and combine the four priority orders:Exactly one is high when any request is high. Write as bits . The next-state function and Moore machine outputs areThus an idle step preserves the priority memory. The are combinational selection signals, not the current-cycle grants: exposing them directly as outputs would change the design into a Mealy machine. If a requester remains continuously asserted, each intervening successful grant advances the circular order, so it receives service after at most four grant decisions.
For a single read-only memory implementing both the next-state and output equations, the address has four request bits plus three present-state bits. Each word contains three next-state bits and four grant bits. HenceThree D flip-flops store the state outside this combinational ROM. This is the direct truth-table implementation for the encoding above. A smaller factored implementation exploits the independence of the next-state equations from : a next-state ROM and an output ROM use stored bits in total, or the output decoder can be ordinary logic. These are different implementation organizations, not different state counts.
An input-output-bound process spends much of its time waiting for input-output, often with short CPU bursts between waits. A CPU-bound process spends most of its time doing useful CPU computation, with comparatively little blocking. These descriptions concern the bottleneck in the workload; an I/O-bound process still needs CPU time.
With nonpreemptive scheduling, a running process retains the processor until it finishes its current CPU burst, blocks or voluntarily yields. With preemptive scheduling, the operating system may suspend a runnable process and select another one.
Time-slice preemption needs a hardware timer delivering an interrupt after bounded execution time, so control returns to the scheduler even if the running program never yields. Saving and restoring the execution context then lets the interrupted process resume later. The timer mechanism should remain under operating-system control.
Assume both processes are available at time zero and run the listed order, A followed by B, with no overlap even during input-output. A takes ms; B then takes ms. ThusThe scheduling turnaround time includes the time waiting before a process first runs. Reversing the serial order would leave the total at 23 ms but change completion times to 7 and 23 ms, with mean 15 ms. If arrivals were instead delayed until each serial launch, that would define a different turnaround measurement; the simultaneous-arrival convention is used for comparing the schedulers below.
With the given ready-order rule and A first, the CPU timeline in milliseconds isA performs input-output during and ; B does so during and . In particular, B becoming ready at time 7 does not interrupt A's ongoing nonpreemptive burst. The completion times are and , givingThere are 15 ms of useful CPU execution and 2 ms of idle time on this particular timeline.
Use round-robin scheduling with scheduling quantum 2 ms. A's first burst is split by B, and A's second burst is also interrupted once. The resulting CPU intervals areA blocks for input-output during and ; B blocks during and . At time 8, B joins the ready queue while A uses the remainder of its current quantum; B runs at time 9. No other process is runnable during A's final four milliseconds, so A can continue across the time-16 quantum boundary. Consequently
The preemptive policy improves B's scheduling turnaround time from 17 to 10 ms and the mean from 16.5 to 14 ms. A finishes later, at 18 rather than 16 ms, and the total completion time rises from 17 to 18 ms. Thus preemption improves mean turnaround here; nonpreemption gives the shorter makespan here.
The result illustrates different scheduling objectives, not a universal winner. These calculations assume negligible context switch overhead; charging for the additional switches could change the comparison. Both policies perform the same 15 ms of useful CPU work.
Use clocked processor registers, each storing an -bit word, two independent combinational read ports and one synchronous write port. Each address requires bits. The read addresses select two -to-one multiplexers, each bits wide. A write-address binary decoder combines its selected line with the global write enable to form the individual enables:At the active clock edge, register captures the common write data if , otherwise retaining its word. Reads return the currently stored words selected by their respective addresses. For non-power-of-two , unused address codes need a specified harmless implementation. A simultaneous read and write of one address follows the chosen edge/read timing; an additional forwarding circuit would be needed if a different bypass convention were required.
Two-read-port register file with a single synchronous write port
. The left panel uses a global write enable; the right shows the MIPS alternative with writes to index zero suppressed. Both read multiplexers select independently, and the alternative returns a hardwired zero for address zero. Details.Keep storage only for registers 1 through 31, return a hardwired all-zero word on either read port when its address is zero, and setThere is no enable for register zero and no global RegWrite input to this register file. The right-hand diagram above shows this change. Every clock edge may select a write address; choosing zero suppresses all physical register enables. Consequently the MIPS zero register acts as a write-suppression destination.
Move the no-write decision into the destination-address path. If the original destination selection produced and the original write-enable decision was , drive the new register file withA five-bit two-input multiplexer after the existing destination selector implements this, or the decoder can directly select among zero, the instruction's destination fields and register 31. Its control still distinguishes writing and non-writing instructions: removing the register-file enable pin does not remove that logical decision.
Read-address selection and the result-data path can remain unchanged. Instructions that formerly disabled RegWrite now select destination zero; their write data is irrelevant. Instructions writing an actual destination preserve the same address and data. Since writes to the MIPS zero register were already discarded, the architectural behaviour is unchanged for that case as well.
For
add, select rd and the arithmetic logic unit result. For sw, select destination zero while retaining the memory-store controls and source-register reads. For jal, select register 31 and the return-address data. These are the same actual register writes as before, with sw using destination zero in place of disabling RegWrite.The link value is determined by the particular MIPS architecture datapath convention: for the usual teaching datapath without a delay slot, or for classic delayed-branch MIPS. This write-enable change does not alter whichever link convention the original machine implements.
No: the only solution is the zero vector. Subtract the fourth row equation from the first to get . Subtract the third from the fourth to get . With , any row then gives . Thus this homogeneous linear system has trivial null space.
The columns are linearly independent. A linear combination of them with coefficients is exactly . Part (a) shows that this vanishes only when all three coefficients vanish, which is the definition of column independence. Hence has column rank three.
Writing the columns as , matrix multiplication givesThe column space is the linear span of these columns, so this particular linear combination belongs to it. The assertion holds for every vector of coefficients .
If has a solution, the multiplication identity from part (c) expresses as a linear combination of the columns, so .
Conversely, if lies in that column space, its definition supplies scalars with . Put those scalars into the column vector . Then . This proves both directions of the claimed equivalence.
The Gram-Schmidt process first gives , of norm two. Next , soFor the third column, both coefficients onto equal one, givingThese three nonzero vectors are mutually orthogonal and each has norm two. The resulting orthonormal basis is
Collect the orthonormal vectors as columns and compute . This gives the thin QR decompositionThe inner products in part (e) prove ; the column identities , , prove .
Substitute the QR decomposition into the normal equations:The diagonal of is nonzero, so is invertible. Cancel it algebraically to obtainCompute the three inner products in , then use back substitution in this upper triangular matrix. There is no need to form an inverse or explicitly construct . The orthogonal projection of onto the column space is ; its orthogonal residual proves that this solution minimizes .
The required elementary matrix isLeft multiplication exchanges the two rows. Applying the same exchange twice restores every row, so .
The elementary row operation and its reverse areThus replaces row three by row three minus three times row two. The inverse adds those three copies back.
Use multiplicativity of the determinant and the determinant criterion for an invertible matrix:Neither factor can therefore be zero, so both matrices are nonsingular. The determinant of a triangular matrix is the product of its diagonal entries:Each product is nonzero, forcing every diagonal factor to be nonzero. These explicitly stated determinant properties justify both conclusions.
First subtract row one from row two, using ; then subtract four times the updated row two from row three, using :The updated second row is and the final third row is . Hence and . The resulting LU decomposition isReversing the order when undoing the elementary operations is essential.
Introduce . Solve by forward substitution and then by back substitution. For these factors, the recurrences arefollowed byThe nonzero diagonal entries make both triangular solves well-defined. No matrix inverse is calculated.
With column-vector homogeneous coordinates, the translation matrix isIt maps to . The final coordinate incorporates the constant displacement into matrix multiplication.
Reflection in sends to . Therefore its homogeneous-coordinate matrix isIts square is the identity, as required for applying the same reflection twice.
Translate the mirror line to zero, reflect there, then translate back. Under the column-vector convention the rightmost operation acts first:This composition of affine transformations maps to , fixing exactly the points with .
Since is upper triangular, its eigenvalues are its diagonal entries. Equivalently, its characteristic polynomial is . Hence
For eigenvalue zero take . For eigenvalue , the first row of gives , so take . These are linearly independent eigenvectors, givingThe identities give , hence the required diagonalization .
The Gauss-Seidel method solves each component using the already updated components from the same iteration. In the splitting , those updated diagonal and lower-triangular terms stay on the left, while upper-triangular terms use the previous iterate. ThusHere is lower triangular with nonzero diagonal, so each new iterate is obtained by forward substitution, starting from the specified zero vector.
As , solve . Its first row gives ; its second gives . ThereforeThe second component uses the new first component , distinguishing Gauss-Seidel iteration from Jacobi iteration.
The exact solution obeys . Subtract this from the iteration to get . Hence the stationary iteration matrix isThis is exactly the matrix from part (a); the sign follows the given convention.
Yes. Part (a) diagonalizes , whose spectral radius is . Thusand every initial error converges to zero. For the specified initial vector, solving gives and . In fact,The special formula is not asserted for , because the zero-eigenvalue component disappears only after the first step.
Use conjunction elimination to obtain both premises needed for a contradiction under a temporary implication assumption. The following natural deduction derivation discharges precisely assumption 4:Here is the implication elimination rule and is negation introduction. The original conjunction remains the only undischarged premise.
Proof by contradiction is the derived ruleGiven the subproof under , first discharge it by negation introduction to get . Apply double-negation elimination to obtain . This justification uses the stated classical rules; unrestricted RAA would not follow from intuitionistic rules alone.
Put . First derive , then , using the derived proof by contradiction rule. Indentation records the subproofs:Line 11 uses explosion; lines 5 and 12 discharge only their inner assumptions. Each RAA step can be expanded into negation introduction followed by double-negation elimination, as in part (ii).
Use a biconditional introduction rule that discharges the two displayed temporary assumptions:Suitable elimination rules areThese are equivalent to using the biconditional elimination rule to extract the two implications and then applying modus ponens rule. Together they express both directions, with no extra arbitrary assumption retained after introduction.
Apply the biconditional introduction rule from part (iv) to the two already established derivations:The left numerator is part (iii), the right is part (i). Introduction discharges both displayed assumptions, so the result has no premises.
Assume the two implications in turn, then derive a contradiction from . The natural deduction proof isHere RAA is the derived proof by contradiction rule. The last two assumption discharge steps establish the requested right-associated implication as a theorem.
Under the negation of the desired disjunction, derive both negated propositions and contradict the premise. The natural deduction derivation isThe proof uses disjunction introduction, conjunction introduction and the classical RAA rule; it does not silently replace the required derivation by a truth-table check.
Articles were limited to the first 100 out of 545 total.
Articles by others on the same topic
There are currently no matching articles.

