First fit, worst fit, and best fit. No, they can work without compaction because if they can not fit a process, they can just wait until another process fininishes to start the requesting process. (2 pts extra credit for: However, they must coallesce adjacent free memory blocks, or fragmentation of the memory will eventually prevent allocation.
Logical addresses are with respect to the process and must be mapped to a physical location. For example in virtual memory systems, logical address can be larger than the physical address space and in segmentation, the segment number has no physical analogue. Physical addresses must exactly correspond to a hardware location.
The OS swaps processes by taking all their pages and copying them to a special place on disk (into the swap space). The OS uses swapping to manage how many process are in memory at once, i.e., when too many processes are in memory at once. The OS thus sacrifies the performance of the swapped process to enable other process to run and get the memory they need.
where x be the probability of a TLB hit. x * (ma + l) is the time with a TLB hit, and (1-x) 2 * ma is the miss. l is not included in the miss time since the memory page table look up happens in parallel with the TLB look up.
where x be the probability of a TLB hit, y the probability the referenced page is in memory, and pf the page fault time. The TLB miss time is now the sum of probability of a page hit in memory (y * 2 * ma), and the page miss (pf + ma) which includes the memory access as well as the page fault time. The page fault time includes the time to read the page in, and write the replaced page on to disk if it was modified. (Including these symbolic times and probabilities is also correct.)
where z is the probability of no page fault of the page table look up. z*b is thus the hit. For the miss, we add the page fault time for the look up, the memory access time for the page look up is already included in b.
I choose 3 segments: one for the code (so it can be shared between processes), one for the heap (so it can be shared between threads), and one for the stack (threaded programs will share this stack).
The segment number needs two bits, which the compiler tacks on the front of the logical address. This scheme supports virtual memory as well, where the rest of the address is allowed to grow larger than the memory. The translation of the remainder of the address chops the logical address into two parts: the page (p) and the offset into the page (d). A page contains 2d bytes. The number of pages is dependent on the logical space I design; with a physical memory size of 2k and no virtual memory, the system needs at most k bits. With virtual memory it can be larger.
I would want to use associative memory (registers) for the 3 segment entries, and a TLB for the page table entries. The quickest organization really would be to index a TLB with the segment number and the page number together.