Skip to content

A History of Spooling

http://www.dacs.org/archive/0007/feature4.htm

A Brief History of SPOOL

By Bill Manyin

SPOOL Definitions:
1) System Peripheral Operations OffLine
2) Simultaneous Peripheral Operations OnLine

PRIOR TO 1964 and IBM System/360 and System/360 Operating Systems, it was common for a mainframe to run only one user program at a time. Each user submitted his program in the form of a deck of IBM cards. The program had complete control of the mainframe. Your program could be loaded from an IBM card reader machine cabled to the mainframe online, could create IBM card output by sending data to an IBM card punch machine cabled to the mainframe online, and could send data to a printer machine cabled to the mainframe online. This approach of “peripheral
I/O” was inefficient because (1) the program needed to wait until its input or output transmission was completed before it could receive/send the next line, and 2) the devices designed to attach to the high-speed mainframe were frequently slower than similar devices designed for cheaper, lower speed, mainframes.

(真的靠人在搬!)
For example, if the high-speed mainframe was an IBM 7090 and the lower-speed mainframe was an IBM 1401, the operation was improved by reading the decks of cards on a 1401 and writing the data on a magnetic tape. The tape provided high-speed input to the 7090, which ran one program at a time, each one writing an output tape with punch and/or print files. This output tape would then be brought to the 1401 for punching cards and printing. The process was described as SPOOLing the I/O, using definition 1 above. The acronym of SPOOL may have been chosen because of using tape on a spool or reel.

Typical Spooling Speeds for data
On 7090 On 1401
Card Reader 100 cpm 800 cpm
Card Punch 100 cpm 250 cpm
Line Printer 150 lpm 600 lpm
cpm = cards per minute
lpm = lines per minute

System/360 allowed the higher-speed peripheral devices to be attached directly to the large mainframe. Furthermore, System/360 offered operating systems that allowed multiple jobs to run concurrently (although only one at a time.) The OS provided routines to perform SPOOLing using disk instead of tape. Thus the definition of SPOOL changed to definition 2, since the peripheral devices were now online to the large mainframe.

Note: I have written this article from an IBM perspective. Other computers may have used different terms and meanings.

Memorry-mapped I/O input notification

With memory-mapped I/O, how does a device (controller) notify the CPU to read data?

Mandatory locks in Linux

To enable mandatory locking in Linux, the first thing to do is mount the file system with option “mand”. To apply this option to root file system, we need to modify /etc/fstab. For example:

# /etc/fstab: static file system information.
#
# proc /proc proc defaults 0 0
# /dev/sdb3
UUID=3fca01b2-2578-4331-a066-4ce7cc33ea6a / ext3 relatime,mand,errors=remount-ro 0 1
# /dev/sdb4
UUID=1051fb61-0260-40f1-838f-3efe8dcaa2d1 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0

Andy Walker, in his Kernel Documentation mandatory-locking.txt, mentioned that mandatory locking in Linux is unreliable. I don’t quite understand why, though. As long as a system call is un-preemptable/atomic, it should work, shouldn’t it?

Compiling Stevens’ example codes

To compile the example programs from Stevens’ “Advanced Programming in the UNIX Environment,” under Ubuntu, install the following package:

libc6-dev (will automatically install another package that it depends upon)

The header files are located in /usr/include.

Now, to compile, say Program 1.1, go to files/. Type “make ls1″.

./ls1 /etc

To install man pages for libraries, look for “manpages-dev” package, which contains:
these two sections:
2 = Linux system calls.
3 = Library calls (note that a more comprehensive source of information
may be found in the glibc-doc package).

PHP on Trax

Just found this today. PHP on Trax, formerly PHP on Rails. Looks cool!

Taiwan, my home country

This post has nothing to do with my study.

I just saw this video on Youtube about my home country, Taiwan. Do take a look at it.

http://www.youtube.com/watch?v=gRu2oK0Kqc4

Follow your enthusiasm

I know I have an enthusiasm with computer engineering, but that same enthusiasm never shows in my research. What was going wrong, I wondered, for a long long time.

I was always “thinking” what I “should do,” not following what I “wanted” to do. My life was always divided into two pieces, one on my study, the other one my dream system. I ended up having no chance and time to fulfill my dream and little motivation to study and research well.

It was a dream last night that unveiled the problem and that told me what to do. What if I can follow my enthusiasm, solving the problems along the way and turning it into a dissertation?

Ruby on Rails

A friend said on his Twitter, “用PHP做Rails做的事真不是人幹的XD.”

After a short dialog over the email, I learned I should be able to do with RoR everything that can be done with PHP. I have to admit that PHP makes me suffer, but I always thought it was because I was not used to it.

Seems time to learn yet another new script language. I wonder if RoR can “separate data manipulation (DB access) from data presentation (generating HTML).” It would be great if it can. That would really be a life saver.

So, will RoR be the language I use to implement an e-voting system?

Core Java

Core Java

I have read several different books while learning various computer languages. For Pascal, my first language, I used D. Cooper’s “Oh! Pascal!” For C++, I read S. Lipman’s “C++ Primer.” For Perl, I read R. Schwartz’s “Learning Perl.” For Java, I read “The Java Tutorial” and “Core Java.”

Among all the books I have read, Core Java is my favorite. C++ Primer delved into detailed aspects of C++ syntax using “toy examples.” By contrast, Core Java is not only a “tutorial,” but a good “recipe” and “reference.” It elaborates Java as deep as C++ Primer does C++, but does not make me feel even half as tedious.

Default packages

In a class A, which belongs to package pkg, declare a variable of a class whose source file is in default package?

I think it should be able to. But it doesn’t work.