AAU Masters Entrance Exam Sample PDF
AAU Masters Entrance Exam Sample PDF
Full Name :
Grade Obtained :
Important Note
Answer neatly to all the questions on the space provided on the question paper Write short, and grammatically and logically correct sentences
Page - 1-
1.2. (1 pt) Which variable contains the size (ie. Number of elements) of the list?
1.4. (1 pt) What size (or type) are the variables a and p?
1.5. (3 pts) List the different addressing modes used in the code.
Page - 2-
1.6. (4 pts) Modify the code as little as possible so that it sorts in descending order.
Page - 3-
b. (6 pts) Write the algorithm of a function that inserts an element in a linked list of integers using FIFO.
Page - 4-
2. (8 pts) Design a detailed algorithm to sort a given data of integers into ascending order using a bubble sort algorithm. Write a function that implements this algorithm in a programming language of your choice.
Page - 5-
2. (3 pts) What is the relationship between abstract data types and classes?
3. (4 pts) Give three phases of your choice among the phases of the software development life cycle and give, for each phase, its role in the software development process. A maximum of one sentence is accepted for each phase.
Page - 6-
4. (4 pts) Choose one of the following topic (a, b or c) and explain very briefly. a. Waterfall, Spiral, and Prototyping models. For what type of development projects are each of these software development models used? b. Software metrics. Discuss size, complexity, and quality metrics. c. Structural and functional software testing methods. Discuss the various structural and functional testing techniques, which are commonly used in software development projects. Give chosen topic here (a, b or c): _______________
Page - 7-
Table Definitions
Player (Id, Name, Specialization, Country) Foreign key Country references History Played (Id, Match, Goals, Cards, Fouls, Offsites) Foreign key Id references Player, Match references Games Games (Match, Stadium, Date) Foreign key Stadium references Places Places (Stadium, Host) History (Country, Population, Worldcup, Won)
Page - 8-
Using the above information, write an SQL statement that performs the following: 1.1 (2 pts) Create a table with name Dangerous-Players and store Id, Name, Country, Match and Fouls for players who committed more than 3 fouls in a single game.
1.2 (3 pts) Display Match, Stadium, Date and Host for matches in which more than four goals are scored.
1.3 (3 pts) Display Name, Id and Country of a player who came from a country with good world cup history (won world cup at least ones) and who has never played in any game in this world cup (stayed on a reserve bench).
Page - 9-
2. (4 pts) Normalization is one of the important aspects of relational database design. Discuss the first two normal forms (1NF, 2NF). Elaborate your answer using Examples.
3. (3 pts) Concurrency is one of the major problem areas that the database designer has to deal with in the shared database environments. Describe very briefly any two of such concurrency problems and discuss methods used to overcome the problems.
Page - 10-
2) (3 pts) Describe the three process states and the functions involved in the transition of processes from one state to another. Use a diagram to demonstrate your answer.
3) (3 pts) Selection of the value of the quantum time in CPU scheduling is one important aspect of the algorithms. Discuss the problems associated with the selection of a very small quantum value and a very large one?
Page - 11-
4) (6 pts) Write a program that runs on UNIX (i.e. that uses UNIX system calls) and creates two processes. The first process should write PING, then the second should write PONG, then the first should write PING, then the second should write PONG, etc. indefinitely. You can use any communication and synchronization method available on UNIX and any programming language.
Page - 12-
2) (2 pts) Give at least two popular physical media used for computer networking. Compare briefly their characteristics for communication.
3) (2.5 pts) Explain briefly what Carrier Sense Multiple Access/ Collision Detection (CSMA/CD) is, where it is used and what are its two main concepts.
Page - 13-
4) (2.5 pts) Given a base IP address 195.201.121.0 and using the first three bits of the host address part of the IP address as a sub network prefix: a. What is the standard class of this IP address? _________________________________________________________________ b. What will be the subnet mask? _________________________________________________________________ c. What will be the number of usable subnets? _________________________________________________________________ d. What will be the number of unique host addresses supported in each subnet? _________________________________________________________________ e. What will be the first available IP address that can be assigned to a PC connected in the third usable subnet? _________________________________________________________________ 5) (5 pts) Write the letter of the descriptions under column B that best matches phrases under column A in the space provided. Answer Column A 1. Circuit Switching 2. DNS 3. Gateway 4. Routers 5. Fire Wall 6. FDM or TDM 7. RS-232 8. Cell Relay 9. 23B+D 10. ISP Column B A. Ensures that external communications confirm to the local network security policy. B. Responsible for assigning Internet addresses to users. C. Physical layer protocol of X.25. D. One of the ISDN channel services provided at a single interface. E. Packet switching technology that involves fixed length data unit. F. Converts numerical IP address in to readable text form. G. Allows several transmission sources to share a larger transmission capacity. H. Lines are dedicated for the duration of the connection. I. Make use of RIP to transfer data packets across multiple networks. J. Performs translation networks. between two dissimilar
Page - 14-
any two
2. Do you see advantages/drawbacks in liberalizing the telecom sector in the Ethiopian context? Justify your answer.
Page - 15-
3. List three major obstacles against the development of ICT in Ethiopia. Argument your answer.
4. It is nowadays very commonly said that there is convergence of information technologies and communication technologies. What does this statement mean? Give examples to justify your answers.
5. State and explain two ethical rules an IT professional must follow in Ethiopia.
Page - 16-
Important Note
Write your name only on this page. Writing your name on the other pages will automatically disqualify you from this exam.
Answer neatly to all the questions on the space provided on the question paper Write short, and grammatically and logically correct sentences
Page 1 of 14
2. (2 points) Give two major concepts that make the difference between RISC and CISC technologies and how these concepts contribute in improving the performance of the processor.
3. (1 point) Give the name of an existing processor that is built based on RISC technology.
Page 2 of 14
5. (2 Points) Give the name of the character encoding system that is most widely used for encoding of texts in most alphabets and scripts of the World. What are the differences between this system and the Latin character encoding system almost exclusively used, until recently, to encode texts in Latin characters? What are its advantages and its drawbacks? Answer very succinctly in the table. Name of the character encoding system Differences Advantages of the character encoding system Drawbacks of the character encoding system 6. (4 points) We would like to write a fragment of code of the virtual memory manager of an operating system in INTEL 8086 assembly language. The objective is to write a fragment of the assembly language code that calculates the physical (real) address corresponding to a given virtual address. Write this fragment of code knowing that: o The virtual address is in AX o The page size is 256 Bytes o The page table is in memory at the address PAGE_TABLE. Each entry of the page table occupies one byte and contains only the page frame number. o We consider that all pages of the virtual memory are always in the real memory (there is no page fault) o The result (real address) should be in BX o You should use the simplest and minimum number of instructions in order to minimize the execution time of this code o If there is a mnemonic of an instruction that you have forgotten use INST1, INST2, etc. and explain what this instruction does. This will be accepted only if an instruction that does exactly what you say exists in INTEL 8086. Explain how your program works and give your commented program. Explanation
Page 3 of 14
Program
Page 4 of 14
2. (8 points) Write a program segment to put N numbers into ascending order using a binary search tree. Assume that inorder traversal of the tree gives the numbers in ascending order. Write the code in your language of choice.
Page 5 of 14
c. (3 points) Explain the differences between testing a procedural program and an objectoriented program.
2. (5 points) To properly satisfy the basic goals of a system, a software requirements specification should have certain properties. What are the desirable properties that a good software requirements specification should have? Describe each of the properties.
3. (3 points) Explain the difference between validation and verification, which are important concepts in software quality.
Page 6 of 14
2. (3 points) Transaction recovery is one of the data protection mechanisms used in database systems. Describe transaction recovery and show how it is implemented.
Use the following information to answer subsequent questions Office of the African Union (AU) is planning to organize the second ordinary summit of heads of states of AU in July 2003. The summit will be held in Accra, Gahanna. MIS section of the organizing committee has formulated the following table structures of relational database to keep track of the event. Use this information to answer questions 3, 4 and 5. Country(CountryName, Population, CapitalCity) Primary key (CountryName) Hotel(HotelName, Capacity, NumberOfStars, PhoneNo) Primary key(HotelName) Session(SessionNo, Date, StartingTime, Agenda) Primary key(SessionNo) Page 7 of 14
Participant(Name, Fname, CountryName, HotelName) Primary key(Name, Fname) Foreign key HotelName references Hotel, CountryName references Country WillAttend( Name, Fname, SessionNo, WillSpeak) Primarykey(Name,Fname, SessionNo) Foreign key (Name,Fname) references Participant, SessionNo references Session 3. Answer the following questions Using the above information a) (2 points) Draw relational diagram of the above relational tables indicating their cardinalities.
b) (2 points) Assuming that all the other tables are created, write an SQL statement that creates the WillAttend Table above.
Page 8 of 14
c) (2 points) Write SQL statement that deletes all participants who will not speak and whose reservations are in 5 star hotels.
d) (2 Points) Write SQL statement that displays all participants who are scheduled to attend all the sessions.
Page 9 of 14
2) (6 points) Write a program in C programming language that runs on UNIX or Linux systems. The program requests 10 whole numbers from the user, finds the maximum of the ten numbers and the sum and displays both. The programs should have three processes. The first reads the input from the user. The second finds the maximum and displays it. The third calculates the sum and displays it. Note - For the communication and synchronization between the processes you can use: i. semaphores (you can use any commonly syntax for semaphores not necessarily found on UNIX/Linux) ii. signals iii. pipes iv. parent/child inheritance Proper comments are necessary.
Page 10 of 14
3) (2 points) Many client/server applications such as web servers create one thread to process the request of a client at the server side than creating a process for each client. Explain briefly why?
2. (3 points) Sub-networking is used to overcome congestion problems posed by a flat, two-level hierarchy, IP addressing scheme. However, there is a tradeoff between the number of subnets and the number of hosts per subnets. In the following table, you will be given the number of bits in the sub-network prefix of a class B IPv4 address. Fill the remaining part of the table with the appropriate values. Number of bits in the subnetwork prefix 7 8 9 Page 11 of 14 Subnet mask Number of usable subnets Number of usable host addresses per subnet
3. (3 points) Discuss media access control techniques in Ethernet and Token ring.
4. (3 points) The two major categories of WAN connections are packet switched and circuit switched. What are packet switching and circuit switching? Give examples for both.
5. (3 points) Multiplexing is used to make efficient use of high-speed communication lines. What are the two common forms of multiplexing? Discuss how they work.
Page 12 of 14
Part VII: General questions on ICT in Ethiopia and abroad (15 points total)
Instruction: Attempt will be accepted.
any one of the following three questions. If you attempt more than one none
1. Some years back, the Federal Government and many of the state of the United States of America sued Microsoft. What was the reason why they sued this company? Microsoft seems to have escaped the worst. Do you think the World has anything to lose or gain from this trials result? Argument your answer in about 10 lines (average handwriting).
Page 13 of 14
2. What is E-commerce? Do you think it has a great future in the World in general and in Ethiopia in particular. What are the technical issues that have to be considered if we want to see the development of E-commerce in Ethiopia. Argument your answer in about 10 lines (average handwriting).
3. In Ethiopia, nowadays, computer applications are becoming necessity in businesses and office environments. However, there are many problems associated with the use of local languages in computing. What are the situations in using local languages like Amharic, Afan Oromo, Tigrigna, etc. in computing environment? Give specific examples of the problems and their impact. Suggest solutions on how we can overcome such problems. Present your answer in about 10 lines (average handwriting).
Page 14 of 14
Full Name :
Grade Obtained :
Important Note
Write your name only on this page. Writing your name on the other pages will automatically disqualify you from this exam. Check that you have 16 different pages (including this cover page). Any person found cheating will automatically fail the entrance exam Use the back of your question papers as rough papers. If you have used all the backs of your papers you can request for rough papers. Using other non authorized papers will be considered as cheating.
Answer neatly to all the questions on the space provided on the question paper Write short, and grammatically and logically correct sentences
Page - 1-
2. (One point) What is Microprogramming? What are the advantages and drawbacks of microprogramming compared to hardwired programming?
3. (One point) Explain briefly how the buses are used for the communication between several components of a computer (Example: CPU and memory)
Page - 2-
4. (4 points) Write two assembly language subroutines for 8086 architecture that will respectively encrypt and decrypt data located at memory address $2004 using the famous Cesars encryption algorithm. Cesars encryption algorithm consists of shifting every letter two positions to the right in the alphabet. For decryption, the encrypted letter will be shifted by two positions to the left in order to obtain the original letter. For the special cases of y and z, they will be encrypted as a and b respectively. For example: a will be encrypted to c, b to dz to b etc. Therefore, the word hi will be encrypted as jk.
Page - 3-
b. Write a recursive function that computes the greatest common divisor (GCD) of two positive integers.[5 points]
2. a. Write a function that accepts a positive integer and displays the digits of the number in reverse order.[3 points]
Page - 4-
Page - 5-
b. Though the idea of Formal Specification to software is novel, it is not widely used in the software industry. Describe the reasons behind this. (2 pts.)
b. Compare and contrast function-oriented and object-oriented design methods. (maximum of four lines for each design method). (3 pts.)
Page - 6-
c. What are the three most important design goals during the design of an interactive system which is to be used by non-computer literate users? (2 pts.)
(2 pts.)
(2 pts.)
Page - 7-
2. (2 points) Explain what is a view in relational databases and for what purpose it is used?
3. (2 points) How can a Database administrator manage the security of the database using SQL commands?
4. A computer dealer maintains the database of all types of computers and peripherals that he sells to customers. The following are the database schema and consists of four tables. Product (manufacturer, model, type) PC (model, speed, ram, hard-disk, removable-disk, price) Laptop (model, speed, ram, hard-disk, screen, price) Printer (model, color, type, price)
Page - 8-
The Product table gives the manufacturer, model number and type (PC, Laptop, or Printer) of various products. Assume that model numbers are unique over all manufacturers and product types. The PC table gives for each model number that is a PC the speed (of the processor, in megahertz), the amount of RAM (in megabytes), the size of the hard disk (in gigabytes), the speed and type of the removable disk (CD or DVD), and the price. The Laptop table is similar, except that the screen size (in inches) is recorded in place of information about the removable disk. The Printer table records for each printer model whether the printer produces color output (true, if so), the process type (laser, ink-jet, or bubble), and the price. Using the above information answer the queries below: i) (1 point) Write an SQL statement that give the manufacturer and speed of Laptops with hard disk of at least thirty giga bytes.
ii) (2.5 points) Write an SQL statement that finds the manufacturer of the color printer with the lowest price.
iii) (1.5 points) Write an SQL statement that find, for each different speed the average price of a PC.
Page - 9-
5. (3 points) A database is being constructed to keep track of the teams and games of EURO 2004. A team has a number of players. It is desired to keep track of the players participating in each game for each team that they played in a game and the result of the game. Design an ER-schema diagram for this application. Stating any assumptions you make.
Page - 10-
2. (2 points) How can processes communicate in a distributed system where there is no shared memory?
3. (4 points total) In modern operating systems, we can run programs with huge memory requirements even on computers with small amounts of RAM. i) What techniques make this possible?
4. (3 points total) Suppose a brand new kind of printer is invented this week. Even though this printer didnt exist when Windows 98 was released, we may still be able to configure a computer running Windows 98 so that it can print documents to this printer. i) What change, if any, would you have to make to the system to allow it to print to this new printer?
ii) Explain how the operating system has been designed to run independently of device-specific details.
5. (2 points) You have probably had the experience of trying to read a file from a floppy disk and having the operating system tell you that the diskette is unreadable. What do you think is the most common reason for this failure?
Page - 11-
2. (2 points) Explain what Ethernet is? How it solves the collision problem?
3. (4 points) Explain the difference between a connection-oriented network service and a connectionless service. Give an example of an application for which a connection-oriented service makes more sense, and an example of an application for which a connectionless service makes more sense. In both cases, briefly explain why.
Page - 12-
A
111.222.111.222 B3-E4-88-03-A1-DB
111.222.111.221 56-82-4F-3D-90-66
222.111.222.112 9A-02-33-7C-DD-42
Router
E
222.111.222.111 45-3D-C9-30-D2-86
i) (2 points) Write down an IP address for each interface at all hosts and routers in the network. The IP addresses for A and E are as given. You should assign IP addresses so that interfaces on the same network have the same network-part of their IP address. Indicate the number of bits in the network-part of this address.
ii) (2 points) How do A, E and the router determine the IP addresses needed for an IP datagram moving from A to E?
Page - 13-
Part VII: General questions on ICT in Ethiopia and abroad (20 points total)
any two of the following five questions within the available spaces. If you attempt more than two all of them will be discarded.
Instruction: Attempt Each question is given 10 points as long as you follow the above instructions. The following will be considered for the grade: Quality of language, Writing skills, Correctness and Quality of arguments and Neatness. Your answers should have about 20 lines (average handwriting size). 1) What are Open Source Software (OSS) and proprietary software? Give two examples of OSS and two examples of proprietary software. What are the main differences between the two? Do you think OSS is good for Ethiopia? Explain. 2) Ethiopian audio-visual artists won a major battle this year? What is it? Do you think it has any relevance for Information and Communication Technology professionals? Explain. 3) Spams are becoming a major problem for internet users. Describe what spams are, what are the problems they cause and what solutions exist for individuals. Propose ideas on how spams can be eliminated (or at least highly limited) from the Internet in the future. 4) Describe the Weredanet and the SchoolNet project of the Ethiopian Government. What are the opportunities and the challenges ahead? 5) Microsoft is going to develop an Amharic version of Windows XP and Microsoft Office. There is already an Amharic version of Linux. Do you think that this evolution is very important for Ethiopia? Explain. Answer in the following pages.
Page - 14-
First chosen question (write just the number): _________ Answer below
Page - 15-
Second chosen question (write just the number): _________ Answer below
Page - 16-
Name: _______________________________________________
Instructions 1. 2. Read the instructions and the questions carefully. Write your name only on this page. Writing your name on the other pages will automatically disqualify you from this exam. 3. Answer all questions eligibly on the spaces provided on the question papers. Please make sure that sentences are short, grammatically and logically correct. You can use the back side of each paper when space is not sufficient. In such a case, please indicate so. 4. This examination booklet consists of 10 pages (excluding this cover page). Make sure that the question papers are numbered consecutively and that no question papers are missing or replicated. 5. Cheating is strictly prohibited. Any person found cheating will be automatically disqualified from this exam. 6. Use only the rough papers provided. Using other unauthorized papers will be considered as cheating.
For Office Use Only Part I (35) Part II (25) Part III (20) Part IV (20) Total (100)
Part
Marks
2.
Page -1-
3.
b.
Explain array representation of a binary tree. Illustrate your answer by an example. (4 pts)
c.
What are binary tree traversals? Give their recursive algorithms. (6 pts)
Page -2-
4.
For each of the following three multiple choice questions, circle the letter of the correct answer. (1 pt each) i. Which of the following is true about structured programming or structured problem solving? a. b. c. d. The problem is divided into a set of time dependent/sequential statements that determine which part is executed how many times and how long. The problem is divided into a set of functionally independent units. The language gives emphasis to data structures needed in solving the given problem. All except c.
ii. Which of the following is true about recursive problem solving? a. b. c. d. The problem will have a known solution if each iteration (calling) leads the problem to a case where we know how to solve. Even if the solution is inefficient because of performance and storage reasons, it is recommended as it increases the readability of the program than the iterative counter part. It is recommended as it is not possible to solve some problems iteratively. All of the above.
iii. In Ethiopia, every citizen is called with his/her name rather than his/her family's name as is the case in most other countries. It is possible that the name of a person, say, "XYZ" to be the same as the name of his/her grandfather. In a gathering where only children exist, the name XYZ is meant to refer to the child rather than the grandfather. Which of the following scope rule represents the above hypothesis? a. b. c. d. 5. XYZ is a global name, it is used equally everywhere without ambiguity. XYZ is a Local name. XYZ can be both global and local. When it is used in the local context, it is given priority. None of the above.
In modular programming, functions communicate through parameters (arguments). Parameter passing by value is recommended to improve the performance of a system than using parameter passing by reference. Why? (3 pts)
Page -3-
6.
In enterprise applications development, securing data from disclosure to unauthorized users is one of the challenges. One means of tackling the challenge is to encrypt before sending and decrypting at the receiving end with the same key. Write two functions Encrypt and Decrypt that accept a string and a key so as to encrypt and decrypt the text. The encryption algorithm adds 1 to the ASCII value of each character and subtracts one from the ASCII value of each character for decryption. (8 pts) Hint: if one wants to send Hello, it is Ifoop that is sent and when decrypted it will be Hello.
Page -4-
2.
What distinguishes a good page replacement algorithm from a bad page replacement algorithm? (3 pts)
3.
In general terms, give two different ways of solving the problem of deadlock. (2 pts)
4.
When a UNIX process forks a child process, name one thing the parent and child processes have in common, and two things the parent and child processes dont have in common. (3 pts)
5.
Give two advantages of RAM over hard disk, and two advantages of hard disk over RAM. (2 pts)
Page -5-
6.
What is the basic advantage of using interrupt-initiated data transfer over transfer under program control without an interrupt? (4 pts)
7.
The purpose of the communication link is to resolve the differences that exist between the central computer and each peripheral. List any two such differences. (4 pts)
8.
Compare and contrast physical segments and logical segments in Memory Address Space (MAS). (4 pts)
Page -6-
2.
The Ethiopian Athletics Federation wants to keep track of the records of Ethiopian athletes who are taking part in International competitions. To this effect, the following relations are identified: Athlet_Info(AID, FName, SName, BirthDate), where AID refers to the ID of an athlete, Comptetion_Info(CID, AID, Cdescription, PlaceHeld, DateHeld, TimeToFinsih, Distance), where CID refers to an ID of a competition, and RecordHolder_Info(AID, CID ) Entries in the first two tables are mandatory, whereas entries in the third table may or may not exist for an athlete as it depends on whether an athlete has won a competition with a new record or not. Based on the above information answer the following questions: a. Write a DDL statement to create the table named RecordHolder_Info. (3 pts)
b.
Are all the above relations in 2NF? Justify your answer. (3 pts)
Page -7-
c.
Write an SQL statement that computes the total number of records held by an athlete. (2 pts)
d.
Write an SQL statement that finds the best time of an athlete on a specific distance out of the competitions that he/she has taken part. (3 pts)
e.
Write an SQL statement that returns a query output containing list of names of athletes who took part in the competitions held in Boston, USA. (2 pts)
3.
Explain what new or emerging class(es) of applications that RDBMSs have failed to cope with or manage. (3 pts)
Page -8-
2.
Consider two LANs, one based on the Ethernet protocol (i.e., IEEE 802.3) standard and the other one based on the Token Ring protocol (i.e., IEEE 802.5) standard. a. What is the biggest conceptual difference between the two LANs when it comes to handling collisions? (3 pts)
b.
Suppose all stations connected to both LANs have information to transmit. Which of the two LANs is the most fair? Motivate your answer. (3 pts)
Page -9-
3.
Distinguish between packet switching and circuit switching. Which one is the most appropriate method for computer networking? Why? (4 pts)
4.
Distinguish between physical (MAC) address and IP address. At which layers of the OSI reference model is each used? (3 pts)
Page -10-
Name: _______________________________________________
Instructions 1. 2. Read the instructions and the questions carefully. Write your name only on this page. Writing your name on the other pages will automatically disqualify you from this exam. 3. Answer all questions eligibly on the spaces provided on the question papers. Please make sure that sentences are short, grammatically and logically correct. You can use the back side of each paper when space is not sufficient. In such a case, please indicate so. 4. This examination booklet consists of 11 pages (excluding this cover page). Make sure that the question papers are numbered consecutively and that no question papers are missing or replicated. 5. Cheating is strictly prohibited. Any person found cheating will be automatically disqualified from the exam. 6. 7. 8. Use only the rough papers provided. Using other unauthorized papers will be considered as cheating. Switch off your mobile phones. You are not allowed to use a mobile for any purpose. You are not allowed to use calculators or any other electronic device.
For Office Use Only Part I (35) Part II (25) Part III (20) Part IV (20) Total (100)
Part
Marks
1.2 a.
(2 points)
b.
(2 Points)
Page -1-
1.3 Write a pseudo code for a function file_copy that copies the content of one file to a new file. The function takes one argument, original_file, which is the path to the file to be copied and returns the name of the new file. If an error occurred, NULL should be returned. The function will have the following signature: function file_copy (original_file : string) : copy_file : string (7 points) To write the function, use the following built-in pseudo functions for file manipulation: fopen( file_path : string, mode : char ) : integer opens the file whose path is passed to it as an argument and returns a file handle and sets the read pointer at the first byte of the file. On error, it returns -1. mode indicates the mode in which the file is opened and it can take one of the following values: r, w which stand for read and write, respectively. fclose(file_handle : integer ) closes the file whose file handle is passed to it as an argument. On error, it returns -1. fread( file_handle : integer ) : ByteStream reads up to 1 KB of stream of bytes starting from the current position of the read pointer. On error, it returns -1. fwrite( file_handle: integer, data: ByteStream) : integer writes up to 1 KB of stream of bytes to the file whose handle is passed as an argument at the current end of file. On error, it returns -1. eof( file_handle : integer ) : boolean returns TRUE if end of file is encountered, otherwise returns FALSE.
Page -2-
Page -3-
1.4 Consider the following binary search tree: If the root node, 50, is deleted, which node will become the new root? (4 points)
Answer: __________________________ 1.5. Given the sorting algorithm represented in the following pseudo code, attempt the questions that follow. Assume A has n elements, where the first index is 1 and the last index is n. 1: for i n-1downto 1 2: begin 3: sorted TRUE 4: for j 1 to i 5: begin 6: if A[j] < A[j + 1] then 7: SWAP(A[j],A[j + 1]) 8: sorted FALSE 9: end 10: if sorted then return 11: end a. What is the best case for this algorithm? What is the best case computing time in big O notation? (3 points)
b.
What is the worst case and corresponding computing time for this algorithm?
(3 points)
c.
What is the name of the sorting algorithm represented with the above pseudo code?
(3 points)
Page -4-
1.6 Consider a linked list with data values sorted in descending order. The following is given as a sample. First 20 15 9 5 3 (5 points)
Write an algorithm that inserts an element in the appropriate position. Your algorithm must handle all the special cases. Make your writing clear; otherwise marks will be deducted.
Page -5-
2.2 Explain why a cache memory, in addition to RAM (or primary memory), is needed in computer systems. (2 points)
2.3 In process swapping, write briefly how important process relocation is.
(3 1/2 points)
2.4 Give two possible methods that are used to reduce disk access time.
(2 points)
2.5 Consider the Intel 8086/8088 microprocessor architecture to answer the following questions: (3 points) a. What is the name of the unit responsible for getting the instructions from memory and loading it in the Instruction Queue for execution? _____________________________________________________ b. What type of addressing mode represents the instruction MOV CL, [BX][DI]+8 ? ______________________________________________________ c. If CS = 24F6 and IP = 634A, the physical address is ____________________________________.
Page -6-
2.6 For each of the following questions, circle the letter of the correct answer. i. time, rotational latency, and transfer time. Rotational latency refers to a. b. c. d. the time it takes for the platter to make a full rotation.
(1 point each)
The amount of time required to read a block of data from a disk into memory is composed of seek
the time it takes for the read-write head to move into position over the appropriate track. the time it takes for the platter to rotate the correct sector under the head. none of the above.
ii. Interrupts can be generated in response to a. b. c. d. e. f. detected program errors such as arithmetic overflow or division by zero. detected hardware faults. Input/Output activities. internal timers. all of the above. all except a. (2 point)
2.7 If a magnetic disk has 100 cylinders, each containing 10 tracks of 10 sectors, and each sector can contain 128 bytes, what is the maximum capacity of the disk in bytes? _______________________
2.8 The computer system bus is made up of three independent bus types. What are they?
(3 points)
2.9
A computers memory is composed of 8K words of 32 bits each. How many bits are required for memory address if the smallest addressable memory unit is a word? _____________________ (2 point)
2.10 Whose responsibilities are the following tasks to the instructions of the computer system? ((a)Execution Unit or (b)Bus Interface Unit); Write a or b on the spaces provided: Fetching: Pre-fetching: Decoding: Execution: __________________ __________________ __________________ __________________ (1/2 point each)
Page -7-
b.
Give the foreign keys in Order and the relevant referential integrity constraints.
(2 points)
c.
Write an SQL query for each of the following: i. In how many cities does the company have customers? (2 points)
ii. List the details of customers whose name contains the string Wolde.
(2 points)
Page -8-
iii. Cars with price greater than Birr 280,000 are luxury cars. List the customer number, name and address of customers who have ordered more than one luxury car. (3 points)
iv. List the name and position of staff members who have only sold cars to customers living in the cities Addis Ababa or Mekelle. (3 points)
(2 points)
3.3 Discuss the various reasons that lead to the occurrence of null values in relations?
(2 points)
3.4 What is a data dictionary? Use an example to explain the type of information that is kept in the data dictionary. (2 points)
Page -9-
4.2 For each of the following questions, circle the letter of the correct answer. i. Which of the following is a deterministic medium access control protocol? a. c. ALOHA/Slotted ALOHA CSMA b. d. Token passing CSMA/CD
(1 point each)
ii. In a data communication network, a sender has a sliding window of size 15 and the first 15 packets have been sent. The first ACK received by the sender was ACK 5, which frame(s) has the receiver received? a. Frame 5 b. Frame 4 c. Frame 0 to 2 d. Frame 0 to 4
iii. A transport-layer address is called a. c. MAC address IP address b. d. Port number None of the above
4.3 Consider the TCP/IP model. Write the name of the layer that is responsible for each of the following tasks. (1 point each) a. b. c. d. e. Process-to-process data delivery. ___________________________________________ Provides user services such as e-mail and file transfer. __________________________ Mechanical, electrical, and functional interface. _______________________________ Responsible for delivery between adjacent nodes. ______________________________ Responsible for choosing routes for packets. __________________________________
Page -10-
4.4 What is the difference between error detection and error correction? Which method has a higher overhead? (3 points)
4.5 Consider the two transport layer protocols, TCP and UDP. Which protocol is the most appropriate for each of the following two applications? Justify your answers. a. Money transfer (4 points)
b.
Multimedia
4.6 Give one major reason why standardization is required in computer networking.
(2 points)
Page -11-