Documentation ¶
Index ¶
- Constants
- type BurstType
- type Bursts
- type Dino
- type DinoState
- type LongTimeSched
- type Memory
- func (m Memory) Allocate(p *Process, start int) (err error)
- func (m Memory) AllocateWorstFit(p *Process) (err error)
- func (m Memory) HasSpace(size int) bool
- func (m Memory) Layout() MemoryLayout
- func (m Memory) ReleaseProcess(p *Process) (bool, error)
- func (m Memory) TotalFree() int
- func (m Memory) WorstFit(sizeToFit int) (start, offset int, err error)
- type MemoryBlock
- type MemoryLayout
- type MultilevelQueue
- func (m *MultilevelQueue) Add(p *Process) error
- func (m *MultilevelQueue) Get() (*Process, error)
- func (m *MultilevelQueue) Len() int
- func (m *MultilevelQueue) Name() string
- func (m *MultilevelQueue) New(n string, q ...Scheduler)
- func (m *MultilevelQueue) Read() (*Process, error)
- func (m *MultilevelQueue) String() []string
- type PriorityQueue
- type Process
- type ProcessType
- type Processes
- type Queue
- type RoundRobin
- type Scheduler
Constants ¶
View Source
const ( // Process Types PT_INTERACTIVE = ProcessType("Interactive") PT_NONINTERACTIVE = ProcessType("Noninteractive") // Burst Types BT_CPU = iota BT_IO )
View Source
const FREE_BLOCK = string('▓')
View Source
const (
MAX_INT = int(^uint(0) >> 1)
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dino ¶
type Dino struct { Memory Memory // contains filtered or unexported fields }
func (*Dino) MemorySize ¶
func (*Dino) RandomProcess ¶
type DinoState ¶
type DinoState struct { FreeMemory int Memory MemoryLayout MemoryArray MemoryLayout NewQ []string InteractiveQ []string ExtFragmentation bool ExecutedByCPU *Process ExecutedByIO *Process FragmentationProcess *Process Message string }
type LongTimeSched ¶
type LongTimeSched struct { PriorityQueue Scheduler sync.Mutex // adds Lock() & Unlock() methods for concurrency // contains filtered or unexported fields }
Dispatcher: Se encarga de mover procesos de la cola de Ready hacia el CPU para su ejecución (realiza el cambio de contexto)
type Memory ¶
type Memory []*Process
func (Memory) AllocateWorstFit ¶
func (Memory) Layout ¶
func (m Memory) Layout() MemoryLayout
type MemoryBlock ¶
type MemoryLayout ¶
type MemoryLayout []*MemoryBlock
func (MemoryLayout) String ¶
func (ml MemoryLayout) String() string
type MultilevelQueue ¶
type MultilevelQueue struct { Scheduler // contains filtered or unexported fields }
MultilevelQueue is a scheduler of schedulers
func (*MultilevelQueue) Add ¶
func (m *MultilevelQueue) Add(p *Process) error
func (*MultilevelQueue) Get ¶
func (m *MultilevelQueue) Get() (*Process, error)
func (*MultilevelQueue) Len ¶
func (m *MultilevelQueue) Len() int
func (*MultilevelQueue) Name ¶
func (m *MultilevelQueue) Name() string
func (*MultilevelQueue) New ¶
func (m *MultilevelQueue) New(n string, q ...Scheduler)
func (*MultilevelQueue) Read ¶
func (m *MultilevelQueue) Read() (*Process, error)
func (*MultilevelQueue) String ¶
func (m *MultilevelQueue) String() []string
type PriorityQueue ¶
type PriorityQueue []*Process
type Process ¶
type ProcessType ¶
type ProcessType string
type RoundRobin ¶
type RoundRobin struct{}
Click to show internal directories.
Click to hide internal directories.