Showing posts with label Comprehensive. Show all posts
Showing posts with label Comprehensive. Show all posts

July 11, 2019

Software Architectures - Comprehensive Reference Solution

Question 
Choose the most appropriate architectural pattern (one) for the 5 descriptions below. Motivate for your choices (give reasons for choosing the pattern):
1. Wants to split a system into a number of computationally independent execution structures (groups of software and hardware) such as database, business logic, web interface and client, connected by some communication media. The structure is chosen to provide a specific server environment optimized for operational requirements and resource usage.

2. Wants to set up a set of equal distributed computational entities that are connected via a common protocol to share their services and provide high availability and scalability.

3. Wants a system that can be divided into reusable, loosely coupled components that can be flexibly combined and arranged to transform between various data formats.

4. Wants a distributed system with a structure that enables that service users do not need to know the nature or location of service providers.

5. Wants a system that quickly can analyze enormous volumes of data by sorting the data and then analyzing the grouped data.

Answer:
1 .Multi-tier
2. Peer-to-peer
3.Pipe-and-filter
4. Broker
5. Map-Reduce

Question
Present a general and a specific scalability requirement in the form of a Quality Attribute Scenario

Answer
A concrete scalability quality attribute scenario:

  • Source system owner 
  • Stimulus request to accommodate five times more concurrent users 
  • Artifact the main server cluster 
  • Environment normal operation 
  • Response increase the number of servers no more than sixfold, without recompiling the software 
  • Response measure performance as measured by average number of typical requests processed per minute may not drop more than 10%


Question 
In the Service Oriented Architecture style there is a strong decoupling between functionality and implementation, throughout the application life-cycle. Applications are built by combining or connecting services. Explain why and how this architecture facilitates
a. (1) reuse of existing software components;
b. (1) independent development.

Answer:
 In SOA, application components depend on each other only through the service interface. No details of an implementation may be used or be visible.
(a) There are two elements of reuse. Once a service (interface) is defined, the only thing that needs to be done to use an existing piece of software is to map the service interface to this software, typically by building an adapter. Secondly, services can be reused in many different applications since they do not contain knowledge about their application context. One remark on the latter is in place: a service may use other services.
(b) This relies on the same separation between service definition and implementation. By defining and using only the service interface, the implementation of the service becomes irrelevant for the service user. For example, by defining the UPnP interface, the implementation behind is it entirely invisible and can be developed by independent parties. One might also replace one implementation by the other.

Question
Read the description of the Cricket-Ticket system below and do an architectural design using the attribute-driven design (ADD) method.
Your answer should include: • Architectural drivers • Architectural tactics and patterns • A logical view • Interfaces • Verification of the architecture
Note that you should only describe the logical view and only do one level of decomposition!
Motivate for your choices and state your assumptions.

The Cricket-Ticket System (CTS) is a system where the users can buy tickets using credit cards to cricket matches in India over the Internet using a Web-browser. The user can look at information about future matches from cricket teams from all over India, and see if there are any available seats. The information about the cricket matches is retrieved from various servers with different interfaces provided by the different teams. Note that the teams in India will change every year. It is critical that the TSS is available to the users all the time, and it cannot be unavailable for more than 2 minutes a week. Before important games, such as Champion League games, it is important that the system does not break down even if over 40000 users try to get tickets at the same time

Answer:
Step 1. Choose module to decompose: The CTS

Step 2a. Choose architectural drivers: AD1: The system cannot be down more than 2 minutes a week (availability) AD2: The system should provide secure electronic payment (security) AD3: The system should be able to communicate with various team servers (modifiability) AD4: The system must handle 40,000 simultaneous users (performance)

Step 2b. Choose architectural patterns: Tactics for security: Firewall for server, autorize users, authenticate users, Payment handled by third-party and usage of secure connection (e.g. https) Tactics for modifiability: Divide the functionality into coherent units and plan for changeable interfaces for external systems. Tactics for performance: Use replication of the server to ensure support for many users, and cache data from team servers. Tactics for availability: Use replication of the server to cope with downtime.
Architectural patterns: Use a kind of a model-view controller pattern where the view and the controller is represented in the user interface part and the model is the database. Replication is used on server and database for higher performance and availability. Separation of concern is used to provide modifiability (separate core functionality and external interfaces), and a separate part dealing with secure computation and interfaces.

Step 2c. Instantiate Modules and Allocate Functionality Applied architectural patterns and instantiated functionality for match browsing, seats browsing, and ticket booking. Also added a data manager that takes care of caching of data from external systems (stored in database).

Step 2d. Define Interfaces of the Child Modules Interfaces between the server and the external parts of the system: • Between User interface and user clients: HTML over HTTP • Between External system interface and External Team server: XML over HTTP • Between Data manager and Database server: SQL over HTTP • Between Ticket payment and External payment service: encrypted binary over HTTPS Interfaces within the server: • The User interface class provides display methods that uses other classes: • displayMatch() • displaySeats() • displayBooking() The Ticket payment class offer the method payTicket (used by the Ticket booking class) The Data manager class offers methods that are used by three other classes: • getMatchInformation() • getSeatsInformation() • getBookingInformation() The External system interface class, offers a more general method for accessing information from external team servers: • getInformation()

Step 2e. Verify Use Cases and Quality Scenarios Check that functional requirements are covered: • The user can get information about future matches: Match browsing class • The user can get information about available seats: Seats browsing class • The users can buy tickets: Ticket booking and Ticket payment classes Check architectural drivers: • AD1: The system cannot be down more than 2 minutes a week (availability): Replication of the server and the database, and caching of external servers. • AD2: The system should provide secure electronic payment (security): Use secure computation in Ticket payment class, use secure transfer (https) and secure external payment service. • AD3: The system should be able to communicate with various team servers (modifiability): Supported through the External system interface class. • AD4: The system must handle 40,000 simultaneous users (performance): Replication of the server and database, and caching of external servers.

Question
Read the description below and do the following:
1.Identify the most important quality attribute(s) and the architectural drivers for the system described below.
2.Choose and describe suitable architectural tactics for the problem described below, and describe how the tactics affect the quality attributes.
3.Create architecture views of the system described below. The architecture must be described in two views according to the 4+1 view model: Process and Logical view
Motivate for your choice of quality attributes, architectural drivers and the architectural tactics used in your architecture.
Software for House Alarm System: The software described here is software for controlling an alarm system sold to households. The software should be able to run different configurations consisting of sensors from various producers, variations in types of displays and keyboard/button configurations. The different configurations also represent different price segments from the very simple and cheap alarm systems to the expensive and advanced. The software system is supports both smoke (fire) and movement sensors (theft). In normal mode, the system is running on electrical power from a standard power socket in the wall. However, in case a power outage, the system can operate on battery power. All the sensors are powered by the system. In case of a detection of fire or theft, the system will start a siren (alarm sound) and the display information about what caused the alarm, in what area of the house. How the information is shown is dependent on the capabilities of the display used in the system from only simple text to graphical description of the situation. For the more expensive configurations, the system can call the fire department or a security company through a telephone connection. The system can also be set up to call the mobile phone of the owner of the house. The system will also warn the security company if the alarm system is running on battery. The software is running on custom made computer with a CPU, memory and various input/output interfaces.

Answer:
1.Most important quality attribute(s) and architectural drivers for the system: This system is a product line system with many variations of configurations. In addition, such a system must be reliable as it concerns safety of the users. The two most important quality attributes for this system are availability and modifiability. Architectural drivers for the system:
• The architecture must provide high availability because the system can possibly save lives or keep people out of danger.
• The architecture must provide interfaces that can handle various types of sensors.
• The architecture must be able to support various types of displays and keyboard/button configurations.
• The architecture must be flexible in such way that it provides different types of functionality based on the price segment of the product.
• The architecture must be able to automatically switch to battery-operated mode in case of a power outage.

Data Storage Technologies and Networks - Comprehensive Reference Solutions

Question 
Why is SCSI performance superior to that of IDE/ATA? Explain the reasons from an architectural perspective

Answer :
SCSI offers improved performance and expandability and compatibility  options, making it suitable for high-end computers.
- Number of devices supported is 16
- SCSI architecture derives its base from the client-server relationship
- SCSI initiator, or a client, sends a request to a SCSI target, or a server.
- The target performs the tasks requested and sends the output to the initiator
- When a device is initialized, SCSI allows for automatic assignment of device IDs on the bus, which prevents two or more devices using the same SCSI IDs

Question 
What is a difference between a Cluster and a geographically-dispersed Cluster from administrative perspective?

Answer :
Geographically dispersed clusters, also called stretched clusters or extended clusters, are clusters comprised of nodes that are placed in different physical sites. Geographically dispersed clusters are designed to provide failover in the event of a site loss due to power issues, natural disasters or other unforeseen events.
From administrative perspective the difference would come up due to the storage that will be used. It won't be a common storage available at the respective locations instead a replication between the two will have to be set up and managed accordingly. Managing failover will also be different than a normal
cluster.

Question
DAS provides an economically viable alternative to other storage networking Solutions. Justify this statement

Answer :
- Setup requires a relatively lower initial investment
- Setup is managed using host-based tools, such as the host OS, which makes storage management tasks easy for small and medium enterprises.
- Requires fewer management tasks, and less hardware and software elements to set up and operate.

Question

i.Write the type of networks in place of N1 and N2. Write the type of ports in place of P1 and P2.
ii. What is meant by FC network is lossless? How FC achieve this ? How can we achieve losslessness in FCoE?

Answer
(i)N1 – IP Network. N2 – FC SAN. P1- Native SCSI port. N2- FC port

(ii) An FC network is lossless, meaning that the protocol has a built-in mechanism that prevents frame drops caused by congestion. Fibre Channel manages congestion through link level, credit based flow control. With credit-based flow control, the receiver sends credits to the sender to indicate the availability of receive buffers; the sender waits for credits before transmitting messages to the receiver Busy receive port can send the control frame to the transmit port for pause in transmission. This is called PAUSE capability of ethernet. Using this FCoE supports losslessness which is required in FC transmission.

Question
i.Write Server Configuration for the following:
Export src and ports to client01 and client02, but only, client01 has root privileges on it.
The client machines have root and can mount anywhere  on /exports. Anyone in the world can mount /exports/obj read-only.

ii.How do you recover the data from backup in following scenarios :      
(a) Full backup taken on Monday, Incremental backup taken on Tuesday, Wednesday and Thursday. You have to restore system on Friday.
(b) Full backup taken on Monday, Cumulative backup taken on Tuesday, Wednesday and Thursday. You have to restore system on Friday.

Answer
i)
# Export src and ports to client01 and client02, but only
# client01 has root privileges on it
/usr/src /usr/ports -maproot=root    client01
/usr/src /usr/ports               client02
# The client machines have root and can mount anywhere
# on /exports. Anyone in the world can mount /exports/obj read-only
/exports -alldirs -maproot=root      client01 client02
/exports/obj –ro

ii)
First restore Mondays full backup. 
(a) Then restore backup of Tuesday, wednesday and Thursday. 
(b) After restoration of Monday’s, restore Thursday’s backup

Question 
A host generates 8,000 I/Os at peak utilization with an average I/O size of 32 KB.  The response time is currently measured at an average of 12 ms during peak utilizations. When synchronous replication is implemented with a Fiber Channel ink to a remote site, what is the response time experienced by the host if the network latency is 6 ms per I/O?

Answer
Actual response time = 12+ (6*4) + (32*1024/8000) = 40.096 
Where 12 ms = current response time 
6 ms per I/O = latency 
                   32*1024/8000 = data transfer time
Question 
We have 6 nodes running a cluster. If suddenly 5 nodes found that they can communicate with each other but they cannot communicate with one specific node.
i. What steps the cluster should take to prevent data corruption? What is this phenomena called?
ii. Now if it is found that cluster is split in two groups with 3 nodes in each group. Nodes in one group can communicate with each other but can not communicate with nodes of other group. What is this situation called? Explain in brief about the steps the cluster will take to resolve the problem. 
Answer :
(i) The node will be forced to shut down through some managed Switch. This is called fencing.
(ii)This is called as split brain. To prevent data corruption cluster should shut down the group with lesser number of nodes. Since here the number of nodes are equal, cluster will take the help of quorum disk to decide the group of nodes to be shut down

Question
A host generates 8,000 I/Os at peak utilization with an average I/O size of 32 KB.  The response time is currently measured at an average of 12 ms during peak utilizations. When synchronous replication is implemented with a Fiber Channel ink to a remote site, what is the response time experienced by the host if the network latency is 6 ms per I/O?

Answer :
Actual response time = 12+ (6*4) + (32*1024/8000) = 40.096
Where 12 ms = current response time
6 ms per I/O = latency
                   32*1024/8000 = data transfer time

Question 
It is required to connect one FOCE SAN and one FC SAN to a rack mounted servers having 10Gbe CNAs. Suggest a plan of connection with a diagram showing necessary components.

Answer :

Question 
Explain the action involved between the NDMP DMA control and NDMP Server during Recovery process in the given scenario.


Answer :

DMA creates a control connection to the secondary storage agent
 Connect using TCP port 10,000
 NDMP_CONNECT_OPEN  (to negotiate version)
 NDMP_CONNECT_CLIENT_AUTH (to authenticate DMA to Server)
DMA uses the tape library media changer to load the required tape
The SCSI service is invoked
 NDMP_SCSI_OPEN
 NDMP_SCSI_EXECUTE_CDB - to manipulate media changer
NDMP_SCSI_CLOSE
DMA prepares the tape service for a recovery operation
 The tape service is invoked
 NDMP_TAPE_OPEN
 NDMP_TAPE_READ - to validate volume label
 NDMP_TAPE_MTIO - to position tape to start of backup data
DMA prepares the mover for a recovery operation
 The mover is invoked
 NDMP_MOVER_SET_RECORD_SIZE
 NDMP_MOVER_SET_WINDOW
  DMA opens control connection to the primary storage agent
 Connect using TCP port 10,000
 NDMP_CONNECT_OPEN - to negotiate protocol version
 NDMP_CONNECT_CLIENT_AUTH - to authenticate DMA to Server
  DMA queries secondary storage agent for capabilities
 NDMP_CONFIG_GET_CONNECTION_TYPE
  DMA queries primary storage agent for capabilities
 NDMP_CONFIG_GET_BUTYPE_INFO
 NDMP_CONFIG_GET_CONNECTION_TYPE
  DMA obtains the data server’s data connection address information
 The Data service is invoked
 NDMP_DATA_LISTEN
  DMA creates a data connection connection between NDMP servers
 NDMP_MOVER_CONNECT
  DMA creates a data connection connection between NDMP servers
 The mover connects to the specified IP address & TCP port
  DMA instructs the data server to initiate the recovery operation
 NDMP_DATA_START_RECOVER
  DMA recovery request is processed
 Data service determines the offset & length of the DMA specified recovery data
 Data server requests the specified data stream be transferred
 NDMP_NOTIFY_DATA_READ
  DMA instructs the mover to transfer the specified recovery stream
 NDMP_MOVER_READ
the mover interacts with the tape service to access the recovery stream
  DMA instructs the mover to transfer the specified recovery stream
 The mover begins sending recovery stream over data connection
  NDMP Data & Tape services send periodic log messages to DMA
 NDMP_LOG_MESSAGE
  NDMP Tape service sends notification when DMA intervention is required
example: end of mover window or tape medium encountered
 NDMP_NOTIFY_MOVER_PAUSED
  DMA initiates tape swap possibly utilizing media changer support
 NDMP_TAPE_MTIO - to rewind/unload tape
 NDMP_SCSI_EXECUTE_CDB - to manipulate media changer
 NDMP_TAPE_MTIO - to position new tape
 NDMP_TAPE_READ - to validate new tape header
DMA prepares the mover to continue the recovery operation
 NDMP_MOVER_SET_WINDOW
 NDMP_MOVER_CONTINUE
Data server detects end of recovery operation

June 24, 2019

Network Security - Comprehensive Paper Solution


Note: This is a previous year comprehensive solutions for your reference, feel free to provide solutions by navigating Submit Question/Answer tab in case you have latest solutions.


1) Jira's password is made of up 6 alphanumeric characters only. One password attempt takes 1 millisecond, What is the time to crack it in days?
i)  If password is case-sensitive.
ii) If password is case- insensitive.

Answer:
i) Case sensitive
 total chars = 26 + 26 + 10 = 62
 possible combinations = 62 ^ 6 passwords
 total time taken = 62 ^ 6 . 1 ms
 approx. 62.62 =~ 3600 sec = 1 hour
 Total time taken = 62. 62. 62. 62 / 1000 hours
 =~ 360. 36 hours = 360.36/24 days
 =~ 360.3/2= 180.3 = 540 days
 Note: 62^4/1000/24 =~ 615 days
 So an approx. answer between 520 to 620 days is good enough.

ii) Case insensitive
 total chars = 26 + 10 = 36
 possible combinations = 36 ^ 6 passwords
 total time taken = 36 ^ 6 . 1 ms
 = 36.36.36./ 1000 . 36 ^3
 =~ 36. 36 ^ 3 seconds
 = 36. 36. 36. 36 / 3600 hours
  = 466 hours
 =~ 19 days
 So an approx. answer between 18 to 20 days is good enough.

2) What is a self-signed SSL certificate ?  Detail on the security perspective when a website is using a self-signed SSL certificate.

Answer:
A certificate not-signed by a Publicly trusted CA, but signed by a locally setup CA server is a self-signed certificate. Any entity/website/server using a self-signed SSL certificate cannot be trusted and very commonly used in phising attacks. I can setup a server to act as gmail.com fradulently by creating a self-signed certificate for www.gmail.com and deploying it in the server.

Most standard browsers – Firefox, Google Chrome, Safari, etc. throw errors when trying to browse to websites having self-signed certificates.

3) How to avoid man-in-the-middle attack in SSH sessions? Show passwordless SSH logins at work.

Answer:
Man-in-the-middle attack is at-work when a client C logs in to a server M thinking it is server S and the client C is unable to detect it. In this case, the server M has successfully duped the client C and has forged a man-in-the-middle attack. So it can be a passive two-way data forwarder between client C and the actual server S, or an active data-mangler.
Every host server in SSH have their public keys sent to the client in the Key Exchange., which gets stored in client’s .ssh/known_hosts file. So the next time, client connects to the host, the server sent public key is matched with the client’s .ssh/known_hosts file and if there is a mismatch, SSH does not connect. So this SSH behavior effectively thwarts a middle server M trying to pose as actual server S.
Password less SSH logins happen via public keys.
Consider Client C connecting to Server S. In server S side, in file .ssh/authorized_keys, there should be entry containing client C’s public key. Then the server S will use it to exchange - encrypting/signing initial key exchange material with the client C. Because of the property that any data encrypted with public key can only be decrypted using the matching private key, this mechanism automatically authenticates the client C as only client C holds the private key. Client’s private key file are usually stored in file .ssh/id_rsa or .ssh/id_dsa depending on the public key algorithm chosen.

February 15, 2019

Data Mining - Comprehensive Paper Solution



Note: This is just a reference paper which you can go through,  we are facing some issue with the website. If you have any more important question/answer, let us know. 
Share it on our Email - 1trickyworld1@gmail.com


Question:
For the following vectors x and y, calculate the cosine similarity and euclidean distance measures:
x =(4,4,4,4), y=(2,2,2,2)

Solution:

Cosine
x ● y = 4*2 + 4*2 + 4*2 + 4*2 = 32
||x|| = sqrt(4*4 + 4*4 + 4*4 + 4*4) = sqrt (64)   = 8
||y|| = sqrt(2*2 + 2*2 + 2*2 + 2*2) = sqrt (16) = 4
cos(x,y) = (x ● y) /  (||x||*||y||) = (32)/ (8*4) 
cos(x,y) = 1

Euclidean
d(x, y) = sqrt((4-2)^2 + (4-2)^2 + (4-2)^2 + (4-2)^2) 
Euclidean distance = 4

Question:
Consider the one-dimensional data set shown on the below table

X  
0.6  
3.2  
4.5  
4.6  
4.9  
5.2  
5.6  
5.8  
7.1  
9.5  
Y
-
-
+
+
+
-
-
+
-
-

Classify the data point x=5.0 according to its 3- and 9- nearest neighbors (Using majority Vote)

Answer:
We need to first find the difference of each data set with respect to x=5.0, Refer the below table for the same.

x
X
Difference (x & X)
Y
5.0
0.6
4.4
5.0
3.2
1.8
5.0
4.5
0.5
+
5.0
4.6
0.4
+
5.0
4.9
0.1
+
5.0
5.2
0.2
5.0
5.6
0.6
5.0
5.8
0.8
+
5.0
7.1
2.1
5.0
9.5
4.5

As asked,
Using 3- nearest neighbors method, 3 Closest points to the point x=5.0 will be the one who has least difference among them - > 4.9, 5.2, 4.6
Classes ->   +
Using Majority Vote, 3-nearest neighbor: +

Using 9- nearest neighbors method, 9 Closest points to the point x=5.0 will be the one who has least difference among them - > 4.9, 5.2, 4.6, 4.5, 5.6, 5.8, 3.2, 7.1, 0.6
Classes -> +  + +  +   
Using Majority Vote, 9-nearest neighbor: 

Question:
Suppose a group of 12 sales price records has been sorted as follows:
5; 10; 11; 13; 15; 35; 50; 55; 72; 90; 204; 215:
Partition them into three bins by each of the following methods.
(a) equal-frequency partitioning
(b) equal-width partitioning
(c) clustering

Answer:
(a) equal-frequency (equidepth) partitioning:
Partition the data into equidepth bins of depth 4: [given as n=4]
Bin 1: 5, 10, 11, 13
Bin 2: 15, 35, 50, 55
Bin 3: 72, 90, 204, 215

(b) equal-width partitioning:
Partitioning the data into 3 equi-width bins will require the width to be (215−5)/3 = 70.
We get interval like- (1,70),(71,140),(141,210),(211,280)
Bin 1: 5, 10, 11, 13, 15, 35, 50, 55
Bin 2:72, 90
Bin 3: 204
Bin 4: 215

(c) clustering:
Using K-means clustering to partition the data into three bins we get
Bin 1: 5, 10, 11, 13, 15, 35
Bin 2: 50, 55, 72, 90
Bin 3: 204, 215

February 08, 2019

Software Project Management - Comprehensive Paper Solution

Note: This is just a reference paper which you can go through,  we are facing some issue with the website. Thanks for sharing some answer key with us, let us know if you have more answer keys so we can share with others too.
Share it on our Email - 1trickyworld1@gmail.com

Question:
1. Pick the odd one out and say why?:
a. WBS
b. Gantt chart
c. Prototype
d. Slip Chart
e. Time chart

Answer: c. Other four relates to methods of project scheduling.

Question: How do you create agile processes to manage unpredictability?

Answer:  Software increments must be delivered in short time periods and Software processes must adapt to changes incrementally

Question: Which of the following does not take account of the dependencies between activities? 
a. Activity network  
b. Resource histogram 
c. Work breakdown structure   
d. Gantt chart

Answer: WBS, rest of the activities involve multiple activities linkages.

Question:  Based on what SDLC deliverable, acceptance criteria for a project be derived and why and also give one example of NFR acceptance criteria.

Answer: The acceptance criteria should be derived from the Requirements Specification, which is where the users’ stated needs are documented. Eample, ‘a response time of less than 2 seconds for 90% of transactions’ is a lot more precise than ‘a fast response time’.

Question:  Explain the difference between effort and elapsed time. What is the significance of this difference for project planning purposes?

Answer: Effort is the total volume of work involved in a task and is best thought of as how long it would take to accomplish if one person were assigned to it.  Elapsed time, on the other hand, is how long the task will take from start to finish and this will depend on the effort involved, how many people are assigned to the task and what delays or external dependencies are involved.


Question:  Compute the function point value, corresponding effort (state your assumption) and the Minimum time to develop for that effort for a project with the following information domain characteristics.
Number of user inputs.                 - 32
Number of user outputs.              - 60
Number of user inquiries.             - 24
Number of Files.                              - 8
Number of external interfaces.   - 2
Assume that all complexity adjustment values are average.                                        Marks  10

Answer: ( 4+2+4)
For Average adjustment values,               
32 X 4 = 128
60 X 5 = 300
24 X 4 = 96
8 X 10 = 80
2 X 7 = 14
So, Count Total is equal to 618.
FP = Count Total X [0.65 + 0.01 X Summation (Fi)]
FP = 618 X [0.65 + (0.01 X 30)] = 587.10.

Effort:  assumption : 1FP/person/day or any similar no. = 587.10X1= 587 persondays. (persondays is important)
Duration: use the formula :  2.5*(Effort)exponent   Exponent can be :0.32,0.35,0.38

Question: Read the following project scenario and suggest your best approach by precisely answering the questions (make your own assumptions and state them clearly)
You are currently the Project Manager (PM) for the first development project of EuroShell—the prestigious customer who has recently signed an MoU with your company—XcelPro--for a multi-million-dollar business over the next 5 years. The project spans a period of 9 months and it involves several new technologies/tools. In addition, the customer keeps changing the requirements at an average rate of 1-2 change-requests (CR) per month. You are asked to send regular weekly status reports to the customer’s PM. The customer has not raised any major issue (nor responded to your regular status reports) till the final product is delivered for acceptance testing (UAT) during which your Delivery Head (your boss) received a major escalation (mail) from the customer (with a copy to XcelPro’s CEO) citing various defects observed and in turn seriously doubting XcelPro’s capability to develop and deliver software product.


Q1) You are asked to prepare a report/PPT as response to the escalation mail by holding a meeting via video conference call with customer.  Who are all the people to be involved in the meeting? What are agenda/items in your report/PPT? What are your recommended methods/techniques for presentation of data/issues so that the meeting concludes well with renewed trust in the company’s management and its QMS?  5 Marks


Q2) What was the format/Template of your project report?  Why do you think your customer did not respond to your regular weekly status reports (and of course, jumped with an escalation only at the end of delivery)? What factors (internal/external) contributed to this escalation?  If you were to redesign your project status report to elicit frequent responses from customers, what would you do?   5 Marks

November 03, 2018

SOFTWARE PROJECT MANAGEMENT - Mid Sem Solutions

Mid-Sem Paper Solutions:

Note: Provide justification for your choice; else you will get zero, More than one choice may be the right answer.



Question:
When using Agile methods, planning is usually done based on:
A.    Scheduled Milestones                   B. Series of Releases
C.    Fixed Requirements                      D. Technical feasibility

Answer: B
Series of Releases

Justification:
AGILE methodology is a practice that promotes continuous iteration of development and testing throughout the software development life-cycle of the project. In Agile Planning, Selection of features develops during a specific set of time(The sprint).

Basically, in an Agile Project - release plan is focused on planning multiple iterations in an effort to determine when each release will be delivered. In order to achieve the product vision,

Tip: There are lots of reasons which you can use here, the basis on your work. If you have worked in an agile project. 

Question:
All of the following statements concerning stakeholders are true except
A.    Differences between or among stakeholders should be resolved in favor of the customer.
B.    Managing stakeholder expectations may be difficult because stakeholders often have very different objectives that may come into conflict.
C.    Project stakeholders may influence the course of the project and its results.
D.    Differences between or among stakeholders should be resolved in the most cost-efficient manner consistent with project objectives.

Answer: D
Differences between or among stakeholders should be resolved in the most cost-efficient manner consistent with project objectives.


Question:
During a company event, you had the opportunity to talk to a colleague project manager. He told you that in his current project actual costs are15% under cumulated costs scheduled for today. What do you think?
A.    The information available is not sufficient to assess project performance.
B.    The project will probably be completed with total costs remaining under budget.
C.    A significant cost increase during the further course of the project will probably bring the costs back to the baseline level.
D.    Original cost planning must have been poor to allow this variance.

Answer: A
The information available is not sufficient to assess project performance.

November 02, 2018

Software Engineering - Comprehensive

 2015 - 2016
Comprehensive Examination (Regular) 

Question) Indicate True or False for following statements with a justification within 30 words. No credit is given for answers with no justification.  

a. For successful design, you must practice diversification followed by convergence.
Answer)TRUE
b. Appraisal cost is likely to be the most expensive element of cost of quality.
Answer)TRUE
c. Before an architectural pattern is chosen for use in a particular system it must have a code implementation to expedite its reuse.
Answer)FALSE
d.Quantitative methods for evaluating the quality of proposed architectural designs are freely available.
Answer) FALSE
e. In component-based software engineering, the team searches for available components at the outset of the project.
Answer)FALSE
f. With thorough testing it is possible to remove all defects from a program prior to delivery to the customer.
Answer)FALSE
g. Many software metrics can only be measured indirectly.
Answer)TRUE
h. Software testing is deemed complete at end of budgeted duration for testing.
 Answer)FALSE
i. Design patterns are not applicable to the design of object-oriented software.
Answer)FALSE

Question) Differentiate the following: 
a. Analysis vs. design

November 01, 2018

DESIGN AND ANALYSIS OF ALGORITHMS - Comprehensive Paper Solution

Question:
Assume that there are two algorithms A and B for a given problem P. The time complexity functions of algorithms A and B are 5n and log2n    respectively. Which algorithm should be selected assuming that all other conditions remain the same for both the algorithms?

Solution:
Assuming that all conditions remain the same for both algorithms, the best algorithm takes less time when the input is changed to a larger value. Results obtained employing different values of n are shown below:

Computer Networks - Answer Key

QUESTION 1.For each of the following applications,  determine whether  TCP or UDP is used as the transport layer protocol  and explain the reason(s) for your choice [5 x 2 = 10]
a)File Transfer
b)Watching a real time streamed video
c)Web browsing
d)A Voice over IP (VoIP) telephone conversation

Solution
a)File transfer :This should be TCP The reason is that you want a file to be transmitted in its entirety without any errors, therefore the error detection and correction properties of TCP are needed.
b)Watching a real time streamed video :This should be UDP. The reason is that when watching a movie, delay is critical and therefore there simply isn't any time to seek the retransmission of any errors. The simplicity of UDP is therefore required.
c)Web browsing :This should be TCP The reason is that web pages need to be delivered without error so that all content is properly formatted and presented. Therefore the error detection and correction properties of TCP are needed.
d)A Voice over IP (VoIP) telephone conversation :This should be UDP. The reason is that a telephone conversation has strict timing requirements for the transfer of data and seeking the retransmission of any errors would introduce too much delay. Therefore the simplicity of UDP is needed.

Computer Graphics - Answer Keys

Section – A (7 x 8 marks = 56 marks)

Question 1.The co-ordinates of only one eighth of the total pixels lying on circumference of a circle are computed. Why? The Bresenhem’s circle drawing algorithm can be adapted for computing the coordinates of other pixels, explain?

Solution Scheme: 
Circle is symmetric about its axis. So, if point (x,y) is on the circle, then we can trivially compute (450 segment) seven other points (y,x),(y,-x),(x,-y),(-x,-y),(-y,-x),(-y,x),(-x,y) using the symmetry.(2 marks)
Bresenhem’s circle drawing algorithm (6 marks)

Question 2.Cohen-Sutherland line clipping technique uses the concept of region codes (or outcodes) in order to clip lines. Suppose a rectangular clip window ABCD is defined such that the lower left hand corner is at A(1,2) and upper right hand corner is at C (9,8). Clip the following line segments using Cohen Sutherland technique
  Line 1 from P(-1,7) to Q(11,1)
  Line 2 from R(3,7) to S(3,10)
  Line 3 from U(2,3) to V(8,4).

Software Development for Portable Devices - Compre Paper Solution

QUESTION 1(10 Marks)
Q1a.Explain the following methods of ContentProvider class [5]
(Note: Full marks is awarded if methods parameters and return type is explained.)

Answer)
i.canonicalize(Uri url):
  • A canonical URI is one that can be transported across devices, backup/restore, and other contexts, and still be able to refer to the same data item. Typically this is implemented by adding query params to the URI allowing the content provider to verify that an incoming canonical URI references the same data as it was originally intended for and, if it doesn't, to find that data (if it exists) in the current environment.
  • Parameters Url: uri: the Uri to canonicalize. this value must never be null
  • Returns : URI Return the canonical representation of url, or null if canonicalization of that Uri is not supported.

August 14, 2018

Important QnA on Database Management Systems (DBMS) - Comprehensive


Question) Draw an ER diagram that captures the following information:
The Prescriptions-R-X chain of pharmacies has offered to give you a free lifetime supply of medicine if you design its database. Assume the rising cost of health care, you approve. Here’s the information that you gather:
Patients are recognized by an SSN, and their names, addresses, and ages must be logged.
Doctors are known by an SSN. For individual doctor, the name, specialty and field, and years of experience need to be logged.Each pharmaceutical company is recognized by name and has a phone number.
For each drug, the trade name and formula must be noted. Each drug is traded by a certain  pharmaceutical company, and the trade name identifies a drug distinctively from amongst the products of that company. If a pharmaceutical company is removed, you must not keep track of its products any longer.
Each pharmacy has a name, address, and phone number.Every patient has a primary physician. Each doctor has at least one patient.Each pharmacy vends several drugs and has a certain price for each. A drug might be sold at numerous pharmacies, and the value could differ from one pharmacy to other.
Doctors prescribe drugs for patients. A doctor can prescribe one or additional drugs for quite a few patients, and a patient can acquire prescriptions from numerous doctors. Each prescription has a date and a quantity associated with it. You can accept that, if a doctor recommends the identical drug for the same patient more than once, only the last such medicament needs to be kept.
Pharmaceutical companies have long-term contracts with pharmacies. A pharmaceutical company can bond with quite a lot of pharmacies, and a pharmacy can deal with a number of pharmaceutical companies. For every contract/bond or deal, you have to collect  a start date, an end date, and the text of the contract.
Pharmacies appoint a supervisor for each contract. There should constantly be a supervisor for each contract, but the contract supervisor or the managing authority may change over the period of the contract.
Answer)
Key points for ER diagram:
  • Entities correctly identified.
  • Attributes correctly identified.
  • Primary keys correctly identified.
  • Relationships and cardinality correctly identified.



Question)A Consider the following relational schema and translate the following SQL-query into an expression of the relational algebra.
• Student (snum, sname, major, level, age) 
• Class (name, meets at, room, fid) 
• Enrolled (snum, cname) 
• Faculty (fid, fname, deptid) 
a) 
                      SELECT S.sname 
                      FROM Student S 
                      WHERE S.snum 
                      NOT IN (
                      SELECT E.snum 
                      FROM 
                      Enrolled E)
Answer)


b)   
                              SELECT C.name 
                              FROM Class C 
                              WHERE C.room = ’R128’ OR C.name IN 
                      (SELECT E.cname 
                      FROM Enrolled E 
                     GROUP BY E.cname 
                     HAVING COUNT(*) >= 5)
Answer)


Question) 
EmpMaster (eid: number, ename: varchar, sal: number, age: number, deptid: number)   
Dept(deptid: number, budgetAmt: number, floor: number, mgreid: number)
Salaries range from Rs.10,000 to Rs.100,000, ages vary from 20 to 80, each department has about five employees on average, there are 10 floors, and budgets vary from RS.10,000 to Rs 100,000. You can assume uniform distribution of values.
Query: Print ename, age, and sal for all employees.
Query: Find the deptids of departments that are on the 10th floor and have a budget of less than Rs25,000     
a) For each of the following queries, which index would you choose to speed up the query? 
b)If your database system does not consider index-only plans (i.e.,data records are always retrieved even if enough information is available in the index entry), how would your answer change? 
Explain briefly.

Answer)
a)We can build an unclustered hash index on ename, age, sal fields of EmpMaster as then we could do “On index only” test. If our system does not comprise of” index only “plans then we should not make index for this query. Subsequently this query needs us to access all the Emp records, an index won’t help us, and so we can access the records using a filescan.

b)For the second scenario we can create a clustered dense B+tree index on floor, budget fields of Dept, since the records would be well-ordered on these fields then. So when performing this query, the first record with floor=10 must be fetched, and then the other records with floor =10 can be read in ascending order of budget. This plan, which is the best for this query, is not an index-only plan.

Question) Modern disk drives store more sectors on the outer tracks than the inner tracks.
As the rotation speed is persistent, the sequential data transferal rate is also greater on the outer tracks.The seek time and rotational delay are unchanged. Given this information, explain good strategies for placing files with the following kinds of access patterns:
a. Frequent, random accesses to a small file (e.g., catalog relations).
b. Sequential scans of a large file (e.g., selection from a relation with no index).
c. Random accesses to a large file via an index (e.g., selection from a relation via the index).
d. Sequential scans of a small file.

Answer)
a.Place the file in the middle tracks. Sequential speed is not an issue due to the small size of the file, and the seek time is minimized by placing files in the center.
b. Place the file in the outer tracks. Sequential speed is most important and outer tracks maximize it. 
c.   Place the file and index on the inner tracks. The DBMS will alternately access pages of the index and of the file, and so the two should reside in close proximity to reduce seek times. When we place the file and the index on the inner tracks we save valuable space as well on the faster (outer) tracks for additional files that are retrieved successively.
d. Place small files in the inner half of the disk. A scan of a minor  file is effectually random I/O because the cost is conquered by the cost of the first initial seek to the commencement of the file.

Question) What are checkpoints and why are they important? List the actions taken by the recovery manager during checkpoints? 

Answer) Checkpoint is a type of entry in the log. A checkpoint record is printed into the log from time to time at that point when the system prints out to the database on disk all DBMS buffers that have been reformed. As a result of this, all transactions that have their [commit, T] entries in the log before a checkpoint entry do not need to have their WRITE operations redone in case of a system crash, since all their updates will be recorded in the database on disk during check pointing. Actions taken by the recovery manager during Checkpoint The recovery manager of a DBMS must decide at what intervals to take a checkpoint. The interval may be measured in time say, every m minutes or in the number t of committed transactions since the last checkpoint, where the values of m or t are system parameters.  
Checkpoints taken by recovery manager consists of the following actions:
 1. Suspend execution of transactions temporarily. 
2. Force-write all main memory buffers that have been modified to disk..
3. Write a [checkpoint] record to the log, and force-write the log to disk. 
4. Resume executing transactions. As a consequence of Step 2, a checkpoint record in the log may also include additional information, such as a list of active transaction ids, and the locations (addresses) of the first and most recent (last) records in the log for each active transaction. This can facilitate undoing transaction operations in the event that a transaction must be rolled back.

Question) Consider an empty B+-tree with n=4, insert the following record keys in the specified order: 
80, 25, 69, 14, 58, 3, 47, 91, 36, 81. 
Answer)



Question)  Consider the following partial Schedule S involving two transactions T1 and T2. Only the read and the write operations have been shown. The read action on data item P is signified by read (P) and the write action on data item P is signified by write (P).  What would the result when the transaction T1 fails instantly after time instance 9.
Answer)
Schedule S is non-recoverable and cannot ensure transaction atomicity because T2 reads value of 'A' which is written by T1 and T2 is committed before T1. 

Question) Consider two transactions:
                               T1: BEGIN A=A+100, B=B-100 END
                               T2: BEGIN A=1.06*A, B=1.06*B END
• 1st TXN transfers $100 from B’s account to A’s
• 2nd TXN credits both accounts with 6% interest.
Assume at first A and B each have $1000. What are the authorized outcomes of running T1 and T2???

Answer) There is no guarantee that T1 will execute before T2 or vice-versa, if both are submitted together. But, the net effect must be equal to these two transactions running consecutively in some random order.
Legal outcomes: A=1166, B=954 or A=1160, B=960

Question) Suppose you are given a relation R with four attributes ABCD. For each of the following sets of FDs, assuming those are the only dependencies that hold for R.                                                 
(a) Identify the candidate key(s) for R. 
(b) Identify the best normal form that R fulfills (1NF, 2NF, 3NF, or BCNF).
(c) If R is not in BCNF, decompose it into a set of BCNF relations that preserve the dependencies. 
 Perform the above tasks for the following set of functional Dependencies:         
1. C → D, C → A, B → C
2. B → C, D → A
3. ABC → D, D → A
4. A → B, BC → D, A → C
5. AB → C, AB → D, C → A, D → B

Answer)
1. (a) Candidate keys: B  
   (b) R is in 2NF but not 3NF.
   (c) C → D and C → A both cause violations of BCNF. One way to obtain a (lossless) join preserving decomposition is to decompose R into AC, BC, and CD.

2. (a) Candidate keys: BD  
    (b) R is in 1NF form and not 2NF.
    (c) Equally B → C and D → A cause BCNF desecration or violation. The decomposition: AD, BC, BD (achieved by first decomposing to AD, BCD) is BCNF and lossless and join-preserving.

3. (a) Candidate keys: ABC, BCD  
    (b) R is in 3NF and not BCNF.
    (c) ABCD is not in BCNF form because D → A and D is not a key for it. However when we split up R as AD, BCD we cannot reserve the dependence ABC → D. Hence there is no BCNF decomposition.

4. (a) Candidate keys: A
    (b) R is in 2NF and not 3NF (as FD: BC → D).
    (c) BC → D violates BCNF since BC does not comprise a key. Therefore we divide up R as in: BCD, ABC.

5. (a) Candidate keys: AB, BC, CD, AD
    (b) R is in 3NF and is not BCNF (as FD: C → A). 
    (c) C → A and D → B both cause violations. Hence we decompose into: AC, BCD but this does not preserve AB → C   and AB → D, and BCD is yet still not BCNF because D → B. Therefore we need to decompose more into: AC, BD, CD. However, when we try to revive the lost functional dependencies by adding ABC and ABD,  these relations are not in BCNF form. Therefore, we can say there is no BCNF decomposition.