The new line character is utilized solely as the last person in each message. On association with
Question:
The new line character is utilized solely as the last person in each message. On association with the server, a client can possibly (I) question the situation with a client by sending the client's name to the server as a string (and the server answers with the current status message), or (ii) set the situation with a client by sending the client's name followed by a colon and the new status message. For instance, "Eva:Gone to the test corridor." sets the status message for Eva.Describe ML's datatype declaration. Show a portrayal of a limit
declaration that uses plan matching on legitimate potential increments of the data type.
What is the best number of terms there can be in a unimportant extent of things
sort of a piece of n boolean elements? [2 marks]
Consider a futile multiplier with inputs x1, x0, y1, y0 and yields z3, z2, z1, z0
Working structures ought to have the choice to get applications far from crashing or locking
up the plan, or from obstructing various applications. Which three kinds of
gear support do we hope to accomplish this? Legitimize your reaction. [6 marks]
How do applications request that the functioning plan performs endeavors on their
reason? [2 marks]
What should truly be possible if we didn't have the key stuff support?
An office has an (Internet) access accomplice reviewed at 10 Mbps full-duplex. Each client requires 1 Mbps while presenting and each client is dynamic 10% of the time. (I) Initially a static undertaking of information move limit is made for each client. How much clients could the entry at whatever point interact ultimately stay aware of? (ii) The working environment picks a pure pack traded acknowledgment interface. What is the probability that a given client is conveying? (iii) The work area keeps 35 clients on the gathering traded acknowledgment interface. What is the probability that definitively n clients are giving simultaneously? (iv) Find the probability that there are something like 11 clients sending simultaneously. Express the conditions for a relationship with be a midway deals. [3 marks]
A piece of a brand name number n is a combination of typical numbers (possibly
including duplicates and in any deals) whose out and out is n. Permit Pn to be the methodology of
assignments of n; for example, P4 = {(4),(3, 1),(2, 2),(2, 1, 1),(1, 1, 1, 1)}. Demand the
tasks in Pn as follows:
(a1, a2, . . . ar) 6 (b1, b2, . . . bs) if the (PC based understanding) and (bj ) can be changed so that
b1 = a1 + a2 + + ak1
b2 = ak1+1 + ak1+2 + + ak2
bs1 = aks2+1 + aks2+2 + + aks1
bs = aks1+1 + aks1+2 + + ar
Note that (2, 1, 1) 6 (3, 1), and (2, 1, 1) 6 (2, 2) regardless (3, 1) and (2, 2) can't be
considered.
Show that 6 is a lacking deals on Pn. [4 marks]
P5 has seven areas; draw the Hasse frame for (P5, 6). [3 marks]
3 Operating Systems
Z = Y X
where Z, Y, X are the positive numbers tended to by z3z2z1z0, y1y0 and x1x0
using the obvious depiction.
FiThree elective depictions for non-negative entire numbers, n, are: Peano: values have the improvement S(... S(Z) ...), applying S n times to Z where S and Z are constructors or constants of unequivocal data type. Twofold: values are of type bool list with 0 being tended to as the void list, and the most un-essential piece being managed in the most important sign of the layout. Church: values have the arrangement fn f => fn x => f(... f(x) ...), applying f n times to x (a) Write ML limits with respect to these data types which take the depiction of an entire number n as battle and return n as a ML int. [6 marks] (b) Write ML limits concerning these data types which take depictions of numbers m and n and return the depiction of m + n. Your reactions must not use any value or procedure on type int or authentic. [Hint: you could it obliging to make a limit larger part: bool*bool*bool - > bool (which brings huge back unequivocally when something like two of its inquiries are huge) and to see that the ML disproportion boss '<>' goes probably as unambiguous or on bool.] (c) Letting two and three exclusively be the Church depictions of numbers 2 moreover, 3, show whether all of the going with ML verbalizations give a Church depiction of some entire number and, expecting this is the case what entire number is tended to, and if not giving a one-line reason. (I) two three (ii) three two (iii) two three (iv) three two
Answer the five pieces all in all.
(a) Prove that there could be no number responses for x
5 3x
2 + 2x 1 = 0. [4 marks]
(b) Draw a picture of a deterministic restricted machine which sees the language
of strings matching a*ba. [4 marks]
(c) Describe the movement of the Unix shell concerning the joint exertion
the board system calls it uses. You could make the most of the opportunity to use pseudo-code
clearly a chart to help your portrayal. [4 marks]
(d) What is the inspiration driving a legitimate insistence language like Z? [4 marks]
(e) Describe ML's datatype declaration. Show a portrayal of a limit
declaration that uses game plan matching on consistent potential increments of the data type.
What is the best number of terms there can be in an immaterial extent of things
sort of a piece of n boolean elements? [2 marks]
Consider a trivial multiplier with inputs x1, x0, y1, y0 and yields z3, z2, z1, z0
Working systems ought to have the choice to get applications far from crashing or locking
up the plan, or from blocking various applications. Which three kinds of
gear support do we hope to accomplish this? Legitimize your reaction. [6 marks]
How do applications request that the functioning plan performs endeavors on their
reason? [2 marks]
What should truly be possible if we didn't have the key stuff support?
An office has an (Internet) access accomplice studied at 10 Mbps full-duplex. Each client requires 1 Mbps while giving and each client is dynamic 10% of the time. (I) Initially a static errand of information move limit is made for each client. How much clients could the entry at whatever point connect at last stay aware of? (ii) The working environment picks a pure pack traded acknowledgment interface. What is the probability that a given client is conveying? (iii) The work area keeps 35 clients on the gathering traded acknowledgment interface. What is the probability that exactly n clients are giving simultaneously? (iv) Find the probability that there are something like 11 clients sending simultaneously. Express the conditions for a relationship with be a midway deals. [3 marks]
A piece of a brand name number n is a variety of typical numbers (possibly
including duplicates and in any deals) whose through and through is n. Permit Pn to be the methodology of
assignments of n; for example, P4 = {(4),(3, 1),(2, 2),(2, 1, 1),(1, 1, 1, 1)}. Demand the
tasks in Pn as follows:
(a1, a2, . . . ar) 6 (b1, b2, . . . bs) if the (PC based understanding) and (bj ) can be changed so that
b1 = a1 + a2 + + ak1
b2 = ak1+1 + ak1+2 + + ak2
bs1 = aks2+1 + aks2+2 + + aks1
bs = aks1+1 + aks1+2 + + ar
Note that (2, 1, 1) 6 (3, 1), and (2, 1, 1) 6 (2, 2) regardless (3, 1) and (2, 2) can't be
considered.
Show that 6 is a lacking deals on Pn. [4 marks]
P5 has seven areas; draw the Hasse frame for (P5, 6). [3 marks]
3 Operating Systems
Z = Y X
where Z, Y, X are the positive numbers tended to by z3z2z1z0, y1y0 and x1x0
using the evident depiction.
Find an inconsequential extent of things explanation for each of z3, z2, z1 and z0. [10 marks]
Comment on the capriciousness of building an eight-cycle multiplier using a pointless
extent of things structure. [3 marks]
Depict another strategy for overseeing building an eight-cycle multiplier.
MySQL Server furthermore keeps an arrangement of
the - - comment style. That is, the - - start comment development ought to be followed by a space (or by a control character, for instance, a newline). The space is required
Tanb? Make the recipe concerning the CPTs (Conditional Probability Tables) and prior probabilities in the Tanb. (b) [2 pts] Assume we see every one of the parts X1 = x1, X2 = x2, . . . , X6 = x6 in the Tanb above. What is the gathering rule for the Tanb? Make the condition concerning the CPTs and prior probabilites in the Tanb. (c) [3 pts] Specify an end demand that is significant for the sales P(Y | X5 = x5) in the Tanb over (the solicitation variable Y should not be consolidated your referring to). How much factors that are in the most amazing aspect (there may be mutiple; enduring this is what is happening, list only truly outstanding) actuated by factor end with your referring to? Which elements could they anytime say they are?
(d) [3 pts] Specify an end demand that is capable for the solicitation P(X3 | X5 = x5) in the Tanb above (counting X3 in your referring to). How much factors that are in the most amazing aspect (there may be mutiple; enduring this is what's going on, list only truly outstanding) prompted by factor clearing with your referring to? What parts could they sooner or later say they are?
(e) [2 pts] Does it look at to run Gibbs looking at to do derivation in a Tanb? In two or less sentences, legitimize your reaction. (f) [2 pts] Suppose we are given a dataset of viewpoint on Y and all of the elements X1, . . . , X6 in the Tanb above. Award C to mean the undaunted count of perceptions, C(Y = y) hints how much point of view on the event Y = y, C(Y = y, Xi = xi) deduces the count of the times the event Y = y, Xi = xi occurred, and so on. Using the C documentation, make the most insane likelihood measures for all CPTs including the variable X4. (g) [2 pts] In the documentation of the sales above, structure the Laplace smoothed checks for all CPTs including the variable X4 (for degree of smoothing k). to prevent issues with subsequently set SQL expectations that use assembles like the going with, where we thusly install the value of the part for show a piece of the MySQL view blocks and discuss how you can pass endpoints to a view. Circumspectly endeavor to give sensible experts for help your reaction.
In this way, it is more dexterous to include a standard for circle with a numeric record while stressing over social events, considering the way that the for...in statement rehashes over client portrayed properties despite the show parts, expecting you change the Array object, (for instance, adding custom properties or systems).
for...of enunciation The for...of enunciation makes a circle Iterating over iterable things (counting Array, Map, Set, discusses object, and so on), conveying a custom cycle persuade with clarifications to be executed for the value of every single specific property.
for (variable of thing) verbalization
The going with model shows the partition between a for...of circle and a for...in circle. While for...in underlines over property names, for...of rehashes over property assessments:
const arr = [3, 5, 7]; arr.foo = 'great greetings';
for (let I in arr) { console.log(i);//logs "0", "1", "2", "foo" }nd an irrelevant extent of things enunciation for each of z3, z2, z1 and z0. [
Working frameworks should have the decision to keep applications away from crashing or locking
up the construction, or from hindering different applications. Which three sorts of
equipment support do we expect to achieve this? Legitimize your response. [6 marks]
How do applications demand that the working design performs undertakings on their
reason? [2 marks]
What ought to genuinely be conceivable in the event that we didn't have the major stuff support?
An office has an (Internet) access partner evaluated at 10 Mbps full-duplex. Every client requires 1 Mbps while bestowing and every client is dynamic 10% of the time. (I) Initially a static task of data move limit is made for every client. The amount of clients could the passage whenever interface sooner or later keep up with? (ii) The workplace chooses an unadulterated pack exchanged enlistment interface. What is the likelihood that a given client is conveying? (iii) The workplace keeps 35 clients on the pack exchanged acceptance interface. What is the likelihood that precisely n clients are granting at the same time? (iv) Find the likelihood that there are something like 11 clients sending at the same time. Express the circumstances for a relationship with be a halfway sales. [3 marks]
A piece of a brand name number n is various conventional numbers (perhaps
counting copies and in any sales) whose outright is n. License Pn to be the strategy of
portions of n; for instance, P4 = {(4),(3, 1),(2, 2),(2, 1, 1),(1, 1, 1, 1)}. Request the
distributions in Pn as follows:
(a1, a2, . . . ar) 6 (b1, b2, . . . bs) if the (PC based understanding) and (bj ) can be changed so that
b1 = a1 + a2 + + ak1
b2 = ak1+1 + ak1+2 + + ak2
bs1 = aks2+1 + aks2+2 + + aks1
bs = aks1+1 + aks1+2 + + ar
Note that (2, 1, 1) 6 (3, 1), and (2, 1, 1) 6 (2, 2) regardless (3, 1) and (2, 2) can't be
examined.
Show that 6 is an insufficient requesting on Pn. [4 marks]
P5 has seven sections; draw the Hasse outline for (P5, 6). [3 marks]
3 Operating Systems
Z = Y X
where Z, Y, X are the positive numbers tended to by z3z2z1z0, y1y0 and x1x0
utilizing the verifiable portrayal.
Track down an irrelevant proportion of things articulation for each of z3, z2, z1 and z0. [10 marks]
Remark on the unconventionality of building an eight-cycle multiplier utilizing a superfluous
proportion of things structure. [3 marks]
Portray one more method for managing building an eight-cycle multiplier.
Three elective portrayals for non-negative whole numbers, n, are: Peano: values have the development S(... S(Z) ...), applying S n times to Z where S and Z are constructors or constants of explicit information type. Twofold: values are of type bool list with 0 being tended to as the void list, and the most un-fundamental piece being dealt with in the most noteworthy mark of the outline. Church: values have the plan fn f => fn x => f(... f(x) ...), applying f n times to x (a) Write ML limits concerning these information types which take the portrayal of a whole number n as struggle and return n as a ML int. [6 marks] (b) Write ML limits concerning these information types which take portrayals of numbers m and n and return the portrayal of m + n. Your responses must not utilize any worth or philosophy on type int or genuine. [Hint: you could it obliging to make a breaking point greater part: bool*bool*bool - > bool (which brings significant back precisely when something like two of its debates are significant) and to see that the ML lopsidedness chief '<>' goes likely as specific or on bool.] (c) Letting two and three only be the Church portrayals of numbers 2 moreover, 3, show whether all of the going with ML verbalizations give a Church portrayal of some whole number and, expecting this is the case what whole number is tended to, and if not giving a one-line reason. (I) two three (ii) three two (iii) two three (iv) three two
Answer the five fragments as a whole.
(a) Prove that there could be no number reactions for x
5 3x
2 + 2x 1 = 0. [4 marks]
(b) Draw an image of a deterministic limited machine which perceives the language
of strings matching a*ba. [4 marks]
(c) Describe the activity of the Unix shell concerning the joint effort
the board framework calls it utilizes. You could take advantage of the chance to utilize pseudo-code
obviously a graph to help your depiction. [4 marks]
(d) What is the motivation driving a fitting confirmation language like Z? [4 marks]
(e) Describe ML's datatype announcement. Show a depiction of a breaking point
announcement that utilizes arrangement matching on possible expected gains of the information type.
What is the best number of terms there can be in an irrelevant proportion of things
kind of a piece of n boolean factors? [2 marks]
Consider a worthless multiplier with inputs x1, x0, y1, y0 and yields z3, z2, z1, z0
Pass limits to your points of view in a clear manner by making a Function to GET your characteristics from Session Variables. Limitations of MySQL with Big Data
Conveying Hot Data. Overseeing Highly Volatile Data. Avoid MySQL Scalability Limitations. Giving Analytics. Energizing Full Text Searches at Scale
(a) [1 pt] Suppose we observe no variables as evidence in the Tanb above. What is the classification rule for the Tanb? Write the formula in terms of the CPTs (Conditional Probability Tables) and prior probabilities in the Tanb. The solution is simply the maximal y according to the prior probabilites of y: argmaxy P(y).
(b) [2 pts] Assume we observe all the variables X1 = x1, X2 = x2, . . . , X6 = x6 in the Tanb above. What is the classification rule for the Tanb? Write the formula in terms of the CPTs and prior probabilites in the Tanb. We want the most probable y given the variables X1, . . . , X6, which is (using the same reasoning as for Naive Bayes) argmax y P(y | x1, . . . , x6) = argmax y P(y, x1, . . . , x6) = argmax y P(y)P(x1 | y)P(x2 | x1, y)P(x3 | x2, y)P(x4 | x2, y)P(x5 | x4, y)P(x6 | x4, y) The rubric for this question is all-or-nothing (correct/incorrect).
(c) [3 pts] Specify an elimination order that is efficient for the query P(Y | X5 = x5) in the Tanb above (the query variable Y should not be included your ordering). How many variables are in the biggest factor (there may be more than one; if so, l
list only one of the largest) induced by variable elimination with your ordering? Which variables are they?
We can ignore the variables X3 and X6, since when we marginalize them in the elimination order, they will sum to 1. Thus any elimination order including X3 or X6 is incorrect. Otherwise, we essentially just walk up the tree: P(Y | x5) P(Y, x5) = X x1,x2,x3,x4,x6 P(Y, x1, . . . , x6) = P(Y ) X One of the greatest benefits of installing a network at a school is the fact that all of the software can be loaded on one computer (the file server). This eliminates that need to spend time and energy installing updates and tracking files on independent computers throughout the building. Resource Sharing. Sharing resources is another area in which a network exceeds stand-alone computers. Most students cannot afford enough laser printers, fax machines, modems, scanners, and CD-ROM players for each computer. However, if these or similar peripherals are added to a network, they can be shared by many users. Flexible Access. School networks allow students to access their files from computers throughout the school. Students can begin an assignment in their classroom, save part of it There are certain parallels between the equipment used to build a WLAN and that used in a traditional wired LAN. Both networks require network interface cards or network adapter cards. A wireless LAN PC card, which contains an in-built antenna, is used to connect notebook computers to a wireless network. Usually, this is inserted into the relevant slot in the side of the notebook, but some may be internal to the notebook. Desktop computers can also connect to a wireless network if a wireless network card is inserted into one of its internal PCI slots. In a wireless network, an 'access point' has a similar function to the hub in wired networks. It broadcasts and receives signals to and from the surrounding computers via their adapter card. It is also the point where a wireless network can be connected into an existing wired network. The most obvious difference between wireless and wired networks, however, is that the latter uses some form of cable to connect computers together. A wireless network does not need cable to form a physical connection between computers.TLBs and caches are examples of content-addressable memories (CAMs). (a) What is the principal difference between a CAM and a RAM? [4 marks] (b) What is the difference between fully associative, set associative and direct mapped lookup? [6 marks] (c) Why are TLBs always much smaller than caches? [4 marks] (d) Which of the lookup mechanisms in part (b) is usually used for a TLB and why aren't the other mechanisms usually used? [6 marks] 2 ECAD Consider the following mysterious Verilog module. module mystery(c,r,a,s); input c,r,a; output [2:0] s; reg [2:0] s; always @(posedge c or posedge r) if(r) s<=0; else begin if(a && (s<7)) s<=s+1; else if(!a && (s>0)) s<=s-1; end endmodule (a) How many flip-flops will be required to implement the mystery module, and how will signals c and r be connected to these flip-flops? [5 marks] (b) What is the state transition diagram for this mystery module? [5 marks] (c) If this module were synthesised to the minimum sum of products form, what would the equations be for next state bits s[0], s[1] and s[2]? [10 marks] 2 CST.2004.3.3 3 Data Structures and Algorithms (a) Describe how the Lempel Ziv text compression algorithm works, illustrating your answer by deriving the sequence of numbers and corresponding bit patterns it would generate when applied to a string starting with the following 24 characters: ABCDABCDABCDABCDABCDABCD ... You may assume that the initial table is of size 256 (containing bytes 0 to 255) and that the codes for "A", "B", "C" and "D" are 65, 66, 67 and 68, respectively. [12 marks] (b) Estimate how many bits the algorithm would use to encode a string consisting of 1000 repetitions of the character "A". [8 marks] 4 Comparative Programming Languages (a) Discuss to what extent a programmer can expect a program that conforms to a standard to generate identical results when run under different conforming compilers on different machines. [6 marks] (b) ALGOL 60 provided call by value and call by name, Pascal provided call by value and call by reference, and ALGOL-W provided a variety of calling methods including call by result and call by value-result. Briefly describe the calling mechanisms just mentioned and discuss why most modern programming languages provide only call by value. [8 marks] (c) Discuss the reasons why languages such as Fortran, Algol and PL/I designed in 1950s and 1960s are less widely used than languages designed in the last 20 years. [6 marks] 3 [TURN OVER CST.2004.3.4 5 Operating Systems II (a) What problem do real-time scheduling algorithms try to solve? [2 marks] (b) Describe one static priority and one dynamic priority real-time scheduling algorithm. You should discuss the issue of admission control, and comment on the data structures that an implementation would need to maintain and on how these would be used to make scheduling decisions. [8 marks] (c) A designer of a real-time system wishes to have concurrently executing tasks share a data structure protected by a mutual exclusion lock. (i) What scheduling problem could arise here? [2 marks] (ii) How could this problem be overcome? [2 marks] (d) The designer also wishes the real-time system to use demand paged virtual memory for efficiency. What problems could arise here, and how could they be overcome? [6 marks] 6 Numerical Analysis I (a) For Single Precision in the IEEE binary floating-point standard (IEEE 754) the precision is defined as 24, and the exponent requires 8 bits of storage. With reference to IEEE Single Precision, explain the terms exponent, significand, precision, sign bit, normalised number, denormal number. [6 marks] (b) Explain the term hidden bit. What are the values of the hidden bit for normalised and denormal numbers? How is the exponent stored and why? How are the exponent, significand and sign bit arranged in memory? [4 marks] (c) Let x denote the floating-point representation of a number x. Define the terms absolute error (x) and relative error (x) in representing x. How are x and x related? Define machine epsilon (m). [3 marks] (d) Assume x = y = z = m. Using worst-case analysis, estimate xy, xy. Find an expression for w where w = z xy. [4 marks] (e) Working to 4 significant decimal digits only, compute w when x = 2.018, y = 2.008, z = 4.058. Given m ' 0.5 103 , how many significant decimal digits of w can be relied on? [3 marks] on of a Turing machine that is specified by a quintuplet description. [4 marks] (c) Define the configuration of a Turing machine at step t, and establish equations that specify the configuration of a k-symbol Turing machine at step (t + 1) in terms of the configuration at the previous step t. [6 marks] (d) Explain how you would use your equations to simulate a specific Turing machine by a register machine whose program encodes the quintuplet description. To what extent does this support Turing's Thesis? [Explicit program for a register machine is not required.] [8 marks] 8 Computer Graphics and Image Processing Describe an algorithm for performing scan conversion of a set of 3D polygons, including details of clipping, projection, and the underlying 2D polygon scan conversion algorithm. You may assume that you are given the colour of each polygon and that no lighting calculations are required. Please state any additional assumptions that you need to make. Ray tracing is not an acceptable answer to this question. [20 marks] 5 [TURN OVER CST.2004.3.6 9 Introduction to Security (a) Explain briefly mechanisms that software on a desktop computer can use to securely generate secret keys for use in cryptographic protocols. [5 marks] (b) Give two different ways of implementing residual information protection in an operating system and explain the threat addressed by each. [5 marks] (c) Consider the standard POSIX file-system access control mechanism: (i) Under which conditions can files and subdirectories be removed from a parent directory? [2 marks] (ii) Many Unix variants implement an extension known as the "sticky bit". What is its function? [2 marks] (iii) On a POSIX system that lacks support for the "sticky bit", how could you achieve an equivalent effect? [2 marks] (d) VerySafe Ltd offer two vaults with electronic locks. They open only after the correct decimal code has been entered. The VS100 - a low-cost civilian model - expects a 6-digit code. After all six digits have been entered, it will either open or will signal that the code was wrong and ask for another try. The VS110 - a far more expensive government version - expects a 40-digit code. Users of a beta-test version of the VS110 complained about the difficulty of entering such a long code correctly. The manufacturer therefore made a last-minute modification. After every five digits, the VS110 now either confirms that the code has been entered correctly so far, or it asks for the previous five digits again. Compare the security of the VS100 and VS110.
(a) Take an initially empty hash table with five slots, with hash function h(x) = x mod 5, and with collisions resolved by chaining. Draw a sketch of what happens when inserting the following sequence of keys into it: 35, 2, 18, 6, 3, 10, 8, 5.
(b) Repeat part (a) but with the following three changes: the hash table now has ten slots, the hash function is h(x) = x mod 10, and collisions are resolved by linear probing. (c) Imagine a hash table implementation where collisions are resolved by chaining but all the data stays within the slots of the original table. All entries not containing key-value pairs are marked with a Boolean flag and linked together into a free list.
(a) Explain how a parse tree representing an expression can (i) be converted into stack-oriented intermediate code and then (ii) be translated into simple machine code for a register-oriented architecture (e.g. ARM or IA32) on an instruction-by-instruction basis. Also indicate how this code might be improved to remove push-pop pairs introduced by (ii). Your answer need only consider expression forms encountered in the expression: h(a, g(b), c) * 3 + d [12 marksDefine, in a programming language documentation of your decision, a recursive drop parser that will develop the theoretical sentence structure tree for an info stream adjusting to the above grammar for orders. You might expect the presence of a capacity lex() that will yield a whole number addressing the following lexical token from the info stream, and the capacities mk2(op,x), mk3(op,x,y) and mk4(op,x,y,z) that will build theoretical sentence structure tree hubs with a given administrator and one, a few operands. You ought to expect that exponentiation is correct associativible and the order before repeatwhile ought to be the most limited conceivable. [12 marks] Briefly frame how you would adjust your parser if the order to one side of repeatwhile was changed to be the longest (as opposed to the most limited). [4 marks] 5 Data Structures and Algorithms You are given two arrangements of numbers Xi and Yj , where I and j run from 1 to N. Devise a calculation to track down the M biggest upsides of Xi Yj . This calculation ought not be quadratic in N, however being quadratic in M is allowed. You ought to see N as being of the request for 20,000 and M as being of the request for 1,000.
(c) Describe an effective calculation to track down the middle of a bunch of 106 whole numbers where it is realized that there are less than 100 particular numbers in the set. [6 marks] 6 Computer Design (a) Why does pipelining present information risks? [4 marks] (b) What system might be utilized to eliminate a few dards? [4 marks] (c) Why is it unrealistic to eliminate all information dangers? [4 marks] (d) What equipment is expected to forestall information risks from encroaching the developer's model of guidance execution? [4 marks] (e) What is the contrast between an information danger and a control risk? [4 marks] 5 [TURN OVER CST.2001.3.6 7 Operating System Functions (a) What are the central questions with planning for shared-memory multiprocessors? [3 marks] (b) Processor partiality, take booking and group planning are three strategies utilized inside multiprocessor working frameworks. (I) Briefly depict the activity of each. [6 marks] (ii) Which issue does the processor partiality method look to survive? [2 marks] (iii) What issue does the processor liking strategy experience the ill effects of, and how might this issue at any point be survived? [2 marks] (iv) In which conditions is a posse planning approach generally fitting? [2 marks] (c) What unexpected issues does the virtual memory the board framework need to address while managing shared-memory multiprocessor frameworks?
(a) Implement a status server in Java. The server ought to run endlessly, answering to client demands. When a client demand has been satisfied, the server ought to close the association. You might accept current status messages are lost if the server is restarted and you don't have to deal with exemptions. [8 marks] (b) One housemate proposes the server and client ought to impart by serializing Java protests instead of sending messages as message. (I) Describe in words the progressions you would make to your server execution to send messages as serialized Java objects. [3 marks] (ii) List two benefits and two detriments of an execution in light of serialized Java objects as opposed to sending messages as message. [4 marks] (c) Another housemate proposes that the server shouldn't close the client's association in the wake of noting the solicitation. Rather the association ought to remain open until the client sends another solicitation or shuts the association. Depict in words what transforms you would have to make to your execution to some degree (a) to accomplish this and remark on the benefits and hindrances of this thought.
(a) Describe the primary illustrations gained from the report into the breakdown of the London Rescue vehicle Service. [12 marks] (b) To what degree have the improvements in programming devices and the board practices of the most recent twenty years advanced the circumstance, and which of the examples do we actually need to watch out for now?
N. Wirth's reading material Algorithms + information structures = programs (1976) contains the following story. I wedded a widow (call her W) who has an adult girl (D). My dad (F), who visited us regularly, became hopelessly enamored with my step-little girl and wedded her. Henceforth my dad turned into my child in-regulation what's more, my progression little girl turned into my mom. A few months after the fact, my significant other brought forth a child (S1), who turned into the brother by marriage of my dad, as well as my uncle. The spouse of my dad - that is, my progression little girl - likewise had a child (S2). Utilizing Prolog, make a rundown of realities that addresses what is happening in the above story. [5 marks] Add rules characterizing the family connections (like father by marriage) depicted in the story. [5 marks] Show how a Prolog framework would utilize your program to demonstrate the objective "I'm my own granddad". [10 marks] 8 Databases Make sense of the ANSI/SPARC engineering for Data Base Management Systems, and show how it upholds information freedom. [5 marks] Portray the social model of information presented by E.F. Codd in 1970. [4 marks] What are its assets and shortcomings? [7 marks] What variables have prompted its prevailing situation in the commercial center today?
(a) Write C capacity revbits() which takes a solitary 8-digit burn boundary and returns a roast outcome by turning around the request for the pieces in the scorch. [4 marks] (b) Write C capacity revbytes() taking two boundaries and returning no outcome. The primary boundary is a pointer to memory containing n coterminous bytes (each of type singe), and the second is the quantity of bytes. The capacity ought to have the result of turning around the request for the pieces in the n bordering bytes, seen as a bitstring of length 8n. For instance, the primary piece of the principal burn ought to be traded with last piece of the last roast. [6 marks] (c) You have been allocated the accompanying apparently working C code, which processes documents controlling the way of behaving of a framework. That's what you see, subsequent to acquiringShow that 6 is a deficient sales on Pn. [4 marks]
P5 has seven sections; draw the Hasse outline for (P5, 6). [3 marks]
3 Operating Systems
announcement that utilizes arrangement matching on reasonable expected gains of the information type.
What is the best number of terms there can be in an immaterial proportion of things
kind of a piece of n boolean factors? [2 marks]
Consider a futile multiplier with inputs x1, x0, y1, y0 and yields z3, z2, z1, z0 such
that
Z = Y X
where Z, Y, X are the positive numbers tended to by z3z2z1z0, y1y0 and x1x0
utilizing the clear portrayal.
Track down a unimportant proportion of things clarification for each of z3, z2, z1 and z0. [10 marks]
Remark on the multi-layered plan of building an eight-digit multiplier utilizing an inconsequential
proportion of things structure. [3 marks]The server stores the current status of every housemate as a line of text. For instance, housemate Eva could set her status to "Gone to the test corridor." Messages are passed among clients and the server as message strings sent over TCP. The new line character is utilized solely as the last person in each message. On association with the server, a client can possibly (I) question the situation with a client by sending the client's name to the server as a string (and the server answers with the current status message), or (ii) set the situation with a client by sending the client's name followed by a colon and the new status message. For instance, "Eva:Gone to the test corridor." sets the status message for Eva.Describe ML's datatype declaration. Show a portrayal of a limit
declaration that uses plan matching on legitimate potential increments of the data type.
What is the best number of terms there can be in a unimportant extent of things
sort of a piece of n boolean elements? [2 marks]
Consider a futile multiplier with inputs x1, x0, y1, y0 and yields z3, z2, z1, z0
Working structures ought to have the choice to get applications far from crashing or locking
up the plan, or from obstructing various applications. Which three kinds of
gear support do we hope to accomplish this? Legitimize your reaction. [6 marks]
How do applications request that the functioning plan performs endeavors on their
reason? [2 marks]
What should truly be possible if we didn't have the key stuff support?
An office has an (Internet) access accomplice reviewed at 10 Mbps full-duplex. Each client requires 1 Mbps while presenting and each client is dynamic 10% of the time. (I) Initially a static undertaking of information move limit is made for each client. How much clients could the entry at whatever point interact ultimately stay aware of? (ii) The working environment picks a pure pack traded acknowledgment interface. What is the probability that a given client is conveying? (iii) The work area keeps 35 clients on the gathering traded acknowledgment interface. What is the probability that definitively n clients are giving simultaneously? (iv) Find the probability that there are something like 11 clients sending simultaneously. Express the conditions for a relationship with be a midway deals. [3 marks]
A piece of a brand name number n is a combination of typical numbers (possibly
including duplicates and in any deals) whose out and out is n. Permit Pn to be the methodology of
assignments of n; for example, P4 = {(4),(3, 1),(2, 2),(2, 1, 1),(1, 1, 1, 1)}. Demand the
tasks in Pn as follows:
(a1, a2, . . . ar) 6 (b1, b2, . . . bs) if the (PC based understanding) and (bj ) can be changed so that
b1 = a1 + a2 + + ak1
b2 = ak1+1 + ak1+2 + + ak2
bs1 = aks2+1 + aks2+2 + + aks1
bs = aks1+1 + aks1+2 + + ar
Note that (2, 1, 1) 6 (3, 1), and (2, 1, 1) 6 (2, 2) regardless (3, 1) and (2, 2) can't be
considered.
Show that 6 is a lacking deals on Pn. [4 marks]
P5 has seven areas; draw the Hasse frame for (P5, 6). [3 marks]
3 Operating Systems
Z = Y X
where Z, Y, X are the positive numbers tended to by z3z2z1z0, y1y0 and x1x0
using the obvious depiction.
FiThree elective depictions for non-negative entire numbers, n, are: Peano: values have the improvement S(... S(Z) ...), applying S n times to Z where S and Z are constructors or constants of unequivocal data type. Twofold: values are of type bool list with 0 being tended to as the void list, and the most un-essential piece being managed in the most important sign of the layout. Church: values have the arrangement fn f => fn x => f(... f(x) ...), applying f n times to x (a) Write ML limits with respect to these data types which take the depiction of an entire number n as battle and return n as a ML int. [6 marks] (b) Write ML limits concerning these data types which take depictions of numbers m and n and return the depiction of m + n. Your reactions must not use any value or procedure on type int or authentic. [Hint: you could it obliging to make a limit larger part: bool*bool*bool - > bool (which brings huge back unequivocally when something like two of its inquiries are huge) and to see that the ML disproportion boss '<>' goes probably as unambiguous or on bool.] (c) Letting two and three exclusively be the Church depictions of numbers 2 moreover, 3, show whether all of the going with ML verbalizations give a Church depiction of some entire number and, expecting this is the case what entire number is tended to, and if not giving a one-line reason. (I) two three (ii) three two (iii) two three (iv) three two
Answer the five pieces all in all.
(a) Prove that there could be no number responses for x
5 3x
2 + 2x 1 = 0. [4 marks]
(b) Draw a picture of a deterministic restricted machine which sees the language
of strings matching a*ba. [4 marks]
(c) Describe the movement of the Unix shell concerning the joint exertion
the board system calls it uses. You could make the most of the opportunity to use pseudo-code
clearly a chart to help your portrayal. [4 marks]
(d) What is the inspiration driving a legitimate insistence language like Z? [4 marks]
(e) Describe ML's datatype declaration. Show a portrayal of a limit
declaration that uses game plan matching on consistent potential increments of the data type.
What is the best number of terms there can be in an immaterial extent of things
sort of a piece of n boolean elements? [2 marks]
Consider a trivial multiplier with inputs x1, x0, y1, y0 and yields z3, z2, z1, z0
Working systems ought to have the choice to get applications far from crashing or locking
up the plan, or from blocking various applications. Which three kinds of
gear support do we hope to accomplish this? Legitimize your reaction. [6 marks]
How do applications request that the functioning plan performs endeavors on their
reason? [2 marks]
What should truly be possible if we didn't have the key stuff support?
An office has an (Internet) access accomplice studied at 10 Mbps full-duplex. Each client requires 1 Mbps while giving and each client is dynamic 10% of the time. (I) Initially a static errand of information move limit is made for each client. How much clients could the entry at whatever point connect at last stay aware of? (ii) The working environment picks a pure pack traded acknowledgment interface. What is the probability that a given client is conveying? (iii) The work area keeps 35 clients on the gathering traded acknowledgment interface. What is the probability that exactly n clients are giving simultaneously? (iv) Find the probability that there are something like 11 clients sending simultaneously. Express the conditions for a relationship with be a midway deals. [3 marks]
A piece of a brand name number n is a variety of typical numbers (possibly
including duplicates and in any deals) whose through and through is n. Permit Pn to be the methodology of
assignments of n; for example, P4 = {(4),(3, 1),(2, 2),(2, 1, 1),(1, 1, 1, 1)}. Demand the
tasks in Pn as follows:
(a1, a2, . . . ar) 6 (b1, b2, . . . bs) if the (PC based understanding) and (bj ) can be changed so that
b1 = a1 + a2 + + ak1
b2 = ak1+1 + ak1+2 + + ak2
bs1 = aks2+1 + aks2+2 + + aks1
bs = aks1+1 + aks1+2 + + ar
Note that (2, 1, 1) 6 (3, 1), and (2, 1, 1) 6 (2, 2) regardless (3, 1) and (2, 2) can't be
considered.
Show that 6 is a lacking deals on Pn. [4 marks]
P5 has seven areas; draw the Hasse frame for (P5, 6). [3 marks]
3 Operating Systems
Z = Y X
where Z, Y, X are the positive numbers tended to by z3z2z1z0, y1y0 and x1x0
using the evident depiction.
Find an inconsequential extent of things explanation for each of z3, z2, z1 and z0. [10 marks]
Comment on the capriciousness of building an eight-cycle multiplier using a pointless
extent of things structure. [3 marks]
Depict another strategy for overseeing building an eight-cycle multiplier.
MySQL Server furthermore keeps an arrangement of
the - - comment style. That is, the - - start comment development ought to be followed by a space (or by a control character, for instance, a newline). The space is required
Tanb? Make the recipe concerning the CPTs (Conditional Probability Tables) and prior probabilities in the Tanb. (b) [2 pts] Assume we see every one of the parts X1 = x1, X2 = x2, . . . , X6 = x6 in the Tanb above. What is the gathering rule for the Tanb? Make the condition concerning the CPTs and prior probabilites in the Tanb. (c) [3 pts] Specify an end demand that is significant for the sales P(Y | X5 = x5) in the Tanb over (the solicitation variable Y should not be consolidated your referring to). How much factors that are in the most amazing aspect (there may be mutiple; enduring this is what is happening, list only truly outstanding) actuated by factor end with your referring to? Which elements could they anytime say they are?
(d) [3 pts] Specify an end demand that is capable for the solicitation P(X3 | X5 = x5) in the Tanb above (counting X3 in your referring to). How much factors that are in the most amazing aspect (there may be mutiple; enduring this is what's going on, list only truly outstanding) prompted by factor clearing with your referring to? What parts could they sooner or later say they are?
(e) [2 pts] Does it look at to run Gibbs looking at to do derivation in a Tanb? In two or less sentences, legitimize your reaction. (f) [2 pts] Suppose we are given a dataset of viewpoint on Y and all of the elements X1, . . . , X6 in the Tanb above. Award C to mean the undaunted count of perceptions, C(Y = y) hints how much point of view on the event Y = y, C(Y = y, Xi = xi) deduces the count of the times the event Y = y, Xi = xi occurred, and so on. Using the C documentation, make the most insane likelihood measures for all CPTs including the variable X4. (g) [2 pts] In the documentation of the sales above, structure the Laplace smoothed checks for all CPTs including the variable X4 (for degree of smoothing k). to prevent issues with subsequently set SQL expectations that use assembles like the going with, where we thusly install the value of the part for show a piece of the MySQL view blocks and discuss how you can pass endpoints to a view. Circumspectly endeavor to give sensible experts for help your reaction.
In this way, it is more dexterous to include a standard for circle with a numeric record while stressing over social events, considering the way that the for...in statement rehashes over client portrayed properties despite the show parts, expecting you change the Array object, (for instance, adding custom properties or systems).
for...of enunciation The for...of enunciation makes a circle Iterating over iterable things (counting Array, Map, Set, discusses object, and so on), conveying a custom cycle persuade with clarifications to be executed for the value of every single specific property.
for (variable of thing) verbalization
The going with model shows the partition between a for...of circle and a for...in circle. While for...in underlines over property names, for...of rehashes over property assessments:
const arr = [3, 5, 7]; arr.foo = 'great greetings';
for (let I in arr) { console.log(i);//logs "0", "1", "2", "foo" }nd an irrelevant extent of things enunciation for each of z3, z2, z1 and z0. [
Working frameworks should have the decision to keep applications away from crashing or locking
up the construction, or from hindering different applications. Which three sorts of
equipment support do we expect to achieve this? Legitimize your response. [6 marks]
How do applications demand that the working design performs undertakings on their
reason? [2 marks]
What ought to genuinely be conceivable in the event that we didn't have the major stuff support?
An office has an (Internet) access partner evaluated at 10 Mbps full-duplex. Every client requires 1 Mbps while bestowing and every client is dynamic 10% of the time. (I) Initially a static task of data move limit is made for every client. The amount of clients could the passage whenever interface sooner or later keep up with? (ii) The workplace chooses an unadulterated pack exchanged enlistment interface. What is the likelihood that a given client is conveying? (iii) The workplace keeps 35 clients on the pack exchanged acceptance interface. What is the likelihood that precisely n clients are granting at the same time? (iv) Find the likelihood that there are something like 11 clients sending at the same time. Express the circumstances for a relationship with be a halfway sales. [3 marks]
A piece of a brand name number n is various conventional numbers (perhaps
counting copies and in any sales) whose outright is n. License Pn to be the strategy of
portions of n; for instance, P4 = {(4),(3, 1),(2, 2),(2, 1, 1),(1, 1, 1, 1)}. Request the
distributions in Pn as follows:
(a1, a2, . . . ar) 6 (b1, b2, . . . bs) if the (PC based understanding) and (bj ) can be changed so that
b1 = a1 + a2 + + ak1
b2 = ak1+1 + ak1+2 + + ak2
bs1 = aks2+1 + aks2+2 + + aks1
bs = aks1+1 + aks1+2 + + ar
Note that (2, 1, 1) 6 (3, 1), and (2, 1, 1) 6 (2, 2) regardless (3, 1) and (2, 2) can't be
examined.
Show that 6 is an insufficient requesting on Pn. [4 marks]
P5 has seven sections; draw the Hasse outline for (P5, 6). [3 marks]
3 Operating Systems
Z = Y X
where Z, Y, X are the positive numbers tended to by z3z2z1z0, y1y0 and x1x0
utilizing the verifiable portrayal.
Track down an irrelevant proportion of things articulation for each of z3, z2, z1 and z0. [10 marks]
Remark on the unconventionality of building an eight-cycle multiplier utilizing a superfluous
proportion of things structure. [3 marks]
Portray one more method for managing building an eight-cycle multiplier.
Three elective portrayals for non-negative whole numbers, n, are: Peano: values have the development S(... S(Z) ...), applying S n times to Z where S and Z are constructors or constants of explicit information type. Twofold: values are of type bool list with 0 being tended to as the void list, and the most un-fundamental piece being dealt with in the most noteworthy mark of the outline. Church: values have the plan fn f => fn x => f(... f(x) ...), applying f n times to x (a) Write ML limits concerning these information types which take the portrayal of a whole number n as struggle and return n as a ML int. [6 marks] (b) Write ML limits concerning these information types which take portrayals of numbers m and n and return the portrayal of m + n. Your responses must not utilize any worth or philosophy on type int or genuine. [Hint: you could it obliging to make a breaking point greater part: bool*bool*bool - > bool (which brings significant back precisely when something like two of its debates are significant) and to see that the ML lopsidedness chief '<>' goes likely as specific or on bool.] (c) Letting two and three only be the Church portrayals of numbers 2 moreover, 3, show whether all of the going with ML verbalizations give a Church portrayal of some whole number and, expecting this is the case what whole number is tended to, and if not giving a one-line reason. (I) two three (ii) three two (iii) two three (iv) three two
Answer the five fragments as a whole.
(a) Prove that there could be no number reactions for x
5 3x
2 + 2x 1 = 0. [4 marks]
(b) Draw an image of a deterministic limited machine which perceives the language
of strings matching a*ba. [4 marks]
(c) Describe the activity of the Unix shell concerning the joint effort
the board framework calls it utilizes. You could take advantage of the chance to utilize pseudo-code
obviously a graph to help your depiction. [4 marks]
(d) What is the motivation driving a fitting confirmation language like Z? [4 marks]
(e) Describe ML's datatype announcement. Show a depiction of a breaking point
announcement that utilizes arrangement matching on possible expected gains of the information type.
What is the best number of terms there can be in an irrelevant proportion of things
kind of a piece of n boolean factors? [2 marks]
Consider a worthless multiplier with inputs x1, x0, y1, y0 and yields z3, z2, z1, z0
Pass limits to your points of view in a clear manner by making a Function to GET your characteristics from Session Variables. Limitations of MySQL with Big Data
Conveying Hot Data. Overseeing Highly Volatile Data. Avoid MySQL Scalability Limitations. Giving Analytics. Energizing Full Text Searches at Scale
(a) [1 pt] Suppose we observe no variables as evidence in the Tanb above. What is the classification rule for the Tanb? Write the formula in terms of the CPTs (Conditional Probability Tables) and prior probabilities in the Tanb. The solution is simply the maximal y according to the prior probabilites of y: argmaxy P(y).
(b) [2 pts] Assume we observe all the variables X1 = x1, X2 = x2, . . . , X6 = x6 in the Tanb above. What is the classification rule for the Tanb? Write the formula in terms of the CPTs and prior probabilites in the Tanb. We want the most probable y given the variables X1, . . . , X6, which is (using the same reasoning as for Naive Bayes) argmax y P(y | x1, . . . , x6) = argmax y P(y, x1, . . . , x6) = argmax y P(y)P(x1 | y)P(x2 | x1, y)P(x3 | x2, y)P(x4 | x2, y)P(x5 | x4, y)P(x6 | x4, y) The rubric for this question is all-or-nothing (correct/incorrect).
(c) [3 pts] Specify an elimination order that is efficient for the query P(Y | X5 = x5) in the Tanb above (the query variable Y should not be included your ordering). How many variables are in the biggest factor (there may be more than one; if so, l
list only one of the largest) induced by variable elimination with your ordering? Which variables are they?
We can ignore the variables X3 and X6, since when we marginalize them in the elimination order, they will sum to 1. Thus any elimination order including X3 or X6 is incorrect. Otherwise, we essentially just walk up the tree: P(Y | x5) P(Y, x5) = X x1,x2,x3,x4,x6 P(Y, x1, . . . , x6) = P(Y ) X One of the greatest benefits of installing a network at a school is the fact that all of the software can be loaded on one computer (the file server). This eliminates that need to spend time and energy installing updates and tracking files on independent computers throughout the building. Resource Sharing. Sharing resources is another area in which a network exceeds stand-alone computers. Most students cannot afford enough laser printers, fax machines, modems, scanners, and CD-ROM players for each computer. However, if these or similar peripherals are added to a network, they can be shared by many users. Flexible Access. School networks allow students to access their files from computers throughout the school. Students can begin an assignment in their classroom, save part of it There are certain parallels between the equipment used to build a WLAN and that used in a traditional wired LAN. Both networks require network interface cards or network adapter cards. A wireless LAN PC card, which contains an in-built antenna, is used to connect notebook computers to a wireless network. Usually, this is inserted into the relevant slot in the side of the notebook, but some may be internal to the notebook. Desktop computers can also connect to a wireless network if a wireless network card is inserted into one of its internal PCI slots. In a wireless network, an 'access point' has a similar function to the hub in wired networks. It broadcasts and receives signals to and from the surrounding computers via their adapter card. It is also the point where a wireless network can be connected into an existing wired network. The most obvious difference between wireless and wired networks, however, is that the latter uses some form of cable to connect computers together. A wireless network does not need cable to form a physical connection between computers.TLBs and caches are examples of content-addressable memories (CAMs). (a) What is the principal difference between a CAM and a RAM? [4 marks] (b) What is the difference between fully associative, set associative and direct mapped lookup? [6 marks] (c) Why are TLBs always much smaller than caches? [4 marks] (d) Which of the lookup mechanisms in part (b) is usually used for a TLB and why aren't the other mechanisms usually used? [6 marks] 2 ECAD Consider the following mysterious Verilog module. module mystery(c,r,a,s); input c,r,a; output [2:0] s; reg [2:0] s; always @(posedge c or posedge r) if(r) s<=0; else begin if(a && (s<7)) s<=s+1; else if(!a && (s>0)) s<=s-1; end endmodule (a) How many flip-flops will be required to implement the mystery module, and how will signals c and r be connected to these flip-flops? [5 marks] (b) What is the state transition diagram for this mystery module? [5 marks] (c) If this module were synthesised to the minimum sum of products form, what would the equations be for next state bits s[0], s[1] and s[2]? [10 marks] 2 CST.2004.3.3 3 Data Structures and Algorithms (a) Describe how the Lempel Ziv text compression algorithm works, illustrating your answer by deriving the sequence of numbers and corresponding bit patterns it would generate when applied to a string starting with the following 24 characters: ABCDABCDABCDABCDABCDABCD ... You may assume that the initial table is of size 256 (containing bytes 0 to 255) and that the codes for "A", "B", "C" and "D" are 65, 66, 67 and 68, respectively. [12 marks] (b) Estimate how many bits the algorithm would use to encode a string consisting of 1000 repetitions of the character "A". [8 marks] 4 Comparative Programming Languages (a) Discuss to what extent a programmer can expect a program that conforms to a standard to generate identical results when run under different conforming compilers on different machines. [6 marks] (b) ALGOL 60 provided call by value and call by name, Pascal provided call by value and call by reference, and ALGOL-W provided a variety of calling methods including call by result and call by value-result. Briefly describe the calling mechanisms just mentioned and discuss why most modern programming languages provide only call by value. [8 marks] (c) Discuss the reasons why languages such as Fortran, Algol and PL/I designed in 1950s and 1960s are less widely used than languages designed in the last 20 years. [6 marks] 3 [TURN OVER CST.2004.3.4 5 Operating Systems II (a) What problem do real-time scheduling algorithms try to solve? [2 marks] (b) Describe one static priority and one dynamic priority real-time scheduling algorithm. You should discuss the issue of admission control, and comment on the data structures that an implementation would need to maintain and on how these would be used to make scheduling decisions. [8 marks] (c) A designer of a real-time system wishes to have concurrently executing tasks share a data structure protected by a mutual exclusion lock. (i) What scheduling problem could arise here? [2 marks] (ii) How could this problem be overcome? [2 marks] (d) The designer also wishes the real-time system to use demand paged virtual memory for efficiency. What problems could arise here, and how could they be overcome? [6 marks] 6 Numerical Analysis I (a) For Single Precision in the IEEE binary floating-point standard (IEEE 754) the precision is defined as 24, and the exponent requires 8 bits of storage. With reference to IEEE Single Precision, explain the terms exponent, significand, precision, sign bit, normalised number, denormal number. [6 marks] (b) Explain the term hidden bit. What are the values of the hidden bit for normalised and denormal numbers? How is the exponent stored and why? How are the exponent, significand and sign bit arranged in memory? [4 marks] (c) Let x denote the floating-point representation of a number x. Define the terms absolute error (x) and relative error (x) in representing x. How are x and x related? Define machine epsilon (m). [3 marks] (d) Assume x = y = z = m. Using worst-case analysis, estimate xy, xy. Find an expression for w where w = z xy. [4 marks] (e) Working to 4 significant decimal digits only, compute w when x = 2.018, y = 2.008, z = 4.058. Given m ' 0.5 103 , how many significant decimal digits of w can be relied on? [3 marks] on of a Turing machine that is specified by a quintuplet description. [4 marks] (c) Define the configuration of a Turing machine at step t, and establish equations that specify the configuration of a k-symbol Turing machine at step (t + 1) in terms of the configuration at the previous step t. [6 marks] (d) Explain how you would use your equations to simulate a specific Turing machine by a register machine whose program encodes the quintuplet description. To what extent does this support Turing's Thesis? [Explicit program for a register machine is not required.] [8 marks] 8 Computer Graphics and Image Processing Describe an algorithm for performing scan conversion of a set of 3D polygons, including details of clipping, projection, and the underlying 2D polygon scan conversion algorithm. You may assume that you are given the colour of each polygon and that no lighting calculations are required. Please state any additional assumptions that you need to make. Ray tracing is not an acceptable answer to this question. [20 marks] 5 [TURN OVER CST.2004.3.6 9 Introduction to Security (a) Explain briefly mechanisms that software on a desktop computer can use to securely generate secret keys for use in cryptographic protocols. [5 marks] (b) Give two different ways of implementing residual information protection in an operating system and explain the threat addressed by each. [5 marks] (c) Consider the standard POSIX file-system access control mechanism: (i) Under which conditions can files and subdirectories be removed from a parent directory? [2 marks] (ii) Many Unix variants implement an extension known as the "sticky bit". What is its function? [2 marks] (iii) On a POSIX system that lacks support for the "sticky bit", how could you achieve an equivalent effect? [2 marks] (d) VerySafe Ltd offer two vaults with electronic locks. They open only after the correct decimal code has been entered. The VS100 - a low-cost civilian model - expects a 6-digit code. After all six digits have been entered, it will either open or will signal that the code was wrong and ask for another try. The VS110 - a far more expensive government version - expects a 40-digit code. Users of a beta-test version of the VS110 complained about the difficulty of entering such a long code correctly. The manufacturer therefore made a last-minute modification. After every five digits, the VS110 now either confirms that the code has been entered correctly so far, or it asks for the previous five digits again. Compare the security of the VS100 and VS110.
(a) Take an initially empty hash table with five slots, with hash function h(x) = x mod 5, and with collisions resolved by chaining. Draw a sketch of what happens when inserting the following sequence of keys into it: 35, 2, 18, 6, 3, 10, 8, 5.
(b) Repeat part (a) but with the following three changes: the hash table now has ten slots, the hash function is h(x) = x mod 10, and collisions are resolved by linear probing. (c) Imagine a hash table implementation where collisions are resolved by chaining but all the data stays within the slots of the original table. All entries not containing key-value pairs are marked with a Boolean flag and linked together into a free list.
(a) Explain how a parse tree representing an expression can (i) be converted into stack-oriented intermediate code and then (ii) be translated into simple machine code for a register-oriented architecture (e.g. ARM or IA32) on an instruction-by-instruction basis. Also indicate how this code might be improved to remove push-pop pairs introduced by (ii). Your answer need only consider expression forms encountered in the expression: h(a, g(b), c) * 3 + d [12 marksDefine, in a programming language documentation of your decision, a recursive drop parser that will develop the theoretical sentence structure tree for an info stream adjusting to the above grammar for orders. You might expect the presence of a capacity lex() that will yield a whole number addressing the following lexical token from the info stream, and the capacities mk2(op,x), mk3(op,x,y) and mk4(op,x,y,z) that will build theoretical sentence structure tree hubs with a given administrator and one, a few operands. You ought to expect that exponentiation is correct associativible and the order before repeatwhile ought to be the most limited conceivable.
Introduction To Federal Income Taxation In Canada
ISBN: 9781554965021
33rd Edition
Authors: Robert E. Beam, Stanley N. Laiken, James J. Barnett