Welcome to graduate2professional.blogspot.com

Sunday, June 24, 2012

What does a Profiler do?

Profiler:
You can analyze the application execution on the target device or Emulator using the Profiler tool.
 The Profiler calculates the application method call count and execution time, and determines the code fragments that take the maximum time to execute.


Recording of summary information during execution
Inclusive, exclusive time, # calls, hardware statistics,
– Reflects performance behavior of program entities
• Functions, loops, basic blocks
• User-defined “semantic” entities
– Very good for low-cost performance assessment
– Helps to expose performance bottlenecks and hotspots


– Implemented through
• Sampling: periodic OS interrupts or hardware counter traps
• Instrumentation: direct insertion of measurement code


This information further helps you to optimize your application code by identifying the bottlenecks in the code blocks.


To use this function, compile the source with debugging enabled so that the source is put into the executable:
gcc example1.c -g -pg -o example1 -O2 –lc
Re-run the application as before:
./example1 50000
Your gprof command is now:
gprof example1 gmon.out -A

Aggregation VS Composition


Aggregation differs from ordinary composition in that it does not imply ownership.
In composition, when the owning object is destroyed, so are the contained objects.
In composition, the objects have a “has -a relationship” to each other.
In aggregation, this is not necessarily true since there is no ownership between the objects.

For example, a university owns various departments (e.g., chemistry), and each department has a number of professors. If the university closes, the departments will no longer exist, but the professors in those departments will continue to exist. Therefore, a University can be seen as a composition of departments, whereas departments have an aggregation of professors. In addition, a Professor could work in more than one department, but a department could not be part of more than one university.

Monday, May 14, 2012

What is the difference between TFTP and FTP application layer protocols?


The Trivial File Transfer Protocol (TFTP) allows a local host to obtain files from a remote host but does not provide reliability or security. It uses the fundamental packet delivery services offered by UDP.
           
The File Transfer Protocol (FTP) is the standard mechanism provided by TCP / IP for copying a file from one host to another. It uses the services offer by TCP and so is reliable and secure. It establishes two connections (virtual circuits) between the hosts, one for data transfer and another for control information.

What is difference between ARP and RARP?


The address resolution protocol (ARP) is used to associate the 32 bit IP address with the 48 bit physical address, used by a host or a router to find the physical address of another host on its network by sending a ARP query packet that includes the IP address of the receiver.

The reverse address resolution protocol (RARP) allows a host to discover its Internet address when it knows only its physical address.