Optimal Page Replacement Algorithm - If more than one frame will not be used again, which one gets replaced? This may not make a difference in the end, but not knowing is driving me insane. When using the Optimal algorithm for page replacement, if you need to put something new into a frame and you have more than one frame that will not be used again, how does it prioritize which one to replace? In other words, if you have three frames and you enter in 1, 1, 2, 3, and neither 1 or 2 ever appears again, which one gets bumped when you try to put in 4? 

Does it go by FIFO and kick out 1, does it go by most used and kick out 2 or does it go by least recently used and kick out 1?
The optimal algorithm uses whatever is optimal (or one of the optimal possibilities, in case there are several), i.e. whatever produces the least page faults. There isn't necessarily any simpler description of its behavior, though there might be. In general, it depends on the problem; for this specific problem, I don't know whether a simple description exists, though there is probably a simple algorithm that finds an optimal sequence.

FIFO, most used and LRU are heuristics that are useful for the online version; it's not necessarily true that they can be used in any shape or form to obtain optimal page replacement sequences (but you might be able to describe rules for obtaining an optimal sequence using them; I just don't know).