Possible To Split Up Threads (currently 6) So That 3 Run On Each Core?
Oct 18, 2011
I have a VB.NET app that spawns several threads for performing XML parsing/database interaction. Only one of my cores (only have 2 currently) is being used right now.I've looked at Task Parallelism in .NET 4 but I need to be able to start a task at different times (not all at once).Is it possible to split up the threads (currently 6) so that 3 run on each core? Also, if I don't want to limit my threads to 6, how can I check CPU/memory programmatically to find out if I can start another thread.
View 2 Replies
ADVERTISEMENT
Mar 3, 2010
I'm simulating some threading in a Windows Service, and the Thread.Start routine for each of my threads points directly to the following:
Private WithEvents CheckForOrdersTimer As System.Threading.Timer
Private Sub timerCheckForContracts_Tick(ByVal stateInfo As Object)
' Ticks every 5 seconds, then spawns threads until we're at our max
Do
[code]....
the threads aren't even doing anything yet, but with more than two threads running at the same time, my processor (Core 2 Duo 2.4 w/ 4GB) gets pegged and Windows gets really sluggish. According to what I've read, Thread.Sleep shouldn't be consuming any resources at all while it waits, but it may as well be running in a tight timing loop.
EDIT: Per the requests, I've expanded the amount of code I'm using. I was initially doing some database work before spawning each thread, but I've removed it and the processor maximization still occurs with just the code here (and, of course, the OnStart method for the Windows Service.
View 4 Replies
Mar 5, 2012
I'm simulating some threading in a Windows Service, and the Thread.Start routine for each of my threads points directly to the following:
Private WithEvents CheckForOrdersTimer As System.Threading.Timer
Private Sub timerCheckForContracts_Tick(ByVal stateInfo As Object)
' Ticks every 5 seconds, then spawns threads until we're at our max
[code].....
View 3 Replies
Dec 23, 2009
Say I have a code with 3 methods that do some pretty intensive work. Would executing these methods on 3 seperate threads be faster then executing them one after the other on a single core cpu? And what if it's a dual core or HT?
View 8 Replies
Jan 29, 2010
I'm using VB 2008, and I have a dual core computer.Is it possible to make a code that sends one application or program in 1 core, and other application in the other core?
View 1 Replies
Oct 19, 2011
I just had a new, last-minute idea on to take on a task, so I am running to StackExchange for quick help.
What I want to do is execute a series of methods right in a row, each in their own threads. I want the application to wait until all of these threads are completed, after which the program will resume. It also has to use managed threading (thread pool).
What quick examples could you provide to help me along the way? If it's too complex, what things should I know about so that I can Google it on my own?
View 1 Replies
Dec 30, 2009
I have a main thread which is designed to be a batch processor - it spawns a series of 'child' threads from a loop (which can vary in terms of the no of items) - see below
[Code]...
However, each of the 'child' threads could take anywhere from milliseconds to about a minute to process - depending on the complexity of each calculation. There may also be a large number of child threads - e.g 100s. Creating large numbers of child threads is not efficient. I therefore want some way to effectively queue each child thread (and cancel if the process is taking too long to complete). Autoevents seems like one way of doing this, but the only examples I can find seem to assume there are two different processes on seperate threads, not one process being repeated.
View 4 Replies
Feb 9, 2011
i have intel core quad cpu but my program cant use more than one of cores(it use 25% of cpu power but i want use 50% and more).
affinity is "<All Processors>" and all of cores are selected.
is there any way can use more than 50% of cpu power.
View 6 Replies
Dec 15, 2010
I am trying to split a long string based on an array of words. For Example:Words: trying, long, array Sentence: "I am trying to split a long string based on an array of words."Resulting string array:Multiple instances of the same word is likely, so having two instances of trying cause a split, or of array, will probably happen.
View 5 Replies
Dec 21, 2009
how i can set a certain thread to run on the 2nd core for eg...
View 8 Replies
Oct 15, 2010
For loop CPU 25% single core
View 6 Replies
May 20, 2012
I've been trying, without any luck whatsoever, to figure out how to use the Core Audio API in VB 2010. I started by downloading a wrapper dll located here: [URL]
[Code]...
View 2 Replies
Jul 26, 2011
My site has been running fine for sometime now until recently I see in the event viewer a null reference exception in the DNN core:
DotNetNuke.Common.Globals.GetStatus() in
F:BuildsMaintenanceWorkingDirectoryLibraryCommonGlobals.vb:line
1125 at DotNetNuke.Common.Initialize.InitializeApp(HttpApplication
app) in
[code]....
the line 1125 is:
_Status = UpgradeStatus.None
Which is a property of the Globals class and an Enum Also when this happens it doesnt just do it once then sort its self it does it roughly every minute for an hour or so.I made sure all dataprovider.instances are either in a using or a try catch finally or self closing(if the reader is not used)?
View 2 Replies
Aug 2, 2010
Trying to make a badly archictected system work. In doing so we have ourselves in a postion of shelling mulitple instances of a program and managing the running processes. On startup the shelled program is CPU intensive and we need to limit the rate that we initiate the instances based on the CPU load. How do you calculate the CPU load of a multicore system?
View 1 Replies
Feb 24, 2009
How can i change a process using only 1 core instead of 2 cores? Also, how can I set different prioritys to each process?As it does not save the settings which i put to each process in taskmanager on restart, i decided to make a program so i could simply click a button so it would change the settings for each process i want.For example:With a simple button click it changes msnmsgr.exe priority to low and makes it use only the 1st core.
View 2 Replies
Feb 8, 2012
How can i get the core and memory clocks of the gpu using the Win32_VideoController?
View 1 Replies
Feb 5, 2010
Somehow the reference to System.Core got removed from one of my projects, which I think is causing some issues. If I try to re-add it to my references I get a message saying "A reference to 'System.Core' could not be added. This component is already automatically referenced by the build system". I think I need this reference because it is there when I start a new project by default
View 1 Replies
Apr 20, 2012
I'm getting the error below trying to open a new workbook in Excel:
Imports Microsoft.Office.Core
...
Dim myExcel As New Excel.Application
[code].....
View 1 Replies
Jul 14, 2009
I am working on maintaining someone else's code that is using multithreading, via two methods:
1: ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf ReadData), objUpdateItem)
2: Dim aThread As New Thread(AddressOf LoadCache) aThread.Start()
However, on a dual core machine, I am only getting 50% CPU utlilization, and on a dual core with hyperthreadin enabled machine, I am only getting 25% CPU utilization. Obviously threading is extremely complicated, but this behaviour would seem to indicate that I am not understanding some simple fundamental fact?
[code]...
And this is occurring in a recursive function, so the QueueUserWorkItem can be executing multiple times, which in turn then executes exactly one new thread via the aThread.Start
Hopefully that gives a decent idea of how things are happening. under this scenario, should this not theoretically pin both cores, rather than maxing out at 100% on one core, while the other core is essentially idle?
View 6 Replies
Dec 25, 2011
collect information from core temp ( how to gain information about the CPU directly from the motherboard or windows E.G temperature CPU name ) and use it as a variable within VB.
View 3 Replies
Nov 29, 2011
I was going to hijack another, related, thread to ask this, but I figured it derserved its own thread.The question I have is whether or not anybody has done sufficient testing to show whether a mutlithreaded program running on a multi-core system will spread the threads across all available cores, or whether it has some affinity for the core used by the main process (UI thread, or whatever it may be)? The reason I ask is because I remember a discussion over in General Computing where somebody showed that, for at least one case, all the threads were splitting time on a single core of a multi-core processor. I am wondering if that is the typical behavior, or an isolated case?
View 23 Replies
Aug 27, 2010
After I upgraded from Windows Xp to Windows 7 on any dual core cpu machine my programs that use a simple timer function run incorrectly. The program works with the exact same hardware under Windows Xp and Windows Server 2003. I am using Visual Studio 2005 to write .NET Visual Basic programs that use 2 timers to count down. The first timer, timer1, is set to a value say 150000 ms (150 seconds). The second timer, timer2, is set to 1000ms (1 second). Both timers are enabled one right after the other from a button click event and begin. The timer2 routine running every second updates a label counting down the seconds. When timer1 fires it disables itself and exits. Timer2 also checks to see if timer1 is still running if it is not it will stop. Under Windows Xp and Windows Server 2003 the resulting count in the label is 0 when timer2 detects timer1 has finished. Under Windows 7 when timer1 stops timer2 is not at 0 it is 3 for 150 seconds and gets larger the more timer1 is increased. It appears to me timer2 is not being fired every 1000ms as it was under Windows Xp.
I have included the Visual Basic code below. If you want to test it just run Visual Studio and create a new project. Put the buttons, numericupdown, and labels in your form and past my code into the correct buttons. I have used these type of timer events for years without any problems unit Windows 7. Windows 7 on a single core Pentium 4 with hyperthreading turned on works fine. Windows 7 on a dual core E6500 fails, Windows Server 2003 works.
Public Class Form1
Dim I As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
[CODE]...
View 2 Replies
Mar 24, 2011
When my application loads in Visual Studio 2010 I see this warning. Everything runs ok in it as far as I'm aware but I'm completely ignorant in this area. Could that cause me a problem and is there a way to replace that component? There is also the other warning you see in the screenshot.
Quote:Warning1Namespace or type specified in the project-level Imports 'System.Linq' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
I did a search for the entire solution and it didn't turn up any Sysem.Linq anywhere. I looked at every Imports statement in my project and I don't have any Imports System.Linq anywhere unless it's somewhere where Visual Studio's quick find search doesn't see it.
View 4 Replies
Jun 7, 2012
I'm currently working on a Visual Basic program that should be able to show CPU temperatures.To do this the cleanest way (in my opinion), I would like to use the Windows Management Interface (WMI) using
MSAcpi_ThermalZoneTemperature.Now, to my understanding, this requires that motherboard (MOBO) manufacture exposes these values to the WMI, which almost nobody actually do, but if they do, a "device" should show
up in the device manager called ACPI Thermal Zone under System Devices (let me know if I'm wrong).
As I would like to test my program and my current MOBO (Gigabyte GA-H67A-USB3-B3) doesn't seems to expose CPU temperatures to WMI (no
[Code]...
View 9 Replies
Mar 1, 2012
I would like to create a split container with a three way split. The first split is a vertical split. The second is creating a horizontal split within panel2 of the first split container. panel1 will hold a treeview control the other two panels will hold listview controls
I think this question has been asked already in a couple different ways and I've reviewed those posts and I've tried to do what was suggested but it doesn't seem to work for me. I've tried to place a second split container inside panel2 of the first split containter. This gave me what appeared to be a three way vertical split.
View 3 Replies
May 26, 2009
Code Coring Experience Live Meeting the Visual Studio Team Visual C# and Visual Basic languages continue to evolve towards feature parity, strive to simplify programming and deployment with the Microsoft Office APIs, and allow easy interop to dynamic languages. In the tools space, Visual Studio 2010 offers greater support for Test-Driven Development, where tests are written before product code as an iterative approach to software design. In this interactive session you will get a chance to connect with the two Program Managers DJ Park and Dustin Campbell as they walk through the feature areas they feel will have the greatest impact to you and your development teams.
[Code]...
View 1 Replies
Dec 28, 2011
I'm trying to split a Yahoo historical stock price csv file, downloaded into a string, by what looks like a space character. I want a new row for each split. The split function works for other characters I see in the string. I suspect the characters may be a non breaking space character but I've been unable to split on them. This is the test csv file that is downloaded into the string: [URL] I'm trying to split the string like this:
[Code]...
View 2 Replies
Jul 1, 2010
What is that ... Well I was not too sure how to title this question, and even after telling the client it was difficult if not impossible, he insists it's what he wants.. so here goes the question.. The client has several SQL systems running on site that collect data from different processes (Between 1 and 10 minute intervals depending on the process been checked). Note: these systems sit on different parts of the site..
[Code]...
View 1 Replies
Feb 15, 2010
I have finished coding an application which I designed for people working in my office. When I started to install the application to computers at the office, I realized that, in some machines, application doesn�t work properly. Although it worked for 15 computers perfectly, for 3 computers following error code is displayed:
System.IO.FileNotFoundException: Could not load file or assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
[code]....
WRN: Assembly binding logging is turned OFF.To enable assembly bind failure logging, set the registry value [HKLMSoftwareMicrosoftFusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.To turn this feature off, remove the registry value [HKLMSoftwareMicrosoftFusion!EnableLog].
View 5 Replies
Jun 19, 2010
I have listbox which is populated from a text file with all the items fromt he 1st split, the text file looks like this:
Quote:
test l1c1 | test l1c2 | test l1c3
test l2c1 | test l2c2 | test l2c3
[code].....
View 4 Replies