This repository contains an Advanced Process Manager with Process Synchronization. The implemented functionalities include:
-
Creating and Managing Processes
- You can create new processes by calling the
create_process(command)function, wherecommandis the command you want to execute.
- You can create new processes by calling the
-
Creating and Managing Threads
- Threads can be created using the
create_thread(target_function)function. Specify the target function you want to run as a thread.
- Threads can be created using the
-
Inter-Process Communication (IPC) with Shared Memory
- Shared memory communication is achieved using the
ipc_operation(position, value)function, allowing the modification of the global shared memory inprocess_manager.py.
- Shared memory communication is achieved using the
-
Process Listing and Termination
- You can list all running processes and terminate a specific process using the
list_processes()andterminate_process(pid)functions.
- You can list all running processes and terminate a specific process using the
-
Viewing Process Information
- Retrieve information about a specific process using the
view_process_info(pid)function. It returns process details if the process exists, or None if the process is not found.
- Retrieve information about a specific process using the
-
Thread Termination
- To terminate a thread, use the
terminate_thread(thread)function, passing the thread object to be terminated.
- To terminate a thread, use the
To use this Advanced Process Manager, follow these installation instructions:
- Clone the project repository from GitHub.
- Install the required dependencies (e.g., psutil, subprocess) using pip.
- Run the main script,
process_manager.py, in your Python environment.
Start the application by running process_manager.py. You can modify the main.py script if needed. The menu system in main.py allows you to perform various actions, including creating and managing processes, threads, and other functionalities.
The available actions in the menu system include:
- Creating a New Process
- Creating a New Thread
- Inter-Process Communication (IPC)
- Listing Processes
- Terminating a Process
- Viewing Process Information
- Terminating a Thread
- Monitoring Running Processes
- Exit
- Description: Created a new process by taking a command.
- Explanation: Users can provide a command to start a new process, and the system logs the process creation.
- Description: Create a new thread from taking the name of a function.
- Explanation: Users can specify a target function to run in a new thread, and the system logs the thread's start.
- Description: There can be Inter-Process Communication.
- Explanation: Processes and threads can gain access to shared memory.
- Description: Successfully listed active processes.
- Explanation: Users can view a list of currently active processes, including their PIDs, names, PPIDs, and statuses.
- Description: Process can be successfully terminated knowing their PID.
- Explanation: Users can enter a PID to terminate a specific process, and the system logs the termination action.
- Description: Successfully viewed process information.
- Explanation: Users can provide a PID to view detailed information about a specific process.
- Description: Successfully terminated a thread.
- Explanation: Users can specify a thread to terminate, and the system logs the thread's termination.
- Description: Successfully monitor running processes.
- Explanation: Process activity can be monitored.
The menu system can still be refined to improve user-friendliness. It's worth noting that users without programming knowledge may find it challenging to make full use of the program due to its technical nature.
Despite some rough edges, the program can successfully achieve the majority of the intended functions. Further development and user interface improvements could enhance the overall user experience.