A process is an independent unit of execution within an operating system. It represents a program or application that is being executed by the CPU.
Process States
1. Running: Process is currently executing.
2. Waiting: Process is waiting for resources or events.
3. Sleeping: Process is suspended, waiting for events.
4. Zombie: Process has terminated, but parent process hasn't acknowledged.
5. Dead: Process has terminated and been removed.
Process Types
1. Foreground Process: Interactive process with user input.
2. Background Process: Non-interactive process running without user input.
3. System Process: Operating system process, such as device drivers.
4. Daemon Process: Background process that runs continuously.
Process Creation
1. Fork: Creates a new process by duplicating an existing one.
2. Exec: Replaces the current process image with a new one.
3. CreateProcess: Windows API function to create a new process.
Process Termination
1. Exit: Process terminates normally, returning an exit code.
2. Kill: Process is forcibly terminated by the operating system.
3. Signal: Process receives a signal, which can terminate or interrupt it.
Comments
Post a Comment