Вы находитесь на странице: 1из 4
[CS 2842] UNIVERSITY OF MORATUWA FACULTY OF ENGINEERING DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING BSc

[CS 2842]

UNIVERSITY OF MORATUWA

FACULTY OF ENGINEERING

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

BSc Engineering Honours Degree Semester 2 Examination: 2010/2011

CS2842: COMPUTER SYSTEMS

Time allowed:

2 Hours

November 2011

ADDITIONAL MATERIAL: None

INSTRUCTIONS TO CANDIDATES:

1.

This paper consists of 4 questions in 4 pages.

2.

Answer all 4 questions.

3.

Start answering each of the 4 main questions on a new page.

4.

The maximum attainable mark for each question is given in brackets.

5.

This examination accounts for 60% of the module assessment.

6.

This is a closed book examination.

NB: It is an offence to be in possession of unauthorised material during the examination.

7.

Only calculators approved and labelled by the Faculty of Engineering are permitted.

8.

Assume reasonable values for any data not given in or with the examination paper. Clearly state such assumptions made on the script.

9.

In case of any doubt as to the interpretation of the wording of a question, make suitable assumptions and clearly state them on the script.

10.

This paper should be answered only in English.

Page 1 of 4

Continued…

 

[CS 2842]

Q1.

[25 marks]

 

a) Explain three representations used in computer systems for representing signed integers. List the range for each representation (when using 8 bits) and comment on the uniqueness of the

code for ‘0’ in each representation.

[9 marks]

b) Convert following binary numbers into octal and hexadecimal. Clearly show the steps you

followed.

[4 marks]

i. 1100 1100 1001

ii. 1100 1001 1011 1110

c) What is the Von Neumann Architecture?

[3 marks]

d) Volatility and latency are two main characteristics used to describe memory technologies.

i. Explain the two characteristics and their importance.

[2 marks]

ii. Compare the three memory technologies registers, RAM and Hard disk drives

using the above two characteristics.

[3 marks]

e) What is a memory controller? What is the purpose of a memory controller?

[4 marks]

Q2.

[25 marks]

 

a) Explain the structure of the CPU of a general purpose computer. List major logical entities, explain their responsibilities, and explain how these entities interact. You may use a diagram

to illustrate the interactions.

[10 marks]

b) Memory address register (MAR) and memory buffer register (MBR) are the two main

registers involved in memory read and write operations. Explain the major steps involved in memory read and write operations making reference to these registers and any other

important control signals.

[5 marks]

c) In describing the instruction set of a computer system, the operand addressing modes used by the instruction set is an important element. Explain five major operand addressing modes

used in computer systems.

[5 marks]

d) Explain five major differences between low-level programming languages and high-level

programming languages.

[5 marks]

Q3.

[25 marks]

 

a) Briefly explain the role of the operating system as a resource manager.

[3 marks]

b) Explain the major difference in the scheduling policy between the multi-programmed batch

systems and time sharing systems.

[2 marks]

c) What is a process with reference to the operating systems? Explain the major elements of a

process?

Page 2 of 4

[5 marks]

Continued…

[CS 2842]

d) Consider the following list of processes with specified arrival times and service times (shown in the following table).

Process

Arrival Time (s)

Service Time (s)

A

0

5

B

3

3

C

4

2

D

6

2

E

7

6

F

14

3

Show the execution timeline for each of the processes if they are executed in a uniprocessor system with the following scheduling algorithms. Wherever applicable, assume the time

quantum for scheduler is 1 second.

[8 marks]

i. First Come First Served

ii. Round Robin

iii. Shortest Remaining Time

iv. Shortest Process Next

e) Draw the process state transition diagram for an operating system which uses non- preemptive scheduling and has seven states (with two suspended states). [7 marks]

Q4.

[25 marks]

a) Write the assembly language code structure for the following code segment and explain how

that assembly code performs the expected operation.

[5 marks]

if (condition ) { then_part

}

else { else_part

}

next statement

b) Briefly explain the following concepts with reference to the I/O sub-systems in computer

systems.

[4 marks]

i.

Interrupt Driven I/O

ii.

Direct Memory Access (DMA)

c) Briefly explain the five steps associated in the interrupt handling of a general computer

[5 marks] memory management system

where (single level) paging is employed. Consider using a diagram to illustrate your answer. [3 marks]

system.

d) Briefly explain the address translation process in a virtual

Page 3 of 4

Continued…

e)

[CS 2842]

Consider a computer system that employs virtual memory system and has the following parameters.

- The memory is byte addressable.

- Virtual addresses are 16 bits wide.

- The 16 bits of the virtual address are divided into two parts with 10 bits to specify the page table entry and 6 bits for the offset.

- Physical addresses are 12 bits wide.

- The memory system does not employ a Translation Lookaside Buffer (TLB) or a caching mechanism.

Answer the following questions based on the above system.

i. What is the maximum possible page size?

[1 mark]

ii. If the maximum possible page size is used for pages, what is the number of frames available in the memory system? [1 mark]

iii. What are the two most commonly present control bits in a page table entry? Assuming there are no other control bits present in a page table entry, what is the minimum size of a page table entry? [2 marks]

iv. The contents of the following memory locations are provided. Page Table Base Register (or Root Page Table Pointer) for the current process is set to Ox800.

Assume page table entries use the most significant bits for the control bits. Calculate the physical address of the virtual address Ox0388. If the physical address cannot be calculated, explain why it cannot be calculated. Clearly show

the steps you followed.

[4 marks]

Physical Address

Content

Ox808

Ox88

Ox809

Ox98

Ox80A

OxA8

Ox80B

OxB8

Ox80C

OxC8

Ox80D

OxD8

Ox80E

OxE8

Ox80F

OxF8

:

:

Ox908

Ox98

Ox909

Ox99

Ox90A

Ox9A

Ox90B

Ox9B

Ox90C

Ox9C

Ox90D

Ox9D

Ox90E

Ox9E

Ox90F

Ox9F

:

:

OxA08

Ox08

OxA09

Ox09

OxA0A

Ox0A

OxA0B

Ox0B

OxA0C

Ox0C

OxA0D

Ox0D

OxA0E

Ox0E

OxA0F

Ox0F

:

:

OxB08

Ox8B

OxB09

Ox9B

OxB0A

OxAB

OxB0B

OxBB

OxB0C

OxCB

OxB0D

OxDB

OxB0E

OxEB

OxB0F

OxFB

--- End of the Paper ---

Page 4 of 4