Answer:
a. new, running, waiting, ready, and terminated.
Explanation:
The process in a computer system can have different states and these are:
-New: When the process is created.
-Ready: When the process is waiting to be executed.
-Running: When the process is chosen to be executed.
-Waiting: When the process is expecting for something to happen.
-Terminated: When the process is not running anymore.
According to this, the answer is that the possible states of a process are: new, running, waiting, ready, and terminated.
Answer:
from socket import *
hostname = input('Enter the host to be scanned: ')
ip_add = gethostbyname(hostname)
connections = [ ]
for i in range(133, 136):
s = socket(AF_INET, SOCK_STREAM)
conn = s.connect_ex((ip_add, i))
print(conn)
connections.append(conn)
if 0 in connections:
print ('Host is online')
s.close()
else:
print ('system is unreachable')
Explanation:
The python source code above scans for all the available range of ports in the provided hostname, if any port is available, the host is online else the program print the error message "system is unreachable.
It promotes problem solving approaches and thinking skills
Task manager
.............................