string
integer
float
character
boolean
An ordered set of values, which are immutable (elements in the tuple can't change)
spreadsheets
- Static structures cannot change size
- Dynamic structure can grow and shrink in size
A logical description of how we view data and possible operations, we're only concerned about what the data represents & not how it's constructed
An abstract data type that holds an ordered, linear sequence of items
- It is a first in first out structure
- The first element to be added to the queue is the first to be removed
-New elements are added to the rear of the queue
- When an element is removed the rest of the elements don't take up the empty space
- To keep the order of the queue you need need to mantain a pointer at the back & front of queue to indicate the back & front of queue
-Queue to a till
-Download/Updating queue
-Printer queue
enQueue - Add an item to the rear
deQueue - Removes and returns an item from the front
isEmpty - Indicates if the queue is empty
IsFull - Indicates if the queue is full
- What process to execute next
- The length of the time the next process can execute for
- Providing an acceptable response time to users
- To maximize the time the CPU is usefully engaged
- To ensure fairness on a multi-user system
- Ensures hardware resources are kept as busy as possible
Where each job is given a time slice within which it runs. Once the job has used it's time slice, it's give another slice until it's completed
Advantages - All processes get a fair share of the CPU
- Predictable, as each job isgiven the same amount of time
Disadvantages - Longer jobs take long to be completed
- It doesn't take job priority/urgency into account
- Choosing the right time slice is difficult
Serves jobs with the least time needing to be completed first
Advantages - Throughput is increased as shorter processes can be quickly completed
Disadvantages - Doesn't take job priority or urgency into account
Orders job with based on their time required to be completed
Scheduling that allows processes currently running to be interrupted
Where processes cannot be interrupted, it must finish its process.
An abstract data type that holds an ordered linear sequence of items
- It's a Last in First out structure
- To implenent a stack you need to maintain a pointer to the top of the stack(Last to be added)
Push - adds data to the top of the stack
Pop - Removes an element from the top of the stack
Peek - returns a copy of the element on the top of the stack without removing it
IsEmpty - Checks if the stack is empty
IsFull - Checks if a stack is at max capacity when stored in a static structure
Overflow attempts to push onto a full stack
Underflow attempts to pop an empty stack
The computer may give a stackover flow error when it runs out of memory
Large processes can remain at the back of the queue forever
Uses priority levels. If a job uses too much CPU time it is moved to a lower priority queue
A type of scheduling which proritizes jobs which arrive first to be processed
Advantages: - Easy to understand
- Fair in the sense that the are processed in the order they arrive
Disadvantages: Doesn't take job priority into account
- Can lead to poor performance if a large process arrives before a shorter process
Advantages - Smaller tasks are prioritized
Disadvantages - More complex than other algorithms
Advantages - Efficient and fast for short processes
- Minimises waiting time
Disadvantages - Requires knowing the burst of time process es in advance