ArticleslgStudy

computer science

Shared Variables

Shared Variables is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Shared Variables rather than just read about it. In short: Shared Variables are a feature of the programming language APL which allows APL programs running on one processor to share information with another processor. Although originally developed for mainframe computers, Shared Variables were also used in personal computer implementations of APL.

Key takeaways

  • Shared Variables belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Shared Variables to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Shared Variables from memory before moving on to harder problems.

Reference excerpt

Shared Variables are a feature of the programming language APL which allows APL programs running on one processor to share information with another processor. Although originally developed for mainframe computers, Shared Variables were also used in personal computer implementations of APL. Shared Variables could be used to control peripheral devices, or to communicate with external files, database management systems, or other users. Shared Variables were first introduced by International Business Machines Corporation (IBM) in their APL.SV software product in 1973, and are still available as of 2017, in APLs from IBM and Dyalog, for the operating systems Linux and Windows.

Origin When APL\360 was first introduced in 1968, there were no built-in means by which a user could directly access data from outside of the APL system. Thus, starting in 1969, IBM developed the shared variable facility. Following APL.SV, the IBM VS APL and APL2 program products also supported shared variables, as did the IBM 5100 line of computers. Shared Variable Processors were available to allow APL access to the following:

Standard operating system files (TSIO) Time Sharing Option (TSO) and Conversational Monitor System (CMS) command processors (AP100) VSAPL Stack Processor (AP101) VSAPL Session Manager (AP102) CMS Native Files (AP110) CMS and TSO Native Files (AP111) APL2 Data File Processor (AP121) Virtual storage access method (VSAM) Files (AP123) Full Screen Display Manager (AP124) IBM Graphical Data Display Manager (GDDM) (AP126) IBM Db2 (AP127)

Subsequent uses In the early 1980s, I. P. Sharp Associates, which offered a rich and advanced APL, introduced Shared Variables in their product. Many of the Shared Variable Processors available for IBM products were also written for Sharp APL, notably TSIO (called PJAM), AP124, AP126, and AP127. Further, as I. P. Sharp also offered IPSANET which allowed in-house clients of SHARP APL to be connected to the network, a Network Shared Variable Processor (NSVP) allowed programs from one mainframe site to access another. NSVP predates the widespread use of the Internet by five years. Shared Variables were one technique used by APL implementors and vendors to increase the richness of the APL language, doing so without changing the core implementation. With the advent of more powerful personal computing, the exodus of the APL user community to smaller computers was inevitable. APL was first available on Intel 8008, 8080, and Zilog Z80 based hardware, later the original IBM PC, and as of 2015, on the 32- and 64-bit Linux and Windows workstations. Although Dyalog APL included an implementation of shared variables for communication with the now-deprecated Microsoft Windows Dynamic Data Exchange (DDE), only IBM continued to use Shared Variables as a means to supply new features to their versions of the APL2 language for non-mainframe computers. Nearly all other APL vendors chose to implement new functions, such as access to Linux and Windows native features, graphical user interfaces, presentation graphics, database management system interfaces, and so on, more directly in their respective versions of the APL language. In modern non-IBM APL implementations, the Shared Variable interface has been largely supplanted by Component Object Model (COM), ActiveX, and .NET Framework.

References

Worked examples

Example 1 — a first encounter with Shared Variables

Start with the simplest possible case. Write down what Shared Variables claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Shared Variables before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Shared Variables ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Shared Variables

In research
Shared Variables appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Shared Variables in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Shared Variables is common in secondary-school and first-year university syllabi. It links to neighbouring topics APL programming language family, IBM software, so understanding it makes those chapters shorter.
In everyday life
Look for Shared Variables outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Shared Variables” →

How to study Shared Variables in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Shared Variables means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Shared Variables out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Shared Variables in simple terms?

Shared Variables are a feature of the programming language APL which allows APL programs running on one processor to share information with another processor. Although originally developed for mainframe computers, Shared Variables were also used in personal computer implementations of APL.

Why does Shared Variables matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Shared Variables?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Shared Variables.

Tags

  • APL programming language family
  • IBM software

Keep exploring