Optimal Resource Allocation for U-Shaped Parallel Split Learning