Subscribe by Email


Showing posts with label Call. Show all posts
Showing posts with label Call. Show all posts

Wednesday, May 15, 2013

Define a system call? List the different types of the system calls?


- A program can request for services from the kernel of the operating system through a system call. 
- These services include all the following:
  1. Hardware related services such as data access from the HDD.
  2. Creation and execution of processes
  3. Communication with integral services of the kernel such as scheduling.
- An essential interface is provided by the system call that lies between the operating system and the process. 
- The modern microprocessor architecture consists of a security model specifying multiple levels of privileges for the execution of the software. 
- For example, a program has limitations of its own address space so even by accident it does not modify or access the programs that are executing or the OS. 
- This way the direct manipulation of the hardware devices (such as the network devices and frame buffer etc.) by the program will also be avoided. 
However, this is not the only case.
- There are situations where the programs really need access to these devices. - This is why the system calls are made available to the programs. 
- System calls ensure that such operations are safely implemented and are well defined. 
- The level at which the operating system executes is the highest privilege level.
- Therefore, the applications requests for the devices to the operating system through the system calls. 
- The execution of the system calls is carried out through the interrupts that would automatically put the CPU at the required level of the privilege. 
- After this, the control is passed on to the kernel. 
- From here the kernel determines whether or not the requested service should be granted to the calling program. 
- If the program is granted the service it requested, a specific instruction set is executed by the kernel which cannot be directly controlled by the calling program.
- These instructions return the privilege level down to that of the program that invoked the call. 
- Finally, the control is returned to the calling program.
- Generally, an API or a library is provided between the operating system and the normal programs. 
- The purpose of this library is to provide wrapper functions for the calls. 
- The names of these functions are same as that of the system calls. 
- The purpose of these functions is to expose a subroutine through which the system call can be used.
- These functions also provide modularity to the system call. 
- But above all, the primary function of the wrapper is placing the arguments in their proper processor registers that are to be passed on to the system call.
- A unique system call number is set that will be called by the kernel. 
- In this way, the portability is increased by the help of this library.
- Making direct system calls in the code of the application is very difficult and so requires embedded assembly code.
- In systems based up on ex-kernel, library is as important as the intermediary as they provide resource management, abstractions and shields the application from a low level kernel. 
- A control transfer involving features specific to the architecture is required for the implementation of the system call. 
- A way of implementing this is by using a software trap. 
- RISC processors can only use the implementation technique via interrupts. 
But there are some other additional techniques for processors with CISC architectures. 
- One example is of the following two sets developed independently by Intel and AMD respectively for serving the same purpose:
SYSRET/ SYSEXIT
SYSCALL/ SYSENTER
- These were actually control transfer instructions and very fast indeed. 


Wednesday, September 12, 2012

How will you call from one action to another action in QTP?


In the test scripts produced with the help of quick test professional, one action can be called from another action. In this article we are going to discuss the same i.e., how this can be done? 

How to call from one action to another action?

- A call to a reusable action can be inserted easily that might be stored in some local test (current test) or in some external test (external test). 
- Calling one action from some other action is just like inserting an action call in an existing action or just linking it to it.
- The steps involved in this whole process can be viewed using the action view tool but they cannot be modified. 
- The local object repository of the action that has been called is read only. 
- It is not necessary that each and every calling and called action must have a local object repository. 
- It may or may not have a repository.
- If the external action that has been called has some data in the data table, you get two options:
  1. Either you take the data from the data sheet of the action and import it as a editable or local copy,
  2. Or you take the data from the original action but here the data is read only type.
- The data obtained from the global data sheet of the action that has been called is imported to the test as an editable and local copy of data.
- In order to modify an existing external action you need to open the particular test where you have the action stored and make modifications there itself. 
These modifications will be visible in all the tests that will call that particular function. 
- If you choose to go for the second option as mentioned above then the changes that you will make will apply to original data as well. 

Step by step procedure of how a call to an action can be inserted?

  1. Go to insert menu, the select the “call to existing action” option and you will be provided with a list of actions. From that select “insert call to existing action” or you can also right click on any of the steps. The go for the action button and then click on “insert call to existing” option. Now a action properties dialog box pops up.
  2. There is a browse button called “from test” and can be used to find the test that holds the action to be called. All the reusable actions in the test that you select are displayed in this action box.
  3. From the action that is displayed select the action that is to be called and its type as well as description both are displayed if available. This type and description help you further in proper identification of the action that you wish to be called.  You can even set other properties of the actions by going to the “setting general action properties”.
  4. Now you are done with setting the properties, decide on where the function has to be inserted. For inserting the function you are provided with two options namely:
a)   After the current step or
b)   At the end of the test
There is one thing to be noted which is that if the step that is in current selection is a reusable action from some another test, then the action call is added at the end of the test automatically.
  1. Now the last step is to just clock on the OK button and you have your action inserted. This action can be moved to any other desired location by just dragging it to that position.


Facebook activity