2

In the Wikipedia article for time sharing, it says

The "state" of each user and their programs would have to be kept in the machine, and then switched between quickly. This would take up computer cycles, and on the slow machines of the era this was a concern. However, as computers rapidly improved in speed, and especially in size of core memory in which users' states were retained, the overhead of time-sharing continually decreased, relatively speaking.

The fact that overhead decreased with increased core memory seems to imply there was a sort of swap file that needed to be used if memory was limited, temporarily moving data from memory to long term storage like tape and then back again. Is this how it worked? If not, how did these systems distribute memory among their users?

1 Answer 1

5

In early timesharing systems, there was no attempt to keep more than one job/process in core at any time, since there wasn't enough core. Context switching involved writing one job out to secondary storage, and reading another one in.

Secondary storage could be conventional tape, block-addressable tape (LINCtape, DECtape), disk, or drum, in increasing order of preference. This storage is the "swap file".

With more core, you could consider keeping more than one job in core at the same time. The division was straightforward: the kernel/monitor/exec (terms vary) kept track of who owned what. Generally, the allocation was first-come first-served, possibly with limits on what you could ask for. The core allocation for a particular job would typically be one or two (machine-dependent decision) contiguous pieces - this is before paged or segmented memory.

If you were lucky, the hardware had mechanisms to prevent a job from accessing outside its own allocation. Sometimes jobs needed to be shuffled to obtain contiguous space.

Edited to add this link to a paper from McCarthy, written in 1983, recalling his early ideas on timesharing.

9
  • To what extent was tape-based time sharing useful? I would think that the primary situations where time-sharing would have been useful on older platforms would have been when many users were running the same program and submitting queries that would effectively run to completion, so as to minimize the need to change state. I suppose that if one has a system which is supposed to be available 24/7 but is often idle for long periods, one could have a long-running task that can get swapped out to tape if a query arrives, but that would seem an unusual use case.
    – supercat
    Mar 5, 2019 at 16:24
  • I always thought that "timesharing" meant interactive time sharing (i.e., each user has a "login session" from a "terminal" somewhere). But what you describe sounds more like a batch computing environment in which long jobs can be paused to allow higher-priority jobs to run. Was that mode also called "timesharing?" Mar 5, 2019 at 17:04
  • Historically, the name was first used both ways: by Strachey for what we'd call "multiprogramming" now, and by McCarthy for interactive access to a shared computer. I used it the latter way. The first operational timesharing system, CTSS originally swapped to tape, requiring one deck per user. The cycle was something like "type some input, get swapped in, display some output, get swapped out, think". Note that a slow TTY really helps, since you don't notice your job is swapped out while the output is still coming out! Mar 5, 2019 at 23:56
  • @supercat - "many users" is not a term that goes with the vintage systems I'm thinking of. The aforementioned CTSS system had a max of 4 users. I suppose (this was before my time) tape might not have been great, but it was better than not having interactive access. Mar 6, 2019 at 0:09
  • @another-dave: I don't think such systems would use slow TTYs. More likely some sort of terminal that has a significant amount of buffering, perhaps implemented using delay-line storage. I've used some terminals such as a 3270 which allowed the user to type a screen-full of data without involving the host, and then hit a button to submit it all.
    – supercat
    Mar 6, 2019 at 6:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .