Ubuntu :: Program Execution Time And Processor Affinity?

Aug 7, 2010

I have some questions.First, how can i obtain a process execution time ( after it terminated)??? Second, in a multi-core system like SMP how can i run different processes on different cores explicitly? i.e. how can i assign a process to a specific core?

View 1 Replies


ADVERTISEMENT

General :: Execution Time In A C Program ?

Jan 10, 2010

I need to find out the processing or operating time in milliseconds or in nanoseconds for the instructions or for the whole process!

for eg :

I need to calculate the time taken to execute :

And i dont want the time for whole program :

View 4 Replies View Related

Fedora :: Any Way To Unset Processor Affinity?

Oct 28, 2009

Does anyone know if there is a way to "unset" processor affinity? So if you bind a process to just one proc, but then want to tell the OS to revert to normal behavior? Also, when you bind a process to a processor, can other processes use that process or does it have exclusive usage of that proc?

View 1 Replies View Related

OpenSUSE :: Advanced Processor Affinity Practice?

Oct 27, 2010

Am investigating processor affinity theory and practice, am somewhat surprised at the paucity of information on something that has been a part of many Windows Enterprise type applications for more than a decade and although I haven't investigated would assume is supported by big iron UNIX.What it is Processor Affinity is the *NIX terminology for "soft" assigning a process and its threads to a specific processor core. On multi-tasking machines and particularly those which run heavy loads it can be useful to "advise" the Scheduler to isolate/assign heavy loads to a core separate from other processes. I also have a specific situation where I would like to run more than one instance of a specific app, but cannot when sharing the same processing environment.

What I've found so far By default, any and all processes are assigned an affinity that permits running on any and all available processors.The taskset utility can be used to modify the affinity for any process, which means that once an application/service/process has been launched, only then can the affinity be modified.It seems that the RH platform may also have a utility called tuna which might provide some tuning capabilities in addition to setting affinity but does not seem to be in the SuSE repositories and I cannot find source.Is there a reference or utility that can launch an application with a specified processor affinity?

View 6 Replies View Related

Programming :: Setting Processor Affinity In Application

Jan 28, 2010

there is any possibility that I can set in this application an affinity so that the processor binds it to core 2 for instance.Is this possible to do in an application that runs than under root? Or is this just possible after the application started with using the taskset tool?

View 1 Replies View Related

Fedora :: C Program Execution Using Gcc?

Jul 12, 2011

i m using gcc to compile certain programs.they get successfully compiled but fail to execute.Here is a sample code and the error [tommy@tommy cprog]$ vi test.c

#include<stdio.h>
int main()
{[code]....

a similar problem arises with codeblocks for the same program.the error is the same even when it is just main() and absence of return 0;
the problem exists also on c++.i m using Fedora 15

View 5 Replies View Related

General :: Measure Script Execution Time?

Jan 4, 2011

In bash shell, is there a simple way for me to monitor the time taken to run a script and output the time taken?

View 1 Replies View Related

Programming :: Allocate Memory To A Program Before Execution?

Jan 3, 2011

I went to an interview last week and there was this guy who asked a simple question that i have been trying to solve for a couple of days. I tried google but i just cant get the search keywords right. The result were just useless. Well, the question is : "How can we allocate a limited memory to a process before we start its execution" well, the question is related to an X11 system so may be some flags must be set to limit its memory.

View 9 Replies View Related

Programming :: Restart The Program Execution - Java

May 3, 2011

In gui validation if user enters string in integer requiring field, a dialog box pops out. So on clicking the button i want to stop the program execution and return to the previous jframe(either the same one or newly created object of it).

How can i handle this in java.
I tried calling main(); but it doesn't work.
Also System.exit(0); doensn't work.

View 1 Replies View Related

Software :: Schedule A Script's Execution At Specified Time - Error

May 4, 2010

I wanna simply schedule a script's execution at specified time :

So I used :

But the output was following ..

warning:

View 2 Replies View Related

Ubuntu :: Processor Use All The Way Up All The Time

Mar 3, 2011

I'm working on this Intel Celeron HP33w Pavillion with 512mb ram and a 180 gb hard drive. Installed xp on it, partitioned half the drive and left the other half blank. xp installed no prob, then installed ubuntu on the second partition letting ubuntu create the partition and swap space (which was 3 gigs) and it installed fine (aside from being incredibly slow to go through the actual install process). Once finally booted into ubuntu with no other programs running aside from the standard ones that start with ubuntu, i added the system monitor to the panel and expanded all the other monitors. Memory was normal, cup average was 100% and cpu usage was 100%. Figured something went wrong with the install so I reinstalled and got the same result. Window xp runs just as fast as it should with 512mb of ram so I'm sort of at a loss as to why ubuntu is eating up all my memory with no programs running.

View 2 Replies View Related

Networking :: Disabled Printing Statement In The Middle Of CPP Program Execution?

Jan 25, 2011

In my program(C++), I have a ping function call which will ping the specified IP and returns the result. The problem is, my code does not print the o/p to the terminal window after calling the ping fucntion for the first time. but, the cout statements exist before the ping function call, works fine. When i debug it using strace i found that output filedescriptor is getting closed some where through close(1), before returning from ping call. What would be the issue, can u please some one explains me what the problem is.

View 1 Replies View Related

General :: Free Online Server To Upload Program For Execution

Jan 17, 2011

I am outstation and having laptop with windows and internet connection. I want to check one small program on linux. kindly tell if some free linux server is available on internet where I can upload my program, compile and execute. The program is generic and there is no restrictions regarding linux version.

View 2 Replies View Related

Programming :: Continue Execution Of A Python Program While A Background Task Is Going On?

Aug 28, 2010

I'm trying to figure out how to continue execution of a Python program while a background task is going on.

In bash, it is adding "&" to the end as in:

Code:
#! /bin/bash
find / -iname "*.py" > /tmp/all_pys &
echo "looking for all python scripts and putting them in /tmp/all_pys"
(yes, I know I could just put the echo BEFORE the find but I just use it for example)

Say I do that in python (not necessarily running the shell, but perhaps using scriptutil.ffind or something similar), but want to allow the user to be doing something else while running that search in the background, how would I thread, fork, subprocess (not to be confused with the module and Popen) [or whatever I should call it] that?

View 14 Replies View Related

Debian Configuration :: Change The Automatic Fsck Execution At Boot Time To Be Above 30 Boots?

Aug 27, 2010

How can I change the automatic fsck execution at boot time to be above 30 boots? I reboot the system sometimes 3 to 4 times a day. Intel 3 GHz, tower, i386 lenny vmlinuz-2.6.31-686

View 2 Replies View Related

Ubuntu :: Use A Processor For A Specific Program?

Aug 27, 2010

Can I set up my system to use a specific processor to do one task, and another processor for normal applications.

Say for example, I'm using a program that relies heavily on your processor, I have a dual core, so I can use one core for that, and another for normal applications.

View 1 Replies View Related

Fedora :: Processor Is At 100% All The Time

Aug 14, 2009

Ever since I turned on my notebook yesterday (Compaq Evo N610c) my processor has been working 100% all the time. I checked processes via System Monitor, and no process is doing such thing.

What can I Do?

Here's a copy/paste from top command

Code:
[juan@x22 ~]$ top
top - 11:02:39 up 37 min, 2 users, load average: 2.77, 2.21, 1.48
Tasks: 142 total, 3 running, 139 sleeping, 0 stopped, 0 zombie

[Code].....

View 8 Replies View Related

Programming :: Running External Program On Same Processor?

Mar 2, 2010

The situation is that I have an MPI-parallel fortran program. I run it and it's distributed on N processors, and each of these processes must call an external program.

This external program is also an MPI program, however I want to run it in serial, on the processor that is calling it, as if it were part of the fortran program. The fortran program waits until the external program has completed, and then continues.

The problem is that this external program seems to run on any processor, and not necessarily the (now idle) processor that called it.

how I can call the program and ensure it runs only on this processor?

Extra information that might be helpful:

If I simply run the external program from the command line (ie, type "/path/myprogram.ex <enter>"), it runs fine. If I run it within the fortran program by calling it via

CALL SYSTEM("/path/myprogram.ex")

it doesn't run at all (doesn't even start) and everything crashes. I don't know why this is.

If I call it using mpiexec:

CALL SYSTEM("mpiexec -n 1 /path/myprogram.ex")

then it does work, but I get the problem that it can go on any node.

View 2 Replies View Related

Debian :: Hogs Memory And Processor Time, Which Slows Down The Responsiveness Of The System As A Whole?

Oct 6, 2010

I'll often run iceweasel for watching videos via flash (hulu, ....., et cetera) while working, in fedora I never noticed any performance problems, watching the video while using chrome for browsing, gedit for editing, et cetera, everything was responsive. Though, now on debian running iceweasel for the same purpose hogs memory and processor time, which slows down the responsiveness of the system as a whole, making it difficult to use other programs.I'm curious how I should go about troubleshooting this issue, and what diagnostics might help me find the solution.

View 4 Replies View Related

General :: Short A Time Can Time (system Program) Measure?

Apr 15, 2010

I'm just wondering what the limits for time are. I have a program that always takes exactly 20 ms, so I assume this is the lowest it can measure, but I want to see if there's some sort of documentation of this.

View 3 Replies View Related

Software :: AMD Processor Fedora Doesnt Support AMD Processor?

Jan 5, 2010

i have installed ubuntu in my laptop.since i have AMD processor fedora doesnt support AMD processor..the recent version fedora 12 supprots AMD processor.i am doing my final project in ns2 hence it should support tht too!!! Which is the best choice to override ubuntu grub fedora 12 or redhat linux.

View 3 Replies View Related

Ubuntu :: CPU Affinity / Taskset Does Not Always Work

Feb 20, 2010

I have a program for which it seems to be impossible to set cpu affinity from launch with the command taskset -c <cpu list> <command> <arguments>

View 3 Replies View Related

CentOS 5 :: Set Default Affinity To CPU 0?

Dec 18, 2009

I have a question about using taskset. I am using Core 2 Quad box. I set the default affinity to CPU 0, by doing the following:
Edit: /etc/rc.d/rc.sysinit
Addline: /bin/taskset -p 1 0

That has been working fine for me, but from searching the web, I found some suggestion about adding an additional line:
/bin/taskset -p 1 $$
What does that line do?

I checked the man page of taskset and some references for regular expression, and I couldn't find the explanation about the $ character. By the way, 0 for CPU 0, correct? I checked via htop and seemed to be correct...

View 1 Replies View Related

General :: Run A Program For A Specific Amount Of Time Starting At A Specific Time?

May 18, 2010

I want to record an internet radio station starting at 2:00am tomorrow morning. The specific program on the radio station lasts until 6:00am. The command I need to run to record the station is: Code:mplayer http://wjcu.jcu.edu:8001/listen.pls -ao pcm:file=indie_heat_of_the_night.wav -vc dummy -vo nullI'd use cron, but 1. I'm not sure how to and 2. it seems unnecessarily complicated for something that I only want to run once. If cron is the only/easiest solution, I guess I'll just have to resort to that, but I'd rather not.

View 12 Replies View Related

Programming :: Unable To Change Affinity

Apr 29, 2010

I am using glib version 1.2.10.I came to know from somewhere that "pthread_attr_setaffinity_np(3)" does not work on this version for POSIX threads. Following error was coming:(.text+0x112): undefined reference to `pthread_attr_setaffinity_np'collect2: ld returned 1 exit status.All I want to do is to run 2 threads on two different processors. I cannot change the glib version.

View 3 Replies View Related

General :: Write Cpu Affinity Code To Map 8 Nodes To 8-cores Computer?

Jan 24, 2011

I have a 8 core computer, which has 8 logical processor in total. I want to create 8 process(nodes). Each node is mapped to each logical processor. The order is code...

I wrote the code as below, could you please see whether it is correct? code...

View 3 Replies View Related

Ubuntu Multimedia :: Only One Program Can Use Sound At A Time?

May 30, 2010

Only one program can use sound at a time? Any fix?

View 2 Replies View Related

Programming :: Python Program For Time ?

Jun 24, 2011

I need to write a program for time. like i have 2 tasks both minutes and hours.

like this
1st task=5 hours and 30 minutes
2nd task=2hours and 45 minutes

Together they will take 8 hours and 15 minutes.

I need to write a program thats called ADDTIMES to do something like this.

This is what i have so far.

H1=int(input("enter the number of hours:")) etc..

View 6 Replies View Related

General :: Get Ubuntu To Automatically Run A Program Every Time The Screen Is Unlocked?

Oct 31, 2010

I have a script I would like to have automatically invoked every time the screen is unlocked. Does Ubuntu provide some support for users who wish to do this?

View 1 Replies View Related

OpenSUSE :: Start A Program At Boot Time?

Jul 2, 2010

I do this every time.

Code:
ifup dsl0
How can i set this to start at boot time?

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved