Describe a mechanism that prevents routing-loops in Ethernet…
Question Answered step-by-step Describe a mechanism that prevents routing-loops in Ethernet… Describe a mechanism that prevents routing-loops in Ethernet networks. [4 marks] (d) (i) Describe and, with the aid of an example, illustrate the IP Time-To-Live (TTL) mechanism for minimising the impact of routing-loops. [2 marks] (ii) Assuming, in part (d)(i), a perfect implementation, describe a disadvantage of the approach including the symptoms that might be experienced in a network subject to this disadvantage, and a test that may identify the problem. [2 marks] (e) Explain the technical and architectural argument behind the decision in IPv6 to retain header TTL but not a header checksum. [2 marks] (f ) Explain why there is ambiguity about handling packets with TTL values of 1 and give a practical solution. [2 marks] 7 (TURN OVER) CST.2013.5.8 7 Concurrent and Distributed Systems (a) Deadlock is a classic problem in concurrent systems. (i) What are the four necessary conditions for deadlock? [4 marks] (ii) Deadlock is often explained using the Dining Philosopher’s Problem. In this pseudo-code, each fork is represented by a lock: Lock forks[] = new Lock[5]; // Code for each philosopher (i) while (true) { think(); lock(fork[i]); lock(fork[(i + 1) % 5]); eat(); unlock(fork[i]); unlock(fork[(i + 1) % 5]); } Partial ordering is a common deadlock prevention scheme. Describe modifications to the above code, changing only array indices, such that philosophers can be fed not only safely, but also deadlock-free, using a partial order. [4 marks] (b) Priority inversion can occur when threads of differing priorities synchronise on access to common resources – threads of greater priority may end up waiting on threads of lesser priority, leading to undesirable realtime properties. (i) Describe how this problem can be solved for mutexes using priority inheritance. [2 marks] (ii) Describe how priority inheritance would need to be modified to handle reader-writer locks. [2 marks] (iii) Priority inversion can also arise between two threads involved in process synchronisation – for example, when one thread uses a semaphore to signal completion of work. Why might implementing priority inversion be more difficult with process synchronisation than with mutual exclusion? [4 marks] (iv) What could we do to solve the problem in (b)(iii)? [4 marks] 8 CST.2013.5.9 8 Concurrent and Distributed Systems (a) The ACID properties are often used to define transactional semantics. (i) Define “atomicity” as used in the ACID context. [1 mark] (ii) Define “durability” as used in the ACID context. [1 mark] (b) Write-ahead logging is a commonly used scheme to accomplish transactional semantics when storing a database on a block storage device, such as a hard disk. (i) Under what circumstances, during write-ahead log recovery, can a transaction in the UNDO list be moved to the REDO list? [2 marks] (ii) Synchronously flushing commit records to disk is expensive. How can we safely reduce synchronous I/O operations on a high-throughput system without sacrificing ACID properties? [2 marks] (iii) Describe two performance changes that might arise from using your solution to part (b)(ii). [2 marks] (c) (i) Transaction records in a write-ahead logging scheme contain five fields: hTransactionID, ObjID, Operation, OldValue, NewValuei, but storing the complete old and new values can consume significant amounts of space. One strategy that might be employed, for reversible operations being applied to some data such as XOR by a constant, is to store only the constant arguments, rather than the full before and after data. What problems might occur as a result of this design choice? [4 marks] (ii) Write-ahead logging systems must know the actual on-disk sector size for the write-ahead log to behave correctly. An errant disk vendor decides to rebrand its 512-byte sector disks as 2K-sector disks, and adjusts the value reported back to the database system. How might this affect database integrity? [4 marks] (iii) Explain how a database vendor who is aware of the problem described in part (c)(ii) mitigate this problem in software, and what limitations might there be to this approach. [4 marks] 9 (TURN OVER) CST.2013.5.10 9 Concurrent and Distributed Systems Sun’s Network File System (NFS) is the standard distributed file system used with UNIX, and has gone through a progression of versions (2, 3, 4) that have gradually improved performance and semantics. (a) Remote procedure call (RPC) (i) Explain how Sun RPC handle byte order (endianness). [2 marks] (ii) This approach may result in unnecessary work. State when this occurs and how might this be avoided. [2 marks] (b) Network File System version 2 (NFSv2) and version 3 (NFSv3) (i) A key design premise for NFS was that the server be “stateless” with respect to the client. State what this means for distributed file locking in NFSv2 and NFSv3. [2 marks] (ii) Another key design premise for NFSv2 was the “idempotence” of RPCs; what does this mean? [2 marks] (iii) One key improvement in NFSv3 was the addition of the READDIRPLUS RPC. Explain why did this helps performance. [4It is proposed to store a large number of records on a disk using Larsen’s method so that any lookup can be done using only one disk transfer. All the records are of length 200 bytes and each contains a 20 byte key. The data is to be held on a single disk preformatted to contain 100,000,000 sectors each of size 4096 bytes. Reading multiple consecutive sectors is regarded as a single transfer. (a) Describe Larsen’s algorithm in detail and, for the records and disk specified above, state the disk block size, the signature size and the amount of main memory that you would choose to use. [10 marks] (b) Carefully estimate the maximum number of records that could reasonably be stored on the disk assuming the sizes you gave in part (a). [6 marks] (c) Discuss the advantages and disadvantages of different signature sizes. [4 marks]It is possible to design a single instruction computer (SIC). For example, the instruction Subtract and Branch on Negative is sufficiently powerful. This instruction takes the form “A,B,C,D”, meaning “Read A, Subtract B, Store in C, and Branch to D if negative”. If a branch is not required, the address D can be set to the next instruction in the sequence so that the next instruction will be executed regardless of whether the branch is taken or not. An assembler short form for this branchless instruction is simply “A,B,C”. (a) Write fully commented SIC assembler which implements the following pseudo code: a=1; b=1; for(i=1; RKImage transcription textPre-Statistics and Statistics Course Grades: We recorded the pre-statistics course grade (in percentage) andintroductory statistics course grade (in percentage) for 60 community college students. 8 IntroductoryStatistics Course Grade (percent) K Pre-statistics Course Grade (percent) Suppose a struggling … Show more… Show more Computer Science Engineering & Technology C++ Programming CHEM 13 Share QuestionEmailCopy link Comments (0)


