How to restricit my cpu affinity to a subset of the cpus available on a given machine? [closed] - shell

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am working on a machine with 4 sockets with another person that launch performance tests on one precise socket and does not want anybody to iterfer with this socket.
I would like to work transparently on the 3 remaining sockets. How could could I do that, something like prefixing all my commands with numactl... ??
My shell is zsh
Thanks!

I'm assuming this is Linux?
If yes, cpusets are probably what you're looking for. There is also a cpuset userspace package that supposedly makes it easier to use the cpusets mechanism in the kernel.
While I have almost no experience with this, I think you should be able to create a cgroup, move your shell to it, and restrict the cgroup to use only the other CPUs. This restriction would be inherited by all processes started from that shell.

Related

Windows Server- Is there a way to get CPU Usage over a period by a specific program? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I need to get the Processes consuming CPU the most and over what time. Is this possible using any counter or script?
This at least gets you the info on who's using up the CPU. As to when, well that's another question entiresly.
I think you should configure a data collector set in Performance Monitor (PerfMon). You can collect the counter "\Process(*)% Processor Time". You can roll over the collector files for analysis later and hence see process performance over time.
When you look at the files later the graphs should make it easier to find the process that's consuming more CPU. I can't bang out a full tutorial at the moment, but a simple google search should turn up plenty of instructional info.
I will say the biggest challenge is configuring the schedule just right to make sure you capturing all the data you need. If that starts getting confusing there's a folder buried in Task Manager called PLA. That's for Performance Logs & Alerts. You should find a job there that correlates to your collector. It may be easier to work on the schedule there...
Thanks.

Do any computer languages not use a stack? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Do any computer languages not use a stack data structure to keep track of execution progress?
Or is the use of this data structure an emergent requirement stemming from something inherent to most computer languages or turing machines?
With a traditional "C-style" stack, certain language features are difficult or impossible to implement. For example, closures can't easily be implemented with a traditional stack because closures require a pointer to an old activation record to work correctly and that memory is automatically reclaimed in a C-style stack. As another example, generators and coroutines need their own memory to store local variables and relative offset information and therefore can't easily be implemented if you use a standard stack implementation.
Hope this helps!

Does my network have shared or distributed memory [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
Now I have some code that I would like to parallelize. The easiest thing would be to use openmp which will take advantage of the multiple processors and their cores and their shared memory. I have access to a network that I use for number crunching. I don't know if the memory on it is shared or distributed. How can I find this out? If it is shared then I can easily use openmp and it will work. I do less /proc/cpuinfo and I see that I have 8 processors available on the network. and I do less/proc/meminfo and it tells me I have 32000mega bytes of memory.
If you are using OpenMP you are probably writing your software to your machine only, as it is targeted on making the use of parallel programming transparent to the user. You can use OpenMP on a cluster together with MPI or with some OpenMP extension to make the many computers of the network appear to your OpenMP program like a single one.

How to make windows freeze for short period of time [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
Can I make windows 7 freeze for a short period of time,
during this time I want it to perform absolutely no action.
In particular, the OS should not access to any storage device.
My original idea was to crate an interrupt, however, I think that long interrupt will cause a blue screen (which I want to prevent).
I can tell you for a fact that this is not possible - if you do this to the primary volume the machine will bluescreen because of a watchdog timer, even for a short time. If you disconnect the drive, it will immediately bluescreen. If you do this to a secondary volume, it will be surprise removed.
If you have less than a team of 10-20 very skilled NT kernel developers / testers, this idea is not even beginning to be practical. What is your scenario and what you're trying to accomplish at a high level?

Windows Task Manager Columns - Handles [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
What is the Windows Task Manager "Handles" column a measure of? File Handles? Or Page File Pointers? Also is it bad for one program to have 8000 handles?
It's a measure of kernel handles. Kernel handles types and the functions that create them include:
File handles (CreateFile)
Memory mapped files (CreateFileMapping)
Events (CreateEvent)
Mutexes (CreateMutex)
Semaphores (CreateSemaphore)
Processes (CreateProcess)
Threads (CreateThread)
And more than I forget or have never heard of.
8000 for a single process seems incredibly excessive.
8000 for a single process does seem rather a lot, but not necessarily out of the question - it depends on the behaviour. You should think of handles as a special kind of memory - high usage is a possible warning sign, but not if it is stable. If the handle usage is stable, then it is not a sign of a leak, although you might have some optimisation to perform to get it to use fewer handles.

Resources