A stack, also known as an execution stack, control stack and run-time stack, is a term used in computer science referring to a data structure that stores information about the subroutines of a specific computer program.
Stack operations are used for several purposes in a computers operating system, however their main usage is to control when a programs subroutine should finish executing.
More specifically a stack is known as a LIFO or last in, first out abstract data type. It is characterized simply by three operations:
The stack-top operation gets the data from the top position and returns it to the user without having to delete it.
The pop and push of a stack operation mean that items are removed from the stack in the reverse order to that which they joined. Therefore lower items in a stack, are those that will have been on the stack the longest.
A stack operation is a complex system to understand, for further information you should consult a textbook, these can be found in most academic book shops or online via a search engine.
Alternatively you may wish to consult a computer scientist, or your professor/tutor.
Stack operations are used for several purposes in a computers operating system, however their main usage is to control when a programs subroutine should finish executing.
More specifically a stack is known as a LIFO or last in, first out abstract data type. It is characterized simply by three operations:
- Push
- Pop
- Stack-top
The stack-top operation gets the data from the top position and returns it to the user without having to delete it.
The pop and push of a stack operation mean that items are removed from the stack in the reverse order to that which they joined. Therefore lower items in a stack, are those that will have been on the stack the longest.
A stack operation is a complex system to understand, for further information you should consult a textbook, these can be found in most academic book shops or online via a search engine.
Alternatively you may wish to consult a computer scientist, or your professor/tutor.