Could you please try following, written and tested with shown samples in GNU awk.
awk '
{
val[NR]=$2
sum+=$2
}
END{
for(i=1;i<=NR;i++){
print sum?val[i]/sum:0
}
}
' Input_file
Explanation: Adding detailed explanation for above.
awk ' ##Starting awk program from here.
{
val[NR]=$2 ##Creating array val whose index is current line number and value is 2nd field of current line.
sum+=$2 ##Creating sum which has 2nd column value in it which is keep on getting added in it.
}
END{ ##Starting END block of this code here.
for(i=1;i<=NR;i++){ ##Starting a for loop from i 1 to till value of count here.
print sum?val[i]/sum:0 ##Printing val[i]/sum value here if sum is NOT NULL else printing 0 here.
}
}
' Input_file ##Mentioning Input_file name here.