1 Implementation of Company K’s Corporate Network IP addresses are expressed as 32 bits of data to uniquely specify a host connected to the network.. Therefore, after the IP address exp
Trang 1MINISTRY OF SCIENCE AND TECHNOLOGY
HOÀ L C HIGH TECH PARK
MANAGEMENT BOARD
VIETNAM IT EXAMINATION AND
TRAINING SUPPORT CENTER (VITEC)
SOFTWARE DESIGN AND DEVELOPMENT
ENGINEER EXAMINATION
26 th January 2003
Afternoon I
Do not open the exam booklet until
instructed to do so
Inquiries about the exam questions
will not be answered.
B KHOA H C VÀ CÔNG NGH
BAN QU N LÝ KHU CÔNG NGH CAO HOÀ L C
TRUNG TÂM SÁT H CH CÔNG NGH THÔNG TIN VÀ H TR ÀO T O (VITEC)
SÁT H CH
K S THI T K VÀ PHÁT TRI N
Trang 23 After the test, you may take this question booklet home with you
Do not open the exam booklet until instructed to do so
Inquiries about the exam questions will not be answered
Trang 33 Cu i gi thi, b n có th gi l i b đ thi này
Không m t p gi y thi ch ng nào ch a đ c h ng d n làm nh v y M i vi c h i thêm v các câu h i sát h ch s không đ c tr l i
Trang 53 Cu i gi thi, b n có th gi l i b đ thi này
Không m t p gi y thi ch ng nào ch a đ c h ng d n làm nh v y M i vi c h i thêm v các câu h i sát h ch s không đ c tr l i
Trang 7(3) Write each answer in the space specified for that question
(4) Write your answers clearly and neatly Answers that are difficult to read will receive a lower score
3 After the test, you may take this question booklet home with you
Do not open the exam booklet until instructed to do so
Inquiries about the exam questions will not be answered
Trang 82
Trang 9Q1 Read the following text regarding IP address assignments in a corporate network
implementation, then answer Sub-Questions 1 through 3
Company K has decided to implement a corporate network based on IP (Internet Protocol Version 4) As shown in Figure 1, this network consists of a total of five LANs, of which one is a main office LAN and four are branch office LANs The LANs are connected to each other using leased lines via routers The maximum number of connected hosts (devices, including routers, that perform communication are called hosts) is 50 for the main office LAN, and 20 for each branch office LAN
Branch office LAN 3 (20 hosts)
Branch office LAN 4 (20 hosts)
Branch office LAN 2 (20 hosts) Branch office
LAN 1 (20 hosts)
M ain office LAN (50 hosts)
Fig 1 Implementation of Company K’s Corporate Network
IP addresses are expressed as 32 bits of data to uniquely specify a host connected to the network As shown in Figure 2, an IP address consists of a network part and a host part The host part is further divided between a subnet ID and a host ID for purposes such as effective use of addresses The network ID in the network part, together with the subnet ID
of the host part, are also called a subnet address
IP address (32 bits) Network part
Trang 10In this case, a subnet address identifies a LAN, and a host ID identifies an individual host
in that LAN One network ID is assigned to Company K’s entire network comprising the five LANs In addition, one subnet ID is assigned to each LAN, and one unique host ID is assigned to each host within each LAN
It should be noted that it is not necessary to assign subnet addresses to the leased line parts between the LANs
The IP address notation method employed involves expressing every eight bits as values in decimal notation, and delimiting these values with periods (“.”) In this case, a 24-bit network ID, consisting of “223.x.255” (where x is a certain decimal number), is assigned
to the Company K network using this notation method The remaining 8-bit host part is assigned a subnet ID and host ID as appropriate to complete the subnet address assignment for each LAN
In order to express a subnet address, it is necessary to indicate the number of bits it has Therefore, after the IP address expression in which the host ID is “0”, a forward slash (“/”)
is used as a delimiter and the number of bits in the subnet address is expressed as a decimal number For example, it may be expressed as “223.x.255.16/28”
Any bit pattern other than all zeroes or all ones may be used as the host ID specifying a host Likewise, any bit pattern other than all zeroes or all ones may be used as the subnet
ID The router to be used is a model with the functions required for this problem
it is sent to the next appropriate b
4
Trang 11Sub-Question 2
In assigning a subnet address, first the subnet ID was considered as having a fixed length (the same number of bits for all LANs) What are the appropriate integers to insert in blanks c and d in the paragraph below?
In Company K’s case, there are five LANs, so the subnet IDs must have a minimum of
c bits Therefore, given the number of bits that can be used in the host IDs, the maximum number of host IDs for which IP addresses can be assigned in each LAN is
Sub-Question 3
With the method in Sub-Question 2, it is not possible to assign IP addresses to all of the hosts in the main office LAN, so the method which was adopted assigns subnet IDs that have different numbers of bits in each LAN What are the appropriate integers to insert in blanks e through m in the paragraph and table below?
Based on the number of hosts requiring IP address assignments, the host IDs for the main office LAN must have a minimum of e bits Likewise, the host IDs for the branch office LANs must have a minimum of f bits
Subnet addresses were assigned to each LAN, taking care to maintain the uniqueness of the
IP addresses The results of these assignments are shown in the table below In this case, the smallest possible subnet address was assigned to the main office LAN
Table Subnet Addresses in Company K’s LANs
Main office LAN 223 x 255 g / h
Trang 12Q2 Read the following text regarding the evaluation of the number of bugs during system
development, then answer Sub-Questions 1 through 4
Mr U, who is a quality control manager at Company T, a software developer, has checked the average number of bugs per 1,000 lines of code in 30 past system development projects
in order to estimate the number of bugs that will occur in the future The mean value of bugs per 1,000 lines of code was 5.1; variance was 2.8; and standard deviation was 1.7 In this case, the number of bugs is the number of bugs discovered in a system test A histogram of the number of bugs is presented in Figure 1 On the horizontal axis, “1–2” denotes the number of cases in which the number of bugs was 1 or more but less than 2
Sub-Question 2
Assuming the occurrence of bugs has a normal distribution following the above parameters, which of the following is the most appropriate description of the probability that the number of bugs per 1,000 lines of code would be equal to or greater than a given value? Select one answer only
a) The probability that the number of bugs will be seven or more is approximately 15% b) The probability that the number of bugs will be seven or more is approximately 30% c) The probability that the number of bugs will be eight or more is approximately 15% d) The probability that the number of bugs will be eight or more is approximately 30%
Trang 13Sub-Question 3
Next, Mr U expressed the relationship between system sizes and the number of bugs per 1,000 lines of code for the past 30 projects in the form of a scatter plot The results are shown in Figure 2 Based on this information, Mr U decided that the following relationship exists between the number of bugs and system size
Number of bugs per 1,000 lines of code = 3.4 + 0.05 × system size (unit: 1,000 lines of code)
0 2 4 6 8 10
Fig 2 Scatter Plot of System Size and Number of Bugs
Using this relation expression, determine the total number of bugs expected in a system with a size of 60,000 lines of code Give your answer as an integer value, counting fractions of 5 and over as a unit and cutting away the rest
Sub-Question 4
What are the appropriate words to insert in blanks a through g in the following paragraph? Select the appropriate words from the set of answers which follows the paragraph
Sub-Question 1 and Sub-Question 3 both estimate the number of bugs based on actual data from 30 past projects The result in Sub-Question 1 ignored a , while the result in Sub-Question 3 did not The relation expression in Sub-Question 3 is called a recursive expression Methods such as the b method are used to calculate the answer of this expression In this recursive expression, the coefficient of system size (unit: 1,000 lines of code) is positive This means that as a increases, the number of bugs per 1,000 lines of code c Based on the information in Figure 2, it is reasonable to think that the number of bugs per 1,000 lines of code is affected by a , and it seems more appropriate to use the result of Sub-Question d
In addition, in this type of statistical analysis, it is important to assess the overall trend while simultaneously investigating the causes related to cases (outlier values) that exhibit
Trang 14characteristics differing considerably from other cases For example, in cases where the number of bugs is considerably greater than the estimated value at the end of the test, there may have been problems such as complex system functions and configuration, or insufficient e Conversely, in cases where the number of bugs is quite low, it could be that program quality is extremely high, or it could be that f is insufficient, so caution is needed
In addition, it is known heuristically that the cumulative bug count curve plotted against test progress is a unique curve in many cases For this reason, there are methods whereby a cumulative bug count curve is prepared and compared against a curve derived using, for example, a g model, in order to assess test progress
Answer set:
c) Moving average d) Decreases
e) Computer processing capability f) Gompertz
g) Least squares h) System size
i) System particularity j) System complexity
k) Increases l) Test
m) Program developers’ capability n) Poisson
o) Runge-Kutta
8
Trang 15Q3 Read the following text regarding a VPN, then answer Sub-Questions 1 through 4
A VPN (Virtual Private Network) is one method for conducting secure communication between two sites A and B Figure 1 shows a system configuration for conducting communication using IP through VPN units A and B Assume that the information required for communication between VPN units A and B, such as encryption keys and routing information, has been set appropriately in advance
VPN Unit A Host A
Fig 1 System Configuration Diagram
When a VPN unit in Figure 1 receives an IP packet addressed to a site conducting VPN communication from a host inside its own site, it performs the following transformation, then sends the packet to the VPN unit of the remote site
(1) It encrypts the entire received IP packet using a secret key cryptosystem
(2) It adds, to the encrypted packet, an IP header, which is addressed from itself to the VPN unit at the remote site
(3) It calculates the hash function value from the IP header and the entire encrypted packet, then sets it in the packet as authentication data
Figure 2 shows the configuration of the transmitted packet after this transformation
Fig 2 Transmitted Packet
Trang 16Sub-Question 1
Answer the following questions regarding VPN unit packet transformation
(1) What does packet encryption serve to prevent, in terms of security? Answer in 10 words or less
(2) What does adding a hash function value to the packet prevent, in terms of security? Answer in 10 words or less
Sub-Question 2
When a packet is sent from host A to host B using a VPN, what sender’s address and receiver’s address appear in the IP header for each interval shown in the table below? Provide the appropriate words to enter in blanks a through d in the table
Table Sender’s Address and Receiver’s Address in Each Interval Interval Sender’s address Receiver’s address Host A → VPN unit A Host A a
Trang 17Sub-Question 3
Which of the following describe characteristics of the method for establishing a VPN as presented in the problem text? Select all answers that are applicable
a) Applications that use a VPN must link special libraries
b) In order to use a VPN, it is necessary to connect leased lines between the sites
c) Secure communication can be achieved even using a frame relay network or telephone network over the public communication network
d) Even if the method for communication between sites is changed from a method which does not use VPN to a method which does use VPN, it is not necessary to make application changes
e) The method is a method for establishing a VPN wherein tunneling is performed in the data link layer (Layer 2)
f) A VPN can only be used by specific applications
Sub-Question 4
In order to prevent the exposure of host addresses in sites A and B to the Internet, it was decided that routers A and B would be provided with a NAT function, whereby they would translate specific internal addresses in the IP packets into addresses on the Internet side Furthermore, it was decided that addresses would be exposed to the Internet for VPN units
A and B only However, VPN communication between sites A and B stopped working due
to the introduction of the NAT function Enter the appropriate words in blanks e
through g in the following description of the reasons for this problem Give each answer in 20 words or less In this case, assume that the Internet-side IP addresses of VPN units A and B are VPN unit AX and VPN unit BX, respectively
When the NAT function is introduced, the addresses in the IP header of a packet sent from site A to site B are e for the receiver and VPN unit A for the sender, at the time
of sending from VPN unit A In addition, the addresses in the IP header at the time of reception by VPN unit B are VPN unit B for the receiver and f for the sender Thus the information in the IP header is changed, and g at VPN unit B fails, so VPN communication no longer works
Trang 18Q4 Read the following text regarding system performance, then answer Sub-Questions 1
through 3
Company C has studied replacing its server in order to improve system performance when the lease of its currently used Internet server ends The new server comprises a main unit (CPU, memory, and related peripheral devices) and a disk system There are two kinds of candidates for each of them Company C will select one main unit and one disk system from the candidates, and will build the server by combining them
A condition for the new server is that CPU utilization be 10% or less when existing programs are executed Disk capacity is estimated at 60 GB for storing data and programs
The specifications and performance for these candidates are as follows:
(1) Main unit specifications
Main unit A has just one CPU
Main unit B is based on a symmetric multiprocessor system It has one CPU in its minimum configuration, but CPUs can be added one at a time
Memory can be added as needed
(2) Main unit performance
In order to determine the performance of main units A and B in case of each containing one CPU, they were equipped with sufficient memory and test disks, and existing programs were executed The performance results are shown in Table
1 Test disks with a fast access speed were used
Table 1 Main Unit Performance
Main unit CPU utilization
A 10%
B 40%
The CPU utilization Pn of main unit B when it is equipped with n CPUs and executes existing programs is given by the following equation, where P1 is the utilization when there is one CPU
Pn = P1 (1 + 0.05 ( n – 1)) / n
12
Trang 19(3) Disk system specifications and performance
Both disk systems X and Y are RAID systems X is RAID1 and Y is RAID5 The operation rates and access times of the individual disks forming these systems are equivalent to each other
Sub-Question 1
Answer the following questions regarding the main units
(1) If main unit B is selected, how many CPUs are needed to build a multiprocessor configuration of the same or lower CPU utilization rate as main unit A?
(2) When a program to run as a single thread is executed, throughput is not improved much
on main unit B even when more CPUs are added What is the reason for this (answer in
30 words or less)?
Sub-Question 2
Table 2 shows the operation rates calculated taking into account minimum configurations assuming 60 GBs as the effective capacity of disk systems X and Y, and taking into account reliability in the event of a failure Enter a numerical value for a , and enter equations for b
and c In this case, the operation rate of a single disk is d in all cases
Table 2 Disk System Configuration
Disk system Number of disks (count) in
minimum configuration
Capacity (GB) per disk Operation rate
Trang 20Disk utilization (capacity for storing data or programs divided by total disk capacity)
is higher for f
Based on Company C’s operation methods, faster access time even in the event of a failure is more important than disk utilization, so g is the more suitable choice
(3) Overall system expandability
When CPUs are added, memory and disk system performance become bottlenecks Assuming sufficient memory can be installed, elimination of the disk bottleneck requires that disk systems be added, and the positioning of h must be taken into account so that all disk systems are accessed equally
14
Trang 21Q5 Read the following text regarding the implementation of a priority queue program, then
answer Sub-Questions 1 through 4
A queue is a data structure in which the first data that enters is the first to be removed A priority queue is a queue that emphasizes priority over arrival time In a priority queue, data with higher priority is taken out before data with lower priority, even if its arrival time
is later In cases where the priorities are the same, data is taken out in order of arrival time
A decision was made to write a priority queue library program Following are the two external interfaces of the library which is to be created:
(1) put(priority, id)
A function which inserts an identification number id in a queue with a priority value priority
(2) get()
A function which gets the identification number of the head of the queue
The programming language to be used does not allow dynamic memory management, so
an array is used as the queue data structure Priority, arrival time stamp, and identification number are inserted into each element in the array Hereafter, in order to simplify the
explanation, the array is denoted as Q; the priority of ith element in the array is denoted as
Q[i].pri; the time stamp is denoted as Q[i].time; and the identification number is denoted as Q[i].id The subscripts for the arrays start at 1 The number of entries currently stored in the queue is denoted by n There are no entries with the same time stamp
In this case, the lower the priority value is, the higher the priority is In cases where priorities are the same, the entry with the smaller time stamp value takes precedence over the other In this manner, it is possible to fully order all of the entries Hereafter, “higher priority” means that an entry is positioned closer to the front when the entries are fully ordered and resequenced In addition, it is assumed that the maximum number of entries N
in the queue is known
The following two methods were considered for creating the program:
Trang 22[Method A]
With this method, when data is inserted, it is added at the end of the queue When data is taken out, the entry with the highest priority is searched for and taken out If an entry before the end of the array was removed, then the data at the end of the array is moved to the position from which the entry was removed The get and put processes are as follows
is a complete binary tree or one in which a number of leaves of a complete binary tree have been removed from the right side
With a heap, the priority of the parent of each node is higher than the priority of its children to the left and right, so the priority of the root is the highest An example of a semi-ordered tree is shown below The numbers inside the nodes in the figure are the priorities In this example, there are no two nodes with identical priority, so time stamps and identification numbers were omitted
16
Trang 2311
12 15
5
13 8
10 9
Fig Example of a Semi-Ordered Tree
The put and get processes in cases where a heap is used are as follows;
Get the data at Q[1]
Switch data between the child with the highest priority and Q[r]
r ← Subscript of switched child
Trang 24Sub-Question 1
Show the priority of each element in an array in which the semi-ordered tree in the figure
is expressed as a heap get()was performed once on this data, after which put(6, id) was performed Show in a similar way the status of the array after each of these operations
Sub-Question 2
Present a logical expression which shows that the entry at Q[i] has a higher priority than the entry at Q[j] When time stamps are compared, assume that the one which was entered earlier has a smaller value Use NOT, AND, and OR as logical operations, and use
=, <, and > as comparative operations Assume that the comparative operators are evaluated before the logical operators The precedences of comparative operators are all the same in the evaluation, and the logical operators are evaluated in the following order: NOT, AND, OR
Sub-Question 3
With method B, show with r the following items required in the get and put processes Assume that when an integer is divided by an integer, fractions below the decimal point are truncated
(1) Subscript of Q[r] parent
(2) Subscripts of children to left and right when Q[r] is the parent
(3) Condition wherein Q[r] has no children
(4) Condition wherein Q[r] has no child to the right
Measurement result 2 0.45 4.57 9.42 Measurement result 3 0.20 0.26 0.28
18
Trang 25Q6 Read the following text regarding the implementation of a course attendance management
system, then answer Sub-Questions 1 through 5
A decision was made to review the functions of the currently operating system for managing the course attendance of students (hereinafter referred to as the course attendance management system), then implement a new system It was decided that the new system would manage information pertaining to student participation in certification exam preparatory seminars in addition to information pertaining to courses
In preparation for designing the new system, the old system was studied The layout of the
“Table of Students’ Attendance by Course,” which is outputted by the course attendance management system, had the format shown in Figure 1 Students must belong to a single college and department, and take multiple courses Each course is taught by one instructor, although a single instructor may teach more than one course
The requirements for the “Preparatory Seminar Participants’ List” for certification exam preparatory seminars prepared by the new system are summarized in the table below
It should be noted that multiple certification exam preparatory seminars are held
Table of Students’ Attendance by Course
Course Name : Physical Education (Actual Training) Supervising Instructor : Tom Goodman
Trang 2620
Table: Output Requirements for the “Preparatory Seminar Participants’ List”
for Certification Exam Preparatory Seminars
[Output Requirements for Preparatory Seminar Participants’ List]
1 Items included in preparatory seminar participants’ list:
(a) The following items are printed in the header of the preparatory seminar participants’ list
• Preparatory seminar code
• Preparatory seminar name
• Advising instructor name
(c) Details area output requirements
• Students who have withdrawn are not printed
• Students who have withdrawn can be distinguished from enrolled students using data stored in
“seminar withdrawal date.” The withdrawal date is entered in the “seminar withdrawal date” for the student who has withdrawn NULL is set in the “seminar withdrawal date” for active students
• Records in the details area are sorted according to “entry date” (in ascending order) as well as
in the alphabetical order of student names
2 Output increments for preparatory seminar participants’ list
The preparatory seminar participants’ list is to be outputted with a page break for each preparatory seminar code In addition, page breaks are set in the details area every time 40 lines are printed
3 Preparatory seminar participants’ list output timing
The preparatory seminar participants’ list can be outputted at any time
[Prerequisites Pertaining to Certification Exam Preparatory Seminars]