Subscribe by Email


Showing posts with label Current. Show all posts
Showing posts with label Current. Show all posts

Sunday, June 23, 2013

Explain the various File Operations

A number of operations can be carried out on a file. However, there are 6 basic file operations. As we know a file is an ADT or abstract data type. Certain operations need to be considered for defining a file. Operating systems makes calls to these operations. 

Following are the six basic operations:

1. Creation of a file: 
- This operation involves two steps. 
- Firstly, a sufficient space has to be found for storing the file in the file system. - Secondly, for this new file an entry should be made in the directory.

2. Writing to a file: 
- For writing data to a file, a system call has to be made with name and the data to be written as its arguments. 
- A writer pointer is kept by the system at the location in the file where the next write operation is to be carried out. 
- This pointer is updated whenever a write operation occurs.

3. Reading from a file: 
- Just like the write operation, in order to read information from a file, a system call has to be generated along with the name of the file and the location of the content to be read as its arguments. 
- Here, instead of a write pointer there is a read pointer that will indicate the location where the next read operation is to take place. 
- The location at which the current operation is being carried out is kept as a “per – process current – file – position” pointer since the process is either writing to or reading from the file. 
- The same pointer can be used by both the read and write operations in order to reduce the complexity of the system as well as for saving space.

4. Re-positioning within a file: 
- System carries out search in the directory looking for the appropriate entry. 
- When found, the current file position pointer is re-pointed to this position. 
- This file operation does not require carrying out any input or output operation in actual. 
- Another name for this file operation is the file seek.

5. Deletion of a file: 
- For deletion of the file, the system searches through the directory to find the appropriate entry. 
- When found, the space held by this file is released and the entry in the directory is destroyed so that this space can be reused by other files.  

6. Truncating a file: 
- Sometimes you may require deleting only the contents of a file while keeping it attributes. 
- Deleting the file and recreating it is not an efficient solution. 
- This file operation lets you to erase the contents of the file but save its attributes.
- But here the length attribute of the file will be changed to zero after truncation. 
- The file space is released after truncating.


The above mentioned six basic file operations constitute the minimal file operations set. These operations are primary ones and if combined can perform some other secondary file operations such as copying. A table known as the open file table is maintained by the operating system that stores all the information about the files that are currently open. When the file is closed, its entry is deleted from the open file table. Some files have to be opened explicitly with the function open() before using it. The name of the file is passed as an argument to this function. Then it looks in the directory for this file and an entry is made in the open file table.  Each file has some access rights. It is in these access modes that a process uses the file. A process can perform only those operations which are permitted by the access rights of the file. 


Monday, May 6, 2013

What is a Safe State and what is its use in deadlock avoidance?


Safe state plays a great role in avoiding the deadlocks. In this article we discuss in detail the concept of this safe state.
When do we call a state safe?
It is when even if the system allocates resources to all the processes and no deadlock occurs. This allocation is to the maximum limits and can be done in any preferred order. To put it down more formally, we can say that a system is considered to be in a safe state only if a safe sequence exists. This would become clearer from the following example:

Consider the following sequence of processes:

- Now this sequence is considered to be a safe one for the current state of the allocation if the resource requests made by each of the processes Pi can be satisfied by resources that are currently available including the resources held by some another process that precedes Pi.
- In this case, if the resources required by the Pi are not presently available, then it can wait till the preceding process completes its executions and releases the resources.
- Once it finishes, the resources it held, now can be utilized by the Pi for completing the task assigned to it and then it also releases back the resources to be used by succeeding processes.
- It then finally terminates.
- If there exists no sequence like this, then the system is said to be in an unsafe state.
- A deadlock cannot occur in a safe state and so this state cannot be called a deadlocked one. 
- But on the other side, a state is unsafe if it has a deadlock.
- However, it is not necessary that the reason for all states being unsafe is the deadlock.
- An unsafe state can however lead to a deadlock. 
- It is in the safe states, that the operating system is capable of avoiding the deadlocks.
- When the operating system falls in an unsafe state, it is no more in a position to prevent the requests of the processes that would cause a deadlock to occur.
- It is the behavior of the processes by which the unsafe states of the system are controlled.
- Another major difference between the safe and the unsafe states is that in a safe state it is guaranteed by the operating system that the execution of the processes will be completed in expected time but in the case of unsafe states it gives no such guarantee.
- If the concept of the safe state is predefined, then algorithms can be designed that would make sure that no deadlocks occur.
- The idea behind these algorithms would be to ensure the following things:
1. The system does not come out of the safe state.
2. The system is kept in a safe state initially.
3. The system must be able to determine if a resource requested by a process can be allocated immediately to it or it requires waiting.
4. The system grants the request of the process if and only if after finishing it, the system would still be in a safe state.

- One disadvantage of such algorithms is low resource utilization. It is because the process would still have to wait for the resource even if it is available.
- A deadlock occurs when two or more processes that are competing with one another to wait for each other to finish and neither of them do so.
- The deadlock which involves only two processes is called a deadly embrace.
- This may also occur if one process is waiting for the other to finish which in turn is waiting for some other process to finish and so on.


Thursday, October 4, 2012

Explain the check points in QTP? In how many ways we can add check points to an application using QTP?


Check points in quick test professional have always proved to be an efficient tool. In this article, we discuss exclusively about the check points in quick test professional and the ways in which the check points can be added to an application with the help of quick test professional. 

What is Check Point? How it is added to an application?

- Check point can be thought of as a point to confirm or verify whether the application under test or AUT is working properly or not. 
- This is verified by making comparisons between the current value of some property and the expected value of the same property decided earlier. 
- Whenever a check point is added by the user, an equivalent check point is added by the quick test professional to the present row in the key word view as well as a “check check point” statement is added to the expert view. 
- The name of the test object also serves as a name for the check point that has been added to it. 
- The check points can be added via an active screen by placing the cursor on the desired location and clicking the insert standard check point option. 


Types of Check Points

It is on the basis of this expected value that the check points have been classified in to various types as described below:

1. Page check point: 
- This check point is the check point that is created exclusively for a web page. - This check point keeps a count of all the images and links present on that particular web page. 
- Another purpose for which page check point is used for checking the time taken by the web page to load fully i.e., the load time.

2. Bitmap check point: 
- This check point is the check point that helps in checking of the bitmap of either a full web page or an image. 
- Two images are provided to this check point, one the actual image and the other one expected image. 
- These two images are compared pixel by pixel by the bit map check point.

3. Image check point: 
- This check point is used for keeping a check on certain properties belonging to a web page such as the source file location of the image. 
- However, being a image check point, it cannot check pixels of an image like a bitmap check point does.

4. Text check point: 
- This check point is the check point that is employed in checking the expected text in a web application or web page. 
- This text may belong to a specific region of the text displayed or application under test.

5. Accessibility check point: 
- This check point verifies whether or not the accessibility standard of the application under test matches with the accessibility guidelines laid down by the W3C or world wide web consortium for information systems and technology which are web based.

6. Data base check point: 
- This check point performs the task of generating a query while the recording is in progress. 
- The values stored in the data base serve as expected values. 
- This query is executed during the run time to obtain the actual value which is then compared with the expected value.

7. Table check point: 
This check point is the one that is used for checking various table properties such as cell width, row width and so on.

8. XML check point: 
This check point is the one that is used to verify the following:
a)     XML schema
b)     XML data etc.



Wednesday, October 3, 2012

What is Accessibility Checkpoint in QTP?


Quick test professional has got a variety of check points to offer which are an ultimate help in the determination of the efficiency measure of the software system or application i.e., it functions correctly as expected. 

The check points accomplish this task by making comparisons between the value defined by the user that is the expected value and the current value of a particular property of the software system or application.

Quick test professional itself adds a check point statement in the expert view and a check point in the current row in key word view as well whenever a check point is added by the user.
The name of the test object to which the check point is added forms the default name for the added check point. However this default name of the check point can be changed as needed. 

Following are the check points provided by the quick test professional:
  1. Image check point
  2. Standard check point
  3. Table check point
  4. Bit map check point
  5. Accessibility check point
  6. Page check point
  7. Text check point
  8. XML check point
  9. Data base check point
Our focus is on the accessibility check point in this article. 

Accessibility Check Point

- With the help of accessibility check point, the areas of a web site or web page or web application that do pertain to the standards and web content accessibility guidelines of the W3C or world wide web consortium can be recognized. 
- In fact accessibility check points are an extended support for the web add – ins environment. 
- With the accessibility check point, it can be verified whether the software system or application is in compliance with the World Wide Web consortium. 
- World Wide Web consortium or W3C lays down the instructions as well as guide lines for information systems and technology based on web. 
- These guidelines maintain a certain standard for accessing the web and this is what that is checked by the accessibility check points. 
- The settings of an accessibility check point can be configured according to the user’s needs. 
- These accessibility guidelines have been stated by a part of the World Wide Web consortium called the web accessibility initiative. 
- If the some parts your application software or system does not matches with the accessibility standard defined by the World Wide Web consortium and need special attention to improve them, they are caught by the accessibility check points. 
- In fact, an accessibility check point does not determine whether the software system or application meets all the accessibility guidelines.
- It catches only the faulty areas of that particular application under test or AUT that need to be brought up to that standard. 
- The identification of the improper areas of the software system or application using accessibility check points is quite quick, easy and also reliable. 
- Furthermore, automatic accessibility check points are also available that you add to every page on your web site or test. 
- Also individual pages or frames can have their own set of individual accessibility check points. 
- The accessibility check points are highly customizable and can be configured according to the requirements of the tests. 
- For configuring, an accessibility check point the options are available under web option of the tools menu. 
- Check and un-check the items that you want or don’t want in your that particular accessibility check point and finalize by clicking OK. 
- The tool in the web environment has to be kept in recording mode. 
- Accessibility check points can be added automatically while the recording is in progress and can be accessed while edit very easily. 


Tuesday, March 22, 2011

Overview of The Concurrent Development Model

The concurrent development model, sometimes called concurrent engineering The concurrent process model can be represented schematically as a series of major technical activities, tasks, and their associated states.
It makes use of state charts to represents the concurrentrelationship among tasks associated within a framework of activities. It isrepresented schematically by a series of major technical tasks, and associated states. The user's need, management decisions and review results drive theover-all progression of the development.

The concurrent model is often more appropriate for system engineering projects where different engineering teams are involved. The concurrent process model defines a series of events that will trigger transitions from state to state for each of software engineering activities, actions or tasks. This generates the event analysis model correction which will trigger the analysis action from done state to awaiting changes state.

The concurrent process model is applicable to all types of software development and provides an accurate picture of the current state of a project. Rather than confining software engineering activities, actions and tasks to a sequence of events, it defines a network of activities. Each activity on the network exists simultaneously with other activities, actions or tasks. Events generated at one point in the process network trigger transitions among the states.


Facebook activity