Download OPERATING SYSTEMS:

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Copland (operating system) wikipedia , lookup

Acorn MOS wikipedia , lookup

Library (computing) wikipedia , lookup

Commodore DOS wikipedia , lookup

MTS system architecture wikipedia , lookup

OS 2200 wikipedia , lookup

Batch file wikipedia , lookup

RSTS/E wikipedia , lookup

Plan 9 from Bell Labs wikipedia , lookup

Spring (operating system) wikipedia , lookup

DNIX wikipedia , lookup

ICL VME wikipedia , lookup

Process management (computing) wikipedia , lookup

CP/M wikipedia , lookup

Burroughs MCP wikipedia , lookup

VS/9 wikipedia , lookup

Unix security wikipedia , lookup

Transcript
OPERATING SYSTEMS:
DESIGN AND IMPLEMENTATION
1. INTRODUCTION

Software has two kinds:
System Programs: Provides interface between Hardware and Software (O/S)
Application Programs: Performs the actual work the user wants


Physical devices: integrated circuit chips, wires, power supplies, CRT, etc
Microprogramming: set of instructions that define machine language. It interprets instructions
such as ADD, MOVE, JUMP
Located in ROM
RISC (Reduced Instructions Set Computers) don’t have a microprogramming level “executes
the machine language instructions directly”
Machine Language: has 50 – 300 instructions to perform arithmetic and compare values
I/O devices are controlled by loading values into device registers
Operating System: Runs in Kernel mode or Supervisor mode “protected from user’s
tampering”
Compilers, editors, and command interpreters (shell) are run in user mode


1.1. WHAT IS AN OPERATING SYSTEM?
1.1.1. THE O/S AS AN EXTENDED MACHINE
The function of the O/S is to present the user with an extended machine or virtual machine
that is easier to program than the underlying hardware.
1.1.2. THE O/S AS A RESOURCE MANAGER
Its primary task is to keep track of who is using which resource, to grant resource request, to
account for usage, and to mediate conflicting requests from different users. Also sharing
information (files, Databases, etc.)
1.2. HISTORY OF O/S (S)
1.2.1. FIRST GENERATION (1945 – 1955) VACUUM TUBES
All programming done in absolute machine language
1.2.2. SECOND GENERATION (1955 – 1965) TRANSISTORS AND BATCH SYSTEMS
Used mostly for scientific and engineering calculations using FORTRAN and Assembly
Languages
1.2.3.
THIRD GENERATION (1965 – 1980) ICS AND MULTIPROGRAMMING
IC Integrated Circuits provided a major price/performance over 2 nd generations machines
The code consisted of millions of lines of Assembly language written by thousands of
programmers and contained thousands of bugs, which necessitated continuous stream of
new releases. With new releases, new bugs were introduced
Multiprogramming: partitioning the memory with a different job in each partition. Special
hardware protects each job against other jobs running in memory at once
Spooling “Simultaneous Peripheral Operation On Line”: whenever a running job finished,
O/S load a new job from disk to the now-empty partition and run it
Timesharing: each user has an on-line terminal where CPU times is dedicated only to the
jobs that need service “MULTICS”
1.2.4. FOURTH GENERATION (1980 – PRESENT) PC (S)
The LSI (Large Scale Integration) circuits helped introduce the PCs
1.2.5.
UNIX “Network Servers”
1.3. OPERATING SYSTEM CONCEPTS
1.3.1. PROCESS: a program in execution. Associated with each process:
ADDRESS SPACE: memory locations from 0 – maximum, which the process can read and
write. It contains: the executable program, the program’s data, and its stack
Set of registers, including the program counter, stack pointer, and H/W registers
Process Table: An array of structures, one for each currently in existence that contains all
the information about the process
Core Image: a suspended process that contains its address spaces and its process table
Command Interpreter “Shell”: reads a command from a terminal that forces the shell to
create a process for it. When it is finished, it executes a system call to terminate itself
Child Processes: when a process creates one or more other processes, and these
processes in turn create child processes
Interprocess Communication: related processes that are cooperating must communicate
synchronize their activities
Signal: A signal causes a process to temporarily suspend whatever its doing by saving its
registers on the stack and start running a special signal handling procedure to retransmit a
presumably lost message “traps detected by hardware”  “executing illegal instructions”
1.3.2. FILES: “is a file (sequence of Bytes – Record = byte)”
DIRECTORY: a way of grouping files together
PATH NAME: a file can be specified from the top of the directory hierarchy “root directory” by
giving its path name  /Students/Leo
THE UNIX O/S FILE SYSTEM:
1. Everything is a file (a sequence of bytes; record = byte)
2. Directories: Multilevel (implemented as files). Contain pairs: filename, i-node address)
3. Directory commands: chdir “cd”, mkdir, rmdir, pwd.
4. File commands: rm, mv, cp, cat, ls,
5. Several links to a file  shared file.
6. Protection:
a. A permission change has 3 parts:
Relative method
i. u for file’s owner, g for the file’s group, o for others “UNIX public”, a for everyone
ii. Adding, deleting or setting exact permissions, +, -, = respectively
iii. = Clears the selected permission field and sets it to the code specified. If you do not
specify a permission code following =, chmod removes all permissions from the
selected field
iv. r  read, w  write, and e  execute
Symbolic method
v. 4  read, 2  write, and 1  execute
Ex:
$ ls –l saints:  show file’s properties with a long list
owner group everyone
d rwe rwe
rwe
# links owner size B Date mod
name
- rwr-r-1
Jason 2045 Jan 15 1:00
saints
chmod a+r *.html
chmod 444 *.html
chmod uog-w saints
chmod uog=r saints
chmod 444 saints
 gives all files read permission that end with html type at all levels
 removes the write permission on the saints file for everyone
 lets everyone have read permission on the file saints
PIPE: a Pseudofile that can be used to connect two processes
1.3.3.
THE SHELL: A program that serves as an interface between the user and UNIX kernel.
Several shells are available: Bourne shell (sh), C shell (csh), and Korn shell (ksh).
Their prompt signs are usually: $, %, # respectively
1.4. OPERATING SYSTEM STRUCTURE:
1.4.1. MONOLITHIC SYSTEM: “The Big Mess”
A MAIN PROGRAM THAT INVOKES THE REQUESTED SERVICE PROCEDURE
A SET OF SERVICE PROCEDURES THAT CARRY OUT THE SYSTEM CALLS
A SET OF UTILITY PROCEDURES THAT HELPS THE SERVICE PROCEDURES
1.4.2.
LAYERED SYSTEMS:
1.4.3.
VIRTUAL M ACHINES:
1.4.4.
CLIENT SERVER MODEL: