Question
227 (TURN OVER) CST.20126.3.6 5 Concepts in Programming Languages (a) Explain what is meant by a monad in a programming language, giving the two fundamental
227 (TURN OVER) CST.20126.3.6 5 Concepts in Programming Languages (a) Explain what is meant by a monad in a programming language, giving the two fundamental operations of a monad along with their types. [33 marks] (b) Consider the use of a monad for input-output. For the purposes of this question, take the Add one to the LLRN and set the library reference number to the value Add the publication object's address to the end of the PPA and add one to the NOLP. Define a category that could be able to representing easy related lists, where each list-node includes a string. You ought to show the way to traverse such lists, build them and how to opposite a listing. In the case of the listing reversing code please provide versions, one in all which creates the reversed listing by means of converting guidelines inside the input list, and some other which leaves the authentic listing undamaged and allocates sparkling space for the reversed version. [8 marks] (c) Cause a line to appear in the window of an applet running from the lowest left of the window in the direction of the pinnacle right. Your line should stay seen if the person obscures after which re-shows the window, but you may assume that the size of the windows concerned may be fixed at 100 by 100 devices. [6 marks] 5 [TURN OVER CST.98.1.6 SECTION E 11 Operating Systems As nicely as storage and retrieval of facts, the capabilities of a submitting machine consist of: naming and call resolution get right of entry to manage lifestyles manipulate concurrency manage For every of the above (a) Briefly outline the function. [1 mark each] (b) Discuss how, and wherein submitting system factor, the feature may be furnished. Use examples from one or extra real operating systems to illustrate your solution. [4 marks each] 6 CST.Ninety eight.1.7 12 Operating Systems What is supposed with the aid of the term demand paging in a virtual memory control system, and how is it implemented? [5 marks] List 5 strategies which the running gadget can use to enhance the efficiency of demand paging. [5 marks] Suppose the page desk for the currently executing manner is as follows. All values are decimal, and indexes are numbered from zero. Addresses are reminiscence byte addresses. The page offset is 10 bits. Virtual Page # Valid bit Reference bit Modify bit Page Frame # 0 1 1 zero four 1 1 1 1 7 2 0 zero 0 - three 1 zero zero 2 4 zero zero zero - 5 1 0 2 1 zero Describe precisely how, in general, a virtual deal with generated through the CPU is translated right into a bodily cope with, with the useful resource of a diagram. [24 marks] To what physical deal with (if any) would the subsequent digital addresses correspond? (a) 13052 (b3) 22321 (c) 54399 [6 marks]
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started