Click here to Skip to main content
15,867,956 members
Articles / Operating Systems / Windows

CAPS: Computing Analyzer and Process Simulator

,
Rate me:
Please Sign up or sign in to vote.
4.71/5 (4 votes)
16 Oct 2013CPOL11 min read 15.9K   443   2   1
The tool Computing Analyzer and Process Simulator (CAPS) allows the user to make a dynamic presentation on various computing as well as make an analysis on the new computing with the existing one.

I. Introduction

The developed CAPS tool is a .NET application. It can run on any platform supporting .NET Framework. The developed tool Computing Analyzer and Process Simulator (CAPS) allows the user to make a dynamic presentation on various computing as well as make an analysis on the new computing with the existing one. It also allows the users to make a distributed environment and perform scheduling on number of jobs. The scheduling policy is taken into consideration as first-come, first-served (FCFS). Therefore, the main objectives of the CAPS are as follows:

  • Presentation of Computing: Presentation of Computing (PoC) allows the user to make a dynamic presentation on various computing. The user can also add new computing and then present it.
  • Analysis of Computing: Analysis of Computing (AoC) allows the user to make an analysis on various computing. The user can make an analysis on specific attributes. The user can also add new attributes for analysis, if required.
  • Simulation of Process Scheduling: Simulation of Process Scheduling (SoPS) allows the user to make a distributed environment by adding various resources i.e. processors, memories, files and devices. The user can then perform scheduling on various jobs in this distributed environment. The result of the simulation is display in a graphical representation.

II. Overview of the CAPS Tool

The proposed and developed Computing Analyzer and Process Simulator (CAPS) tool is a simulator which allows the user to make a dynamic presentation as well as analysis and making distributed environment by adding resources (such as processors, memory modules, files and devices) and then perform simulation on various processes using FCFS scheduling policy. Symmetric multiprocessor scheduling technique has been implemented in the presented CAPS tool, where all the processors have a common queue of ready processes. The hard affinity mechanism has been implemented in the developed CAPS tool where processes are restricted to migrate among processors. Once a process has been allocated to a CPU, it will complete its execution on that processor only. The load balancing in the CAPS tool is performed by checking the status of the processor before assigning a job. The job is assigned to the free processor. In the case when all the processors are busy in jobs executions then the tool calculate the waiting time for all the processors and assigns the job to the processor which have minimum waiting time. It allocates other resources using the same mechanism as the processor. The arrival time and burst time of the processes and the resource assignment to each process is manually done by the user.

III. Operations of CAPS Tool

A. The Operations of the CAPS Tool for Presentation

CAPS tool is a very simple tool which allows the user to make a dynamic presentation on various computing. The operations of CAPS to give a presentation on various computing and to add the new computing are shown in Fig. 1.

Image 1

Fig. 1: Operation for Computing Presentation

1. Open Computing

The OPEN COMPUTING menu as shown in Fig. 1 allows the user to open the existing computing for the presentation. When the user clicks on the OPEN COMPUTING submenu, a new window will be opened as shown in Fig. 2. This window displays all the existing (already added by the user) computing in the CAPS.

Image 2

Fig. 2: Open/Edit Computing

The user can select any computing for the presentation and click the OPEN button. On click of OPEN button, presentation of the selected computing will be started as shown in Fig. 3.

Image 3

Fig. 3: Presentation of Selected Computing

2. Edit Computing

The EDIT COMPUTING menu as shown in Fig. 1 allows the user to edit the existing computing. When the user clicks on the EDIT COMPUTING submenu, a new window will be opened as shown in Fig. 4.

Image 4

Fig. 4: Selected Computing for Updation

This window displays all the existing (already added by the user) computing in the CAPS. The user can select any computing for the presentation and click the OPEN button. On click of OPEN button, the slide of the selected computing will be opened as shown in Fig. 3.4. NEXT button open the next slide of the computing. PREVIOUS button opens the previous slide of the computing. FIRST and LAST button opens the first and last slide of the computing. On click of MODIFY button, the current slide will become editable and the MODIFY button changes to SAVE button. The user can make changes to the current slide and click the SAVE button. On click of the SAVE button, changes made by the user will be saved permanently and the SAVE button changes to MODIFY button again.

3. Add Computing

The ADD COMPUTING menu as shown in Fig. 1 allows the user to add the new computing for presentation. When the user clicks on the ADD COMPUTING submenu, a new window will be opened as shown in Fig. 5.

The user enters the name of the computing to be added and click the ADD button. On click of ADD button, a blank slide will be opened for the user to enter information about the newly added computing. On click of DONE button, the information entered has been saved. The user can also skip the slide to enter the information later and move to the previous slide while adding new computing on clicking SKIP button.

Image 5

Fig 5: Add Computing

Image 6

Fig 6: New Computing Added Successfully

On click of DONE button at the last slide which is the REFERENCE slide, a message box will be prompted with the message ‘COMPUTING NAME has been completed successfully’ as shown in Fig. 6. When the user clicks on the OK button of the message box, a new window will be opened as shown in Fig. 7.

This window asks from the user to enter the value of the existing attribute for the newly added computing. The user enters the attribute value and click on the DONE button. On click of the DONE button a message box will be prompted with the message ‘Attributes in COMPUTING NAME has been added successfully’ as shown in Fig. 7.

Image 7

Fig 7: Insert Newly Added Computing Attribute’s Value

4. Delete Computing

The DELETE COMPUTING menu as shown in Fig. 1 allows the user to delete the existing computing. When the user clicks on the DELETE COMPUTING submenu, a new window will be opened as shown in Fig. 8. The user selects the name of the computing to be deleted and click the DELETE button. On click of DELETE button, a message box with the message ‘COMPUTING NAME has been deleted successfully’ will be prompted and the selected computing will be deleted permanently.

Image 8

Fig. 8: Delete Computing

B. The Operations Of Caps Tool For Computing Analysis

The basic operation of CAPS to make an analysis on various computing is shown in Fig. 9. The user can select various computing and their attributes for analysis.

Image 9

Fig. 9: Operation for Computing Analysis

1. Open Comparison

The OPEN COMPARISON menu as shown in Fig. 9 allows the user to make an analysis report on different computing types. When the user clicks on the OPEN COMPARISON submenu, a new window will be opened as shown in Fig. 10.

Image 10

Fig. 10: Select Computing

This window displays all the existing computing in the CAPS. The user can select any computing type for the analysis by checking the checkbox against each computing. The user can also check the CHECK ALL checkbox to select all the computing and can check the UNCHECK ALL checkbox to unselect all the selected computing. After selection of computing, user click the DONE button. On click of DONE button a new window will be opened as shown in Fig. 11.

Image 11

Fig. 11: Select Computing Attributes

The new opened window displays all the existing attributes in the CAPS. The user can select any attributes for the analysis by checking the checkbox against each attribute. The user can also check the CHECK ALL checkbox to select all the attributes and check the UNCHECK ALL checkbox to unselect all the selected attributes. After selection of attributes, user clicks the DONE button. On click of DONE button a new window will be opened as shown in Fig. 12.

Image 12

Fig. 12: Computing Comparison Table

The new open window displayed in Fig. 12 displays the comparison among the selected computing types on selected attributes. It also has the decision making feature which find the best computing among the selected computing for analysis. The user can also export the result into an excel file by clicking the ‘Export To Excel’ button.

2. Edit Computing Attributes

The EDIT ATTRIBUTES menu as shown in Fig. 9 allows the user to edit the value of the existing attributes. When the user clicks on the EDIT ATTRIBUTES submenu, a new window will be opened as shown in Fig. 13. The user selects the attribute to be edited and click the DONE button. On click of DONE button, all the existing computing with the value of the selected attribute will be displayed. The user can edit the value of the attributes of any computing, if required. After editing, user click on the UPDATE button and a message box with the message ‘Attribute has been updated successfully’ will be prompted as shown in Fig. 13. The changed value of the attribute has been saved permanently.

Image 13

Fig. 13: Edit Computing Attributes
1.1.1 Add Computing Attributes

The ADD ATTRIBUTES menu as shown in Fig. 9 allows the user to add new attributes for the existing computing. When the user clicks on the ADD ATTRIBUTES submenu, a new window will be opened as shown in Fig. 14.

Image 14

Fig 14: Add Computing Attributes

The user enters the name of the attribute and clicks the ADD button. On click of the ADD button a message box with the message ‘Attribute has been added successfully’ will be prompted as shown in Fig. 14. On click of the OK button on the message box, all the existing computing will be displayed and ask from the user to enter the newly added attribute value. After entering the attribute value for all the existing computing when user click the DONE button, a message box with the message ‘Attributes in all computing has been added successfully’ will be prompted and the newly added attribute has been added in all existing computing permanently.

3. Delete Computing Attributes

The DELETE COMPUTING ATTRIBUTES menu as shown in Fig. 9 allows the user to delete the existing attributes. When the user clicks on the DELETE COMPUTING ATTRIBUTES submenu, a new window will be opened as shown in Fig. 15.

Image 15

Fig. 15: Delete Computing Attributes

The user selects the name of the attribute to be deleted and click the DELETE button. On click of DELETE button, a message box with the message ‘ATTRIBUTE NAME has been deleted successfully’ will be prompted and the selected attribute will be deleted permanently.

C. The Operations Of Caps Tool For Process Simulation

The basic steps required to perform simulation are as follows:

Inputs:

  • Select types of processors: User select how many and which types of processors are required to make a distributed environment and to perform simulation as shown in Fig. 16.
  • Select types of memory modules: User select how many and which types of memory modules are required to make a distributed environment and to perform simulation as shown in Fig. 16.
  • Select types of files: User select how many and which types of files are required to make a distributed environment and to perform simulation as shown in Fig. 16.
  • Image 16

    Fig. 16: Resources to Make a Distributed Environment
  • Select types of devices: User select how many and which types of devices are required to make a distributed environment and to perform simulation as shown in Fig. 16. Maximum 5 numbers of processors, memory modules, files, and devices can be added. Here user selects the processors, memory modules, files, and devices accordingly. On click of ‘Submit’ button, a new window will be opened as shown in Fig. 17.
  • Define number of processes: User defines the number of processes will be executed and assign processors, memory modules, files, and devices for each process. User can also bind each process for a particular processor, memory module, file, and device accordingly as shown in Fig. 17.
  • Set arrival time, and burst time: After defining the processes and assigning the resources, user set the arrival time and burst time for each process as shown in Fig. 17.
  • Set operation for resources: User set the operation (AND/OR) for resources memory, file and device using the button associated with each of these resources for each job as shown in Fig. 17.

Outputs:

  • Get waiting time, and turnaround time: On click of ‘Submit’ button as shown in Fig. 17, the simulator performs the FCFS scheduling and calculates the waiting time and turnaround time for each process. Finally calculates the avg. waiting time and avg. turnaround time.
  • Image 17

    Fig. 17: Scheduling Performed (getting waiting time and turnaround time)
  • Log the statistics in Excel file: On click of ‘Export To Excel’ button as shown in Fig. 17, these data (process, arrival, burst, processor, memory, file, resource, waiting, and turnaround) are exported into an Excel file.
  • Image 18

    Fig. 18: Graphical Representation of Processes Execution
  • Display the execution of processes in graph representation: On click of ‘Graph Representation’ button a new window will be opened. The new window is shown in Fig. 18, representing the execution of processes. This window represents the execution of processes. The dotted lines represent the waiting time of the processes, and the solid line represents the running/execution time of the processes.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Technical Writer KNIT, Sultanpur
India India
Dr. Neelendra Badal is an Assistant Professor in the Department of Computer Science & Engineering at Kamla Nehru Institute of Technology (KNIT), Sultanpur (U.P), INDIA. He received B.E. (1997) from Bundelkhand Institute of Technology (BIET), Jhansi in Computer Science & Engineering, M.E. (2001) in Communication, Control and Networking from Madhav Institute of Technology and Science (MITS), Gwalior and PhD (2009) in Computer Science & Engineering from Motilal Nehru National Institute of Technology (MNNIT), Allahabad. He is Chartered Engineer (CE) from Institution of Engineers (IE), India. He is a Life Member of IE, IETE, ISTE and CSI-India. He has published about 30 papers in International/National Journals, conferences and seminars. His research interests are Distributed System, Parallel Processing, GIS, Data Warehouse & Data mining, Software engineering and Networking.

Written By
Student
India India
Hifzan Ahmad is an M.Tech student in Department of Computer Science & Engineering at Kamla Nehru Institute of Technology (KNIT), Sultanpur. He received his B.Tech degree in 2009 from Shambhunath Institute of Engineering & Technology (SIET), Allahabad in Computer Science & Engineering.

Comments and Discussions

 
BugI cant get this to work no matter what i try >=( Pin
Theomega7630-May-15 19:09
Theomega7630-May-15 19:09 
I have downloaded the demo and the actual c# files. The demo at least starts but no matter what button i press (literally anything option i click) it freezes and throws an error. I opened the files in Visual Studio Ultimate 2013 and i can build the solution AND the build CAPS, both with NO errors and a succeeded dialog on both. I press start and the gui launches but again clicking anything causes it to exit and return to visual studio with the message

   at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.Open()
   at Sim1.OpenComputing.OpenComputing_Load(Object sender, EventArgs e) in c:\Users\Jimmy\Desktop\SimulatorCode\OpenComputing.cs:line 73
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
ClientConnectionId:00000000-0000-0000-0000-000000000000
Error Number:-1,State:0,Class:20</ExceptionString><DataItems><Data><Key>HelpLink.ProdName</Key><Value>Microsoft SQL Server</Value></Data><Data><Key>HelpLink.EvtSrc</Key><Value>MSSQLServer</Value></Data><Data><Key>HelpLink.EvtID</Key><Value>-1</Value></Data><Data><Key>HelpLink.BaseHelpUrl</Key><Value>http://go.microsoft.com/fwlink</Value></Data><Data><Key>HelpLink.LinkId</Key><Value>20476</Value></Data></DataItems></Exception></TraceRecord>
The program '[6952] Sim1.vshost.exe' has exited with code -1073741819 (0xc0000005) 'Access violation'.


Theres more above it but you get the idea, i made sure to change my net framework target in the project options from .NET framework 2.0 to .NET framework 4.0, however that doesnt seem to make to make a difference....

Do i need SQL server 2005 to run this???? Because that was in no way, shape or form stated in the documentation about it Frown | :(

I'm not saying that isn't the problem, but a big issue could be the fact that i have used VS maybe 5 times, ever..... It could just be i have some option configured wrong or something.
Can someone let me know if there are any specific options i need to have enabled/disabled or set to a certain value.

However what makes it all so weird is the fact the demo does the same thing when i run it. The gui starts, but upon clicking anything at all i get an error. Granted i can press continue on the error and the program will keep going however im pretty sure it keeps going when it shouldn't keep going. Meaning it CAN continue to function, but if u just ignore the error program cannot function as it should.

Lastly a couple things after it crashes (when being started from VS) when it returns to VS line #73 in "OpenComputing.cs"
con.Open();

Is always highlighted??? Not sure if that means anything, or if that is just simply the line that VS automatically places the cursor if the program crashes?

Last thing is the error that it was giving was something along the line of:
Quote:
A network-related or instance-specific error occurred while establishing a connection to SQL server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.(provider:SQL Network Interface, error:26- Error Locating Server/Instance Specified)


If anyone could please help me, i would be extremely grateful.
p.s. Thanks for taking the time to make such a cool program in the first place, huge thumbs up to you guys.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.