Ejemplo n.º 1
0
memory = Memory(32)
mmu    = ContinousAllocation(memory, BestFit())
mmu    = Paging(memory, 4)
hard_disk = HardDisk()
cpu = Cpu(None, None, None)
scheduling_policy = Fifo()
h_kernel = Kernel(cpu, mmu, hard_disk, scheduling_policy)
h_kernel = Kernel(cpu, mmu, hard_disk)

Log().debug_mode = False

shell = SheelH(h_kernel)
h_kernel.start()

pro = Program('program1')
pro.add_instruction(Add(1,2))
pro.add_instruction(Add(1,2))
pro.add_instruction(Add(1,2))
pro.add_instruction(Add(1,2))
pro.add_instruction(Add(1,2))
pro.add_instruction(Add(1,2))
pro.add_instruction(Add(1,2))
pro2 = Program('program2')
pro2.add_instruction(Add(3,2))
pro2.add_instruction(Add(3,2))
pro2.add_instruction(Add(3,2))
pro2.add_instruction(Add(3,2))
pro3 = Program('program3')
pro3.add_instruction(Add(4,2))
pro3.add_instruction(Add(4,2))
pro3.add_instruction(Print("Hola ", h_kernel.console))