# I. Introduction mong the many disciplines of computer science, parallel processing is a discipline that deals with system structure and software processes related to the contingency performance of computer programs. It has been an area of active research interest and application for many fields, mainly the focus on powerful processing, but is now growing as the frequent processing model due to the semiconductor industry's move to multi-core processor chips. Typically, software has been programmed for sequential computation, i.e., to be run on just one computer having just one main processing unit; where Instructions are implemented one after another, a problem is divided into distinct sequence of guidelines and only one instruction is executed at any instant. Although simple and economical serial computing is far much slower as compared to parallel computing. In essence, parallel computing is the simultaneous use of more than one processor or computer to solve a problem. Problems are run on multiple processors where each problem is broken into discrete parts which are further broken down into series of instructions to be executed simultaneously on different processors. In the recent days, parallel computing has become popular based on multi-core processor chips. Most desktop computer and laptop computer systems are now delivered with dual-core micro-processors with quad-core processor chips which becomes easily available. Processor producers have started to increase overall computing performance by including additional CPU cores to provide the maximum parallelism in a program. The reason is that improving performance through parallel computing can be far more energyefficient than improving micro-processor time wavelengths. In a world which is progressively mobile and energy aware, this has become essential. # II. # Parallel computing Parallel computing is an outline of computation in which many data operations functions are carried out simultaneously [1]. Parallel computing takes four different forms: The first one is data parallelism / loop-level parallelism. In this computational form, a single thread controls all the data operations and in other situations, multiple threads control the execution, but they execute the same code. Second is Instruction level parallelism where instructions can be re-ordered and then, they are combined into groups and executed in parallel without affecting the result of the program [2]. The third form is task parallelism which is in contrast with data parallelism where the processor executes different threads in same or different sets of data. It focuses on allocating the processes on different parallel computing nodes. Task parallelism does not generally changes with the size of a problem [2]. The last form of parallel computation is bit level parallelism in which processors have to execute an operation on variables whose sizes are larger than the size of word. Parallel computing has some advantages that make it attractive for certain types of problems that are suitable for use of multiprocessors, especially given limited computer memory, provides concurrency, saves money -Parallel computing resources can be built from cheap commodity components as shown in the figure 1, uses resources from a wide area network and saving time -Allocating more resources for a task shortens, it's time for completion with potential cost savings. Conversely, parallel programming has also some disadvantages. By increasing the processors, memory in parallel computers, hence, produces a lot of data (I/O) and require parallel file system, need more space and more power, which leads to load imbalance. Parallel computer programs are more difficult to write than sequential ones, [7] because concurrency introduces several new classes of potential software bugs, of which race conditions are the most common. Communication and synchronization between the different subtasks are typically some of the greatest obstacles to getting good parallel program performance. # III. Association with Grid Framework Grid computing combines computers from multiple administrative domains to solve a single task [4]. The grid can be thought of as a distributed system with non-interactive workloads that involve a large number of files. Grid computing tends to be more loosely coupled, heterogeneous and geographically dispersed [4]. On a single-processing machine, testing one model can take as long as five days. Using grid framework, the model can be distributed into different number of processing segments, each of which goes to its own processor; a task that normally takes five days can be completed in several hours. # IV. Comparison of Grids and Conventional Supercomputers Distributed or grid computing in general is a special type of parallel computing that relies on complete computers resources (with onboard CPU's, storage, power supplies, network interfaces, etc.) connected to a network (private, public or the Internet) by a conventional network interface, such as Ethernet. This is in contrast to the traditional notion of a supercomputer, which has many processors connected by a local high-speed computer bus [6]. The size of a grid may vary from small network of workstations within a corporation to large public collaborations across many companies and networks. The notion of a confined grid may also be known as intra-nodes cooperation whilst the notion of a larger, wider grid may thus, refer to internodes cooperation [7]. The primary advantage of distributed computing is that each node can be purchased as commodity hardware, which, when combined, can produce a similar computing resource as multiprocessor supercomputer, but at a lower cost. The primary performance disadvantage is that the various processors and local storage areas do not have high-speed connections. This arrangement is thus well-suited to applications in which multiple parallel computations can take place independently, without the need to communicate intermediate results between processors [8]. V. # Simulation of Resource Optimization The purpose of this research work is to develop an algorithm for the resource optimization of job scheduling in a grid framework and shows that parallel execution is efficient in terms of time, speed and throughput. In addition to total time taken to execute all jobs, we will also calculate the CPU's usage efficiency using the following equation: ???????????????????? = ? ???????????????? ???? ?????? ?? ???????????? ???? ???????? ??=1 ?????????? ???????????? ???? ???????? × ???????? ?????? 1 ?????? × 100% The proposed application consists of 3 different classes: 1. Main Class: It contains a method that is being executed at program startup. The main flow occurs in this method. 2. Processor Class: This class contains methods to assign a job, check whether processor is free and ready for the next job and to calculate the amount of time it was busy. 3. Scheduler Class: It assigns jobs to the processors using the Round Robin scheduling. When a job needs to be assigned to the CPU, scheduler searches for the free processor and assigns the job to it. If at some moment, all CPUs are busy, it waits until one of the processors becomes free. # VI. Algorithm to Compute the Efficiency of Job Scheduling in Grid Framework Step 1. Read one line of data from the input file: i. Test serial number ii. Number of jobs iii. Number of processors. Step 2. Create an array of instances of the Processor class. Create Job scheduler instance. Step 3. Run Job Scheduler. Step 4. When work is finished (all jobs have been executed); and calculate the results (time taken). Step 5. Write results to the output file. Step 6. Go to step no. 1) unless input file is fully processed. # VII. Simulation Results and Discussions In order to compare serial and parallel implementations, a few series of test has been performed. For a fixed number of CPU's (2, 5, 10, 20, 30, 40, 50 in different series of tests), we ran 200 tests with different number of Jobs (5, 10, 15, etc up to 1000). The input file is a simple text file that can be created in any text editor as shown in figure 1. Each line of this file should consist of 3 values separated by pipes ("|"). First value is a string that is a serial number of the test, second value is an integer that is number of jobs and third value is an integer that is number of processors. Test Case 1: Table 1 shows the execution time (in microseconds) taken by the processors in serial and parallel computation and efficiency of the system for the 5 CPU's. Test Case 2: Table 2 shows the execution time taken by the processors in serial and parallel computation and efficiency of the system for 10 CPU's. The graph 3 depicts the relationship between the number of jobs and the execution time estimation for the test case 2 (number of CPU's = 10) and graph 4 shows the efficiency vs. number of jobs in terms of the time and resources. # Jobs # Jobs # Graph No. 3 Graph No. 4 Test Case 3: Table 3 shows the execution time taken by the processors in serial and parallel computation and efficiency of the system for 20 CPU's. # Jobs # Discussion and Conclusion After analyzing the generated results, it has been concluded that parallel execution is very efficient in terms of execution time and resources. Parallel execution on N processors is almost N times faster than serial execution. It's not exactly N times faster because of the job scheduler that needs some time to delegate tasks to the processors available. For large number of tasks, it approaches to 98% and 2% is that time when CPU's are unused waiting for a task from the job scheduler. For a fixed number of jobs, when we are increasing the number of processors, the efficiency will be decreasing as depicts by graph no. 7, because when all processors are busy all the time; efficiency will be equal to 100%. When some of the processors were free (without a job assigned) some of the time, efficiency will be less than 100%. As multi-core processors bring parallel computing to mainstream customers, the key challenge in computing today is to transition the software industry to parallel programming. Future capabilities such as photorealistic graphics, computational perception and machine learning rely heavily on highly parallel algorithms. Enabling these capabilities will advance a new generation of experiences that will expand the scope and efficiency of what users can accomplish in their digital lifestyles and work place. These experiences include more natural, immersive and increasingly multisensory interactions that offer multi-dimensional richness and context awareness. # Execution Time # Number of Jobs 1![Figure 1 : Parallel Computing Cluster [3]](image-2.png "Figure 1 :") 1![Figure 1 : Input File](image-3.png "Figure 1 :") 22![Figure 2 shows the output file of the developed simulator, in this, each row consists of 5 columns separated by pipe char ("|"): Sr. N. | Number of Input Jobs | Number of Processors | Time Taken | Execution Type (Serial / Parallel)](image-4.png "Figure 2 Figure 2 :") 5![The graph 1 depicts the relationship between the no. of jobs & the execution time estimation for the test case 1 (number of CPU's = 5) and graph 2 shows the efficiency vs. no. of jobs in terms of the time & resources.](image-5.png "CPU = 5 )") 1Time(In Microseconds)SerialParallelEfficiency550010595.2410100020697.0915150030797.7220200040898.0425250050998.23505000101498.6210010000202498.8115015000303498.8820020000404498.9125025000505498.93500500001010498.97750750001515498.9810001000002020498.99 3CPU = 20) 4shows the efficiency for differentnumber of CPU's for a given set of jobs executed in thegrid framework.JobsEfficiency5 CPU10 CPU20 CPU595.2447.6223.811097.0990.9145.451597.7272.8265.222098.0494.7983.332598.2381.4360.685098.6297.2880.1310098.8198.1495.4215098.8898.4391.820098.9198.5797.1825098.9398.6694.5550098.9798.8398.2775098.9898.8997.48100098.9998.9298.64 4CPU's © 2012 Global Journals Inc. (US)Global Journal of Computer Science and Technology © 2012 Global Journals Inc. (US) * Highly parallel computing AlmasiA GGottlieb Benjamin-Cummings Publishing Co USA ©1989, ISBN * Parallel computer architecture DavidCuller J 1997 Morgan Kaufmann Publishing Inc 15 San Fancisco * Pervasive and Artificial Intelligence Group publications Diuf.unifr.ch 2010 * Grid Computing: Making the global infrastructure a reality FBerman JG HAnthony GeoffreyC 2003 * The Landscape of Parallel Computing Research: A View from Berkeley KrsteAsanovic No. UCB/EECS-2006-183 2006 University of California, Berkeley Technical Report * Parallel Computing Research at Illinois: The UPCRC Agenda SVAdve 2008 Urbana University of Illinois Parallel@Illinois * Introduction to Parallel Computing BlaiseBarney 2007 Lawrence Livermore National Laboratory * Operating Systems Internals and Design Principles WilliamStallings 2004 Prentice Hall fifth international edition * Computer organization and design : the hardware/software interface (2 JohnLHennessy DavidAPatterson JamesRLarus 1999 San Francisco 3rd print. ed. * Computer architecture / a quantitative approach JohnLHennessy DavidAPatterson 2002 43 San Francisco, Calif.: International Thomson * Analysis of Programs for Parallel Processing AJBernstein DOI: 10.1109/ PGEC. 1966.264565 IEEE Transactions on Electronic Computers EC 15 5 1966 * Parallel processing and parallel algorithms: theory and computation Roosta HSeyed 2000 New York, Springer