GNIIT SEM C MT2 EXAM QUESTION
……ANSWER HILITED IN RED COLOR……….
1. Identify the processor performance parameter that indicates the amount of time it takes to a particular process.
a. Turnaround time
b. Program execution time
c. Instruction execution time
d. Response Time
a. Turnaround time
b. Program execution time
c. Instruction execution time
d. Response Time
2. Jim, a software developer develops an application on .NET platform. He decides to use VTune performance analyzer to monitor the system level performance information, such as resource consumption, during the execution of the application. Which feature of VTune performance analyzer should Jim use to perform the task?
a. Both Call graph and sampling
- b. Counter Monitor
- c.Sampling
d.Call Graph
3. John needs to test his website’s compatibility on different mobile devices. To test his site on the pocket PC 2003 SE, he needs to browse a web page of his website on the corresponding Emulator. The ip address of the host computer is 172.23.4.227. Which of the following sequence of steps should john perform to achieve this task once he opens the Device Emulator Manager?
Answer:-
i. Click Tools menu of Visual Studio 2005 and select Device Emulator Manager.
ii. Select Pocket PC 2003 SE.
iii. Click Connect from Action menu.
iv. Click Cradle from the Action menu.
v. Once the synchronization is complete click Start and selects Internet Explorer.
vi. In the address bar type the http:// IP address/page.aspx.
4. Which is the key factor that a developer can optimize to suit different specifications and obtain bet performance on a given hardware?
a. System Resources
- b. Source Code
- c. Hardware Resources
d. Processor Performance
5. Consider the following code snippet
for(i=0;i<100;i++)
{
a=a+i;
}
for(i=0;i<100;i++)
{
b=b+i;
}
By observing the preceding code snippet, identify the correct method that would optimize the preceding code snippet.
a. Reduce work inside loop
b. Remove unwanted parts of loop
c. Combining loops
d. Use sentinel value
6. Visual Studio 2005 includes Device Emulator 1.0. Which of the following is NOT emulated by this software?
a. Microsoft Windows CE 5.0
- b. Microsoft pocket PC 2003
- c. Microsoft Smartphone 2003
d. Symbian OS 6.0
7. You are working as an application developer. You develop a C# application and written the following code
for(k=0;k<last;k++)
{
a[k]=b[k]*t.p;
}
When you run the application you find that the application is performing slowly. You decide to optimize the above code. Which technique should you use to optimize the code?
a. Split the for loop into two separate for loops
b. Use sentinel values
c. Use unrolling
d. Reduce work inside loops
8. Which of the following is a delegate that defines the signature to use for an event handlers that responds when an item is deleted from the cache?
- a. CacheItemRemovedReason
- b. RemovedCallBack
c. onRemoveCallback
d. CacheItemRemovedCallback
9. Mike is working as a software developer. He needs to use VTune to collect data for a specific performance counter. In addition, he wants to analyze the performance of the system during run time to identify system related performance issues. He then needs to optimize the application based on the information in the tuning advice report. What should Mike do to perform the required task?
- a. invoke Tuning Assistant for event based sampling results
- b. invoke Tuning Assistant for Call graph result
c. invoke Tuning Assistant for time based sampling results
d. invoke Tuning Assistant for Counter monitor based advice
10. Henry needs to optimize the memory operations and system calls for a web application. This application is a static web page that accepts and displays information about the products and services of a company. This information is stored in a database. Which of the following options states the best solution to optimize the application?
a. He needs to reduce the number of floating point operations and load data into the memory before executing instructions, so that the process need not wait for data.
- b. He needs to write code that accesses memory sequentially and built custom routines for accessing operating system services.
- c. He needs to use large data structure
d. He needs to identify the floating point operations and build custom routines so that the process need not wait for data.
11. Which feature of Tuning Assistant mentions about the applications that were running when VTune performance analyzer was profiling the system?
- a. Advice
- b. Workload
c. Relevance Scale
- d. Insight
12. The following code gives error when it is being executed?
DateTime dtmStart=DateTime.Now;
if(!System.Diagnostics.EventLog.SourceExists(“LoadTime_Suvey”))
{
System.Diagnostics.EventLog.CreateEventSource(“LoadTime_Survey”,”RedSky_Shopping”);
}
System.Diagnostics.EventLog.WriteEntry(“RedSky_Shopping”,”dtmStart.ToString());
Write the correct code for the above mentioned code.
Answer:-
DateTime dtmStart=DateTime.Now;
if(!System.Diagnostics.EventLog.SourceExists(“LoadTime_Suvey”))
{
System.Diagnostics.EventLog.CreateEventSource(“LoadTime_Survey”,”RedSky_Shopping”);
}
System.Diagnostics.EventLog.WriteEntry(“LoadTime_Suvey”,”dtmStart.ToString());
13. Jim is analyzing an application which is a web page developed using ASP.NET. The application is located on the remote server, which has windows 2000 Server operating system and Intel P4 processor. Suggest a feasible action for Jim to optimize the application running on the server.
- a. He needs to copy the application to his computer and then optimize the source code.
- b. He needs to launch the application in interactive mode on his local computer.
c. He needs to analyze the performance of the remote application on the remote system using VTune performance analyzer.
- d. He needs to analyze the system level performance of the server.
- 14. How does the copy web tool make sure that on the local and remote sites are up to date?
- a. By deploying the sites
b. By synchronizing the sites
- c. By copying the new files in place of old files
d. By publishing the sites
15. Why is Application optimization used? Select the best answer.
- a. To make the best use of available resources and as an alternative to upgrading hardware resources
b. To obtain error free results and as an alternative to upgrading hardware resources.
- c. As an alternative to upgrading hardware resources.
d. To debug the application and as an alternative to upgrading hardware resources.
16. Sam has developed an application in C# whose performance needs to be analyzed using the sampling feature of VTune. Sam decides to use the Over Time view for gathering information related to the application. Which of the following option sam will not be able to view?
- Context switching
- Thread interaction
- Processor Utilization
Function Calling sequence
0 comments:
Post a Comment