jueves, 23 de febrero de 2012

Processes and Concurrency - high degree of parallelism

A process is an abstraction of a running program, consisting of executable code, a data section containing global variables, a stack or pile section containing temporary data, such assubroutine parameters, return addresses andtemporary variables , and the state of processor registers. The program corresponds to a passive entity, whereas the process corresponds to an active entity.

In multiprogrammed systems, time-sharingoperating on a computer with a processorproduces the phenomenon known as concurrentprocessing. This phenomenon, is that the CPUswitches the execution of processes in fixed portions of time, this phenomenon is known as Seudoparalelismo, in the sense that in the eyesof the users own processes, the execution ofparallel processes is , this illusion is caused bythe fixed time system that assigns each of the processes is very small and therefore difficult to be perceived by man. When the computer system is equipped with multiple processors, then he can make what is called parallelprocessing, this implies that parallelism is a form of computing in which many calculations can be performed simultaneously, based on the principle of dividing big problems for get severalsmall problems, which are then solved in parallel.There are several different types of parallelism:bit level, education level, and task data.

The concurrency includes a large number of design issues, including inter-process communication, comparison and competition for resources, synchronization of the execution of several processes and allocation of processor time to processes and is essential for there designs as Multiprogramming, multithreaded and distributed process.

Processes are concurrent if exist simultaneously.When two or more processes arrive while running, it is said that there has been a concurrent processes. It is noteworthy that for two or more processes are competing, they must have some relation between them The crowd can be in three different contexts:
  • Multiple Applications: The multiprogramming was created to allow the processor time the machine was shared dynamically between multiple jobs or active applications.
  • Structured Applications: As an extension of the principles of modular design and structured programming, some applications can be implemented effectively as a set of concurrent processes.
  • Structure of the operating system: The same advantages apply to structuring systems programmers and has been shown that some operating systems are implemented as a set of processes. There are three computer models that can run the concurrent processes:
  • Multiprogramming with a single processor. The operating system is responsible for distributing to go processor time between processes, inserting the execution thereof to thereby give an appearance of simultaneous execution.
  • Multiprocessor. It is a machine consisting of a set of processors sharing main memory. In such architectures, concurrent processes can not only insert their implementation but also superimposed.
  • Multicomputadora. Is a distributed memory machine, which is formed by a series of computers. In this type of architecture is also possible the simultaneous execution of processes on different processors.

Provides application development by allowing them to be structured as a set of processes that cooperate to achieve a common goal.
Speeds up the calculations. If you want a task to run faster, so you can do is break it down into processes, each of which runs in parallel with others.
It enables the interactive use multiple users working simultaneously.
Allows better use of resources, especially CPU, they can take advantage of input-output stages of a process to perform other processing stages.
  • Starvation, and termination
  • Occurrence of locks
  • That two or more processes require the same resource
  • types of concurrent processes.
  • Processes running concurrently in a system can be classified as:
  • Separate process: It is one that runs without requiring the assistance or cooperation from other processes. A clear example of independent processes are the different shells that run simultaneously on a system.
Processes are cooperating: Those that are designed to work together in an activity, for whatmust be able to communicate and interact withthem.

The three basic states are:
1. Running: The process is using the CPU, the instructions are being executed.
2. Ready: The process is able to run but is waiting to be assigned CPU time.
3. Blocked: Process is waiting for an external event occurs (such as completion of an I / S).

The process can take any of the aforementioned states and the transition from one to another state is explained. The following are the possible transitions:
1. Running - Blocked: A process moves fromimplementation to execute a lock when itinvolves waiting for an event, for example, you expect to happen efectivamnete I / S, wait for the activation of a traffic light, etc..
2. Implementation - Done: A process ofexecution passes ready, when you run out oftime allocated by the process scheduler of the system at this time the system must allocate the processor to another process.
3. Ready - Implementation: A process moves from ready to run when the system gives CPUtime.
4. Locked - Ready: A process moves fromblocked to ready when the event happensoutside waiting.

1 comentario: