Subscribe by Email


Showing posts with label Sequential. Show all posts
Showing posts with label Sequential. Show all posts

Friday, May 17, 2013

Define a process? What are sequential and concurrent processes?


- Each and every task which we order our computer to carry out is accomplished by a set of processes. 
- It is these processes that actually run the program. 
- A process can be defined as an instance of the program that is currently being executed. 
- A program’s current activity and the code being executed are stored in the process itself. 
- However, it depends on the operating system that the process is to constitute of multiple threads for a concurrent execution or just one thread for sequential execution. 

This gives rise to two different types of processes namely:

Sequential processes 
Sequential processes can be executed on the same processor but the concurrent processors however may sometimes require more than one processor.

Concurrent processes
Concurrent processes are executed in parallel to each other and at the same whereas the sequential processes go step by step executing one instruction at a time. 

Concepts of Process

- A computer program can be defined as a set of passive instructions. When these instructions are actually executed, they form a process. 
- The same program may have a number of processes associated with it. 
- Multiple processes can be executed by sharing the processors and the resources. 
- If this is done, it is called multitasking. 
- Each processor takes up a single task. 
- With multitasking, switching between the different tasks becomes possible for the processor and so the processes won’t have to wait for long. 
- However, it depends entirely on the operating system when the switch has to be performed:
  1. When the task is performing I/O operations or
  2. When the task itself indicates that it can now be switched or
  3. On hardware interrupts.
- Time sharing is a common type of multitasking and allows interactive user applications to response quickly. 
- In systems using the time sharing systems, switching is done quite rapidly. 
- This gives an illusion of the simultaneous execution of the multiple processes by the same processor. 
- Such type of execution is termed as concurrency.
- Direct communication that may take place between independent processes is avoided by many of the modern operating systems for the reasons of maintaining reliability and security. 
- The inter-process communication functionality is kept under strict control and mediation. 
- In general, the following resources are said to constitute a process:
Ø  Executable machine code’s image associated with the task.
Ø  Some part of virtual memory that is inclusive of the process specific data, executable code, heap and a call stack. Heap is for holding the immediate data generated during the execution and the call stack is for keeping a track of the subroutines.
Ø OS descriptors belonging to the resources that were allocated to the processes. These descriptors may be data sources, sinks and file descriptors etc.
Ø  Security attributes including the set of permissions for the process and the owner of the process.
Ø  Processor state like physical memory addressing or register contents etc. registers store the state during the execution of the process or otherwise it is stored in memory.

- Most of this information is held in the process control blocks regarding the active processes. 
- The operating system makes it a point to maintain a separation between its resources and allocate them the requested resources so that they won’t interfere with the working of each other and thus won’t cause any system failures such as thrashing or deadlocks. 
- But processes do require communicating with each other. 
- For such cases to make interaction safe, operating system has mechanisms especially for the inter-process communication.




Thursday, January 19, 2012

What are merits and demerits of sequential test approach?

Each and every development process in this world follows a sequential approach for its development. Similarly software development is carried out with a sequential approach.
A software development plan is called system development methodology or software development methodology.

- It can be defined as a frame work that is used to plan, structure and control the whole process of development of information software or system.

- The sequential approach is followed in every aspect of software engineering whether it be development or testing to keep the development systematic and on track.

Sequential approach to testing has got both merits and demerits.
As sequential approach to testing is followed in which testing is seen as flowing steadily downwards through the phases or levels of different and various kinds of testing like performance testing, unit testing, integration testing, alpha testing, beta testing etc. the sequential approach to testing is based on certain principles which have been stated below:

- Testing plan is divided in to sequential phases. Some splash back and over lapping is accepted between any two phases of testing to a certain extent.

- More emphasis is on testing, deadlines or target dates, time schedules, implementation and budget of an entire software or system at one time.

- A very control is kept over the testing of a software system or application via extensive formal reviews and documentation, approval by the client or the customer and users.

- Control is also maintained over information technology management which is done mostly at the end of most of the phases before the beginning of a phase of testing.

Though, Sequential approach is a traditional approach to development in software engineering, it has been badly blamed for several large scale software projects over time, over budget and some times for failures in timed delivery.

- This basically happens due to big design up front approach.

- At other times this approach has been superseded by more versatile and flexible methodologies developed especially for development of software system or applications.

- This sequential testing approach is frequently used in software processes of software development.

The whole software development progress is seen flowing steadily downwards through the following phases:
- Phase of requirements specifications
- Phase of conception
- Phase of initiation
- Phase of analysis
- Phase of designing
- Phase of construction
- Phase of coding
- Phase of integration
- Phase of testing
- Phase of debugging
- Phase of validation
- Phase of production
- Phase of implementation
- Phase of installation and
- Phase of maintenance

This sequential approach basically originated in construction and manufacturing industries. This hardware oriented model or sequential approach to development was simply adopted for the development of software systems or applications also.

- While following a sequential approach it should be made sure that before moving on to the next phase, the preceding phase is perfectly completed.

- However some cases may include some slight variations.

- It’s been a observed fact that time spent in early phases of the software development process has great benefits.

- A bug or an error found in early levels of testing cost less as compared to those found in later stages of development.

- It also requires less efforts and time to repair or fix.

- If a program design or structure after development turns out to be impossible to implement than it will be a complete waste of efforts and time.

- It is easier to fix the errors and bugs in the early stages than to realize later that all the work done is of no use.

Thus following a sequential approach makes sure each and every step is 100 percent perfect and the testing process can be carried on further.


Friday, February 18, 2011

Component Level Design - Designing Class based Components - Cohesion

Cohesion in context with component level design refers that a component or class encapsulates only attributes and operations that are closely related to each other and to the class or component itself.

TYPES OF COHESION


Functional
It is exhibited mainly by operations. This type of cohesion occurs when a module performs one and only one computation and then returns a result.
Layer
It is exhibited by packages, components, and classes. This type of cohesion occurs when a higher layer accesses the services of a lower layer, but lower layers do not access higher layers.
Temporal
Operations that are performed to reflect a specific behavior or state.
Procedural
Components and operations are grouped together. It allows one to be invoked immediately after preceding one was invoked. It is done even if there is no data is passed between them.
Communicational
Operation on same data are defined in one class. Classes and components that exhibit functional, layer, and communicational cohesion are easy to implement, test and maintain.
Sequential
Components and operations are grouped in such a manner that the first one provides input to the second one and so on.
Utility
Components, classes, or operations exist in the same category but are otherwise unrelated are grouped together. This type is less used.


Facebook activity