  Using correct design metrics and understanding the limitations of the
underlying technology is critical to developing effective scheduling
algorithms. Unfortunately, existing scheduling techniques used \emph{incorrect}
metrics and had \emph{unrealistic} assumptions for fair scheduling of
multi-tenant FPGAs where each tenant is aimed to share approximately the same
number of resources both spatially and temporally.
  This paper introduces an enhanced fair scheduling algorithm for multi-tenant
FPGA use, addressing previous metric and assumption issues, with three specific
improvements claimed First, our method ensures spatiotemporal fairness by
considering both spatial and temporal aspects, addressing the limitation of
prior work that assumed uniform task latency. Second, we incorporate energy
considerations into fairness by adjusting scheduling intervals and accounting
for energy overhead, thereby balancing energy efficiency with fairness. Third,
we acknowledge overlooked aspects of FPGA multi-tenancy, including
heterogeneous regions and the constraints on dynamically merging/splitting
partially reconfigurable regions. We develop and evaluate our improved fair
scheduling algorithm with these three enhancements. Inspired by the Greek
goddess of law and personification of justice, we name our fair scheduling
solution THEMIS: \underline{T}ime, \underline{H}eterogeneity, and
\underline{E}nergy \underline{Mi}nded \underline{S}cheduling.
  We used the Xilinx Zedboard XC7Z020 to quantify our approach's savings.
Compared to previous algorithms, our improved scheduling algorithm enhances
fairness between 24.2--98.4\% and allows a trade-off between 55.3$\times$ in
energy vs. 69.3$\times$ in fairness. The paper thus informs cloud providers
about future scheduling optimizations for fairness with related challenges and
opportunities.
