Questions tagged [process]

This tag is about operating system processes. It may also refer to a specific construct on a given platform, e.g., the System.Diagnostics.Process class for .NET

A process is an instance of a computer program being executed. Many operating systems let multiple processes run concurrently. The operating system takes care of isolating processes one from another in order to provide data integrity and also provides means for interprocess communication (IPC).

Process contains the program code and its current activity. Depending on the operating system (OS), a process may be made up of multiple threads of execution that execute instructions concurrently.

A computer program is a passive collection of instructions; a process is the actual execution of those instructions. Several processes may be associated with the same program; for example, opening up several instances of the same program often means more than one process is being executed.

For security and reliability reasons most modern operating systems prevent direct communication between independent processes, providing strictly mediated and controlled inter-process communication functionality.

Resources

Process - Wikipedia

Processes and threads in Windows

What is a process in UNIX / Linux?

18168 questions
65
votes
7 answers

How is it possible that kill -9 for a process on Linux has no effect?

I'm writing a plugin to highlight text strings automatically as you visit a web site. It's like the highlight search results but automatic and for many words; it could be used for people with allergies to make words really stand out, for example,…
Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820
65
votes
4 answers

Processes, threads, green threads, protothreads, fibers, coroutines: what's the difference?

I'm reading up on concurrency. I've got a bit over my head with terms that have confusingly similar definitions. Namely: Processes Threads "Green threads" Protothreads Fibers Coroutines "Goroutines" in the Go language My impression is that the…
jameshfisher
  • 34,029
  • 31
  • 121
  • 167
64
votes
5 answers

Linux / Bash, using ps -o to get process by specific name?

I am trying to use the ps -o command to get just specific info about processes matching a certain name. However, I am having some issues on this, when I try to use this even to just get all processes, like so, it just returns a subset of what a…
Rick
  • 16,612
  • 34
  • 110
  • 163
64
votes
3 answers

Linux free shows high memory usage but top does not

On RedHat Linux 6.2 I'm running free -m and it shows nearly all 8GB used total used free shared buffers cached Mem: 7989 7734 254 0 28 7128 -/+ buffers/cache: …
DarVar
  • 16,882
  • 29
  • 97
  • 146
63
votes
8 answers

How can I set the process name for a Java-program?

If a Java program is started, it get's in the system process-monitor the name java. Many Java-programs are that way hard to distinguish. So it would be nice, if a way exists, to set the name, that will be shown in the process-monitor. I'm aware…
Mnementh
  • 50,487
  • 48
  • 148
  • 202
62
votes
3 answers

List AppDomains in Process

Is there any possibility how to enumerate AppDomains within Process?
marc
  • 847
  • 1
  • 8
  • 9
61
votes
2 answers

what happens in the kernel during malloc?

I was asked this question during an interview. What they wanted to know was when the user calls malloc(4) to allocate 4 bytes of memory how does the operating system (Linux) respond? Which subsystem responds to this system call? I told him that…
liv2hak
  • 14,472
  • 53
  • 157
  • 270
61
votes
3 answers

NODEJS process info

How to get the process name with a PID (Process ID) in Node.JS program, platform include Mac, Windows, Linux. Does it has some node modules to do it?
pianist829
  • 613
  • 1
  • 5
  • 5
61
votes
2 answers

Node.js: Is there any documentation about the process.env variable

I use process.env a little in my program, it seems this variable have nothing to do with my program, without it my app could work well, too. So how can I fully use the process.env? Is there any document or tutorial about it?
hh54188
  • 14,887
  • 32
  • 113
  • 184
59
votes
9 answers

Linux API to list running processes?

I need a C/C++ API that allows me to list the running processes on a Linux system, and list the files each process has open. I do not want to end up reading the /proc/ file system directly. Can anyone think of a way to do this?
Thomi
  • 11,647
  • 13
  • 72
  • 110
59
votes
10 answers

How do I determine the owner of a process in C#?

I am looking for a process by the name of "MyApp.exe" and I want to make sure I get the process that is owned by a particular user. I use the following code to get a list of the processes: Process[] processes =…
adeel825
  • 5,677
  • 12
  • 40
  • 44
59
votes
8 answers

Why should I use a thread vs. using a process?

Separating different parts of a program into different processes seems (to me) to make a more elegant program than just threading everything. In what scenario would it make sense to make things run on a thread vs. separating the program into…
danmine
  • 11,325
  • 17
  • 55
  • 75
58
votes
2 answers

How to use [DllImport("")] in C#?

I found a lot of questions about it, but no one explains how I can use this. I have this: using System; using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; using System.Windows.Forms; using…
ThomasFey
  • 736
  • 1
  • 5
  • 11
57
votes
2 answers

System call and context switch

I am sorry to ask this question when it has already been asked but I couldn't get a clarity from them. So I am asking the following related questions to get the difference between system call (mode-switch) and context switch Why is it said that…
vjain27
  • 3,514
  • 9
  • 41
  • 60
57
votes
7 answers

Graphing a process's memory usage

Does anyone know of a tool to visually show the memory usage of a selected process on Ubuntu? ps aux will show a numerical snapshot, but I'd really like a line I can watch change as I hammer the process and hopefully see unexpected behaviours. Has…
BanksySan
  • 27,362
  • 33
  • 117
  • 216