four types of memory allocation
schemes
single-user systems
fixed partitions
dynamic partitions
relocatable dynamic partitions
Algorithm to Load a Job in a Single-User System
1 Store first memory location of program into base register (for memory
protection)
2 Set program counter (it keeps track of memory space used by the
program) equal to address of first memory location
3 Read first instruction of program
4 Increment program counter by number of bytes in instruction
5 Has the last instruction been reached?
if yes, then stop loading program
if no, then continue with step 6
6 Is program counter greater than memory size?
if yes, then stop loading program
if no, then continue with step 7
7 Load instruction in memory
8 Read next instruction of program
9 Go to step 4
The first attempt to allow for multiprogramming used ________ within the main memory
fixed partitions or static partitions
Algorithm to Load a Job in a Fixed Partition
1 Determine job’s requested memory size
2 If job_size > size of largest partition
Then reject the job
print appropriate message to operator
go to step 1 to handle next job in line
Else
continue with step 3
3 Set counter to 1
4 Do while counter <= number of partitions in memory
If job_size > memory_partition_size(counter)
Then counter = counter + 1
Else
If memory_partition_size(counter) = “free”
Then load job into memory_partition(counter)
change memory_partition_status(counter) to “busy”
go to step 1 to handle next job in line
Else
counter = counter + 1
End do
5 No partition available at this time, put job in waiting queue
6 Go to step 1 to handle next job in line