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.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education