I'm preparing my study material to study for an upcoming test, I was wondering if you can help me provide a short but sweet way of memorizing these topics, regarding Stack:what is postpone obligations and what are the advantages/disadvantages of using Stack? If this counts as 2 questions and I need to choose only one, understanding what postpone obligations would be my question please.

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter3: Data Representation
Section: Chapter Questions
Problem 13RQ: How is an array stored in main memory? How is a linked list stored in main memory? What are their...
icon
Related questions
Question
100%

I'm preparing my study material to study for an upcoming test, I was wondering if you can help me provide a short but sweet way of memorizing these topics, regarding Stack:what is postpone obligations and what are the advantages/disadvantages of using Stack? If this counts as 2 questions and I need to choose only one, understanding what postpone obligations would be my question please.

Expert Solution
Step 1

Understand the concept of Proposed Obligations by the example shown below-

Suppose a person is relaxing in your garden, sitting on chair and reading the newspaper and the phone rings. He makes a mental note of where he stops reading as he stands to answer the phone. While chatting on the phone with his friend, the doorbell chimes. He says, "just a minute, hold that thought" and put the phone down as he answers the door, as he is about to sign for the package that is being delivered, his dog Tommy runs out the open door. Further, he brings Tommy back to home, then sign for the package, then finish the phone call, and finally return to read the newspaper. In this way, that person has been storing his postponed obligations on a mental stack! Each time he is interrupted, he pushes the current obligation onto this stack and then, when he is free, he pops it from the stack and resume handling it.

Stacks are very useful abstract data types, especially in the field of computing system software. They are most often used in situations, like the example above, in which we must deal with postponed obligations. Similarly, in programming language systems typically use a stack to keep track of operation calls. The main program calls operation. A, calls operation B, which in turn calls operation C, when at last C finishes, the flow of control returns to B, the postponed obligation; when B finishes, control returns to A, the previous postponed obligation; and so on. The call and return sequence are essentially a LIFO sequence of post-poned obligations.

Stacks are often used to store postponed obligations. When the previous obligation is removed from the Stack in which it was Stored and processing continues many variations on this theme occur within computing systems software, including call-return stacks and process stacks.

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Stack
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning