Lions' Commentary On Unix 6th Edition With Source Code / Edition 6

Lions' Commentary On Unix 6th Edition With Source Code / Edition 6

ISBN-10:
1573980137
ISBN-13:
9781573980135
Pub. Date:
01/01/1996
Publisher:
Annabooks
ISBN-10:
1573980137
ISBN-13:
9781573980135
Pub. Date:
01/01/1996
Publisher:
Annabooks
Lions' Commentary On Unix 6th Edition With Source Code / Edition 6

Lions' Commentary On Unix 6th Edition With Source Code / Edition 6

Paperback

$40.07
Current price is , Original price is $44.95. You
$40.07  $44.95 Save 11% Current price is $40.07, Original price is $44.95. You Save 11%.
  • SHIP THIS ITEM
    Temporarily Out of Stock Online
  • PICK UP IN STORE

    Your local store may have stock of this item.

  • SHIP THIS ITEM

    Temporarily Out of Stock Online

    Please check back later for updated availability.


Overview

The most famous suppressed book in computer history!

• Used as an Operating System textbook at MIT"After 20 years, this is still the best expostion of the workings of a 'real' operating system."
--- Ken Thompson (Developer of the UNIX operating system)After years of suppression (as trade secrets) by various owners of the UNIX code, this tome has been re-released, and we owe a debt to all involved in making this happen. I consider this to be the single most important book of 1996.
Unix Review, June 1997"The Lions book", cherished by UNIX hackers and widely circulated as a photocopied bootleg document since the late 1970's, is again available in an unrestricted edition. This legendary underground classic, reproduced without modification, is really two works in one: the complete source code to an early version (Edition 6) of the UNIX operating system, a treasure in itself! a brilliant commentary on that code by John Lionswith additional historical perspective essays added in 1996.Lions' marriage of source code with commentary was originally used as an operating systems textbook, a purpose for which it remains superbly well-suited (as evidenced by it's ongoing use at MIT).


Product Details

ISBN-13: 9781573980135
Publisher: Annabooks
Publication date: 01/01/1996
Series: Computer Classics Revisited Series
Edition description: 6TH
Pages: 260
Sales rank: 201,353
Product dimensions: 8.25(w) x 11.00(h) x 0.55(d)

Read an Excerpt

Chapter 8: Process Management

Process management is concerned with the sharing of the processor and the main memory amongst the various processes, which can be seen as competitors for these resources.

Decisions to reallocate resources are made from time to time, either on the Initiative of the process which holds the resource, of for some other reason.

Process Switching

An active process may suspend itself i.e relinquish the processor, by calling "swtch" (2178) which calls "retu" (0740). This may be done for example if a process has reached a point beyond which it cannot proceed immediately. The process calls "sleep" (2066) which calls "swtch".

Alternatively a kernel process which is ready to revert to user mode will test the variable "runrun" and if this is non-zero, implying that a process with a higher precedence is ready to run, the kernel process will call "swtch".

"swtch" searches the "proc" table, for entries for which "p stat" equals "SRUN" and the "SLOAD" bit is set in "p_flag". From these it selects the process for which the value of "p_pri" is a minimum, and transfers control to it.

Values for "p_pri" are recalculated for each process from time to time by use of the procedure "setpri" (2156). Obviously the algorithm used by "setpri" has a significant influence.

A process which has called "sleep" and suspended itself may be returned to the "ready to run" state by another process. This often occurs during the handling of interrupts when the processhandling the interrupt calls "setrun" (2134) either directly or indirectly via a call on "wakeup" (2113).

Interrupts

It should be noted that a hardware interrupt (see Chapter Nine) does not directly cause a call on "swtch" or its equivalent. A hardware interrupt will cause a user process to revert to a kernel process, which as just noted, may call "swtch" as an alternative to reverting to user mode after the interrupt handling is complete.

If a kernel process is interrupted, then after the interrupt has been handled, the kernel process resumes where it had left off regardless. This point is important for understanding how UNIX avoids many of the pitfalls associated with "critical sections" of code, which are discussed at the end of this chapter.

Program Swapping

In general there will be insufficient main memory for all the process images at once, and the data segments for some of these will have to be 'swapped out* i.e. written to disk in a special area designated as the swap area.

While on disk the process images are relatively inaccessible and certainly unexecutable. The set of process images in main memory must therefore be changed regularly by swapping images in and out. Most decisions regarding swapping are made by the procedure "sched" (1940) which is considered in detail in Chapter Fourteen.

"sched" is executed by process #0, which after completing its initial tasks, spends its time in a double role: openly as the "scheduler" i.e.a normal kernel process; and surreptitiously as the intermediate process of "swtch" (discussed in Chapter Seven). Since the procedure "sched" never terminates, kernel process #0 never completes its task, and so the question of a user process #0 does not arise.

Jobs

There is no concept of "job" in UNIX, at least in the sense in which this term is understood in more conventional, batch processing oriented systems.

Any process may "fork" a new copy of itself at any time, essentially without delay, and hence create the equivalent of a new job. Hence job scheduling, job classes, etc. are non-events here. . . .

Table of Contents

Acknowledgments
Prefatory Notes
Forewords
A Short Historical Note
UNIX Operating system Source Code Level Six
A Commentary on the UNIX operating System

Appreciations
About the Author
From the B&N Reads Blog

Customer Reviews