SlideShare a Scribd company logo
1
KUMO B4 shuya
Ritchie, O. M., and Ken Thompson. “The UNIX time-sharing system.”
The Bell System Technical Journal 57.6 (1978): 1905-1929.
2
UNIX is general-purpose, multi-user, interactive OS
A hierarchical file system incorporating demountable volumes

Compatible file, device, and inter-process I/O

The ability to initiate asynchro- nous processes 

System command language select- able on a per-user basis 

Over 100 subsystems including a dozen languages
3
UNIX the system are simple, elegance, ease of use
First UNIX is installed on DEC PDP-11/40 computer

Powerful operating system for interactive use

Not expensive either in equipment ($4,000) or in human effort

These programs are available under UNIX

- assembler, text editor, link loader, compiler…

All UNIX software is maintained under UNIX PDP-11/40
http://webpages.charter.net/thecomputercollection/pdp11/pdp1140.jpg
4
PDP-11/45 UNIX installed Computer

- 16-bit word (8-bit byte) computer, Core memory 144K bytes

- UNIX occupies 42K bytes

UNIX occupies 42K bytes

The minimum configuration require 50K bytes of core
The minimal system capable of running the software
5
The size of UNIX written in C is one third greater than old one

which written in assembly.

New system is not only easier to understand and to modify

but also many functional improvements

- multiprogramming, can share reentrant code
UNIX software is written in C language
6
Ordinary Files
- A file contains whatever information the user places on it

Directories
- Files for managing regular files and special files

Special Files
- Treat peripheral devices as virtual files
UNIX has three file system
7
Ordinary Files
A file contains whatever information the user places on it

Ex. -> symbolic or binary programs

System don’t expect file structure.

Structure of files is controlled by programs not by system
8
Directories
It provide mapping between file names and themselves

Each user has a directory of his own files and 

can create subdirectories

Several directories is maintained by system for its own use

- root - all files can be found by tracing a path through

Files are named by sequence of 14 fewer characters
9
Directories
Directory names are separated by slash “/”

- If the sequence begin with slash, search begin in “root”

- Not starting with slash, search begin in current directory

The name “.” in each directory refers to directory itself

The name “..” in each directory refers to its parent

Same nondirectory file may appear in several directories

which called linking
10
“root” is stored on same device but it is not necessary that

the entire file system hierarchy reside on this device

Mount replaces a leaf of the hierarchy tree by new subtree

After the mount, there is virtually no distinction between files

on the removable volume and parent file system

No link may exist between one file system hierarchy and 

another
11
Access control scheme in UNIX is quite simple
Each user is assigned a unique user ID number

When a file is created, it is marked with ID of its owner

Also given for new files is set of seven protection bits

Privileged programs are not accessed by other users

The system recognizes “super-user” as except from the usual

constraints on file access
12
System calls todo I/O of UNIX is quite simple
filep = open (name, flag)
- filep is called file descriptor which is used to identify to
read, write, manipulate

- name indicates the name of the file 

- flag indicates file status such as read, write

location = seek (filep, base, offset)
- offset indicates starting points and base indicates
destination
13
System calls todo I/O of UNIX is quite simple
n = read (filep, buffer, count)
n = write (filep, buffer, count)
- n is the number of bytes transmitted

- buffer is is specified byte array

- count is number of bytes to receive / send

write case, n is the same as count
read case, n is less than count when read call returns equal to
zero it indicates the end of the file
14
Data structure of UNIX file system
Directory entry contains only a name for the associated file

and pointer which integer is called “i-number” (index number)

“i-list” stored the device on which the directory resides 

when the file is accessed

“i-node” contains the description of the file as follow

- owner, protection, address, size, last modification …
15
An image is a computer excitation environment

- An image is current state of pseudo computer

- core image, general register values, status of files ...

An process is the execution of an image

- During processing, image resides in core

An image is divided into [text, data, stack] segments

- Machine instruction is placed in text segment
- Data (variables on heap) is placed in data segment
- Stack segment is place for stack, auto variables placed in
16
New process is presented by only by fork system call
processid = fork (label)
When fork is executed by a process, it spills into two process 

- parent, control returns directly from fork

- child, control is passed to location label

The processid is the identification of the other program
fork may determine whether process is the parent or child
17
pipe is used for interprocess communication
filep = pipe ( )
- It returns filep and creates interprocess channel called pipe
- pipe is passed from parent to child process in the image

by the fork call

- One pipe returns two file descriptor (for read and write)
18
Requests the system to read in and execute program
execute (file, arg1, arg2, …, argn)
- arg1 is the same string as file, so that program may
determine the name by which it was invoked

- All the code and data in the process using excuse is
replaced from file
19
processid = wait ( )
- wait suspend execution until its children has completed
execution

- It returns the processid of the terminated process

exit (status)
- exit terminates a process, destroy its image, close its files

- Process may also terminate as result of various illegal
actions or user-granted signals
20
When communicate UNIX, the Shell is helpful
The shell is command line interpreter

command arg1, arg2, …, argn
- Command line consist of command name and arguments

- The command name and arguments separated by spaces

The site of command
- Directory /bin contains all the commands generally used

- Path of command may be including “/” character to specify
21
No special coding is needed handling I/O redirection
The shell start with two files which have file descriptor 0, 1

- 0 is for reading, programs read massages typed by users

- 1 is for writing, understood as the standard output

The shell can change standard assignments of file descriptor

The file name following “<” and “>” are called redirect

- “<” means place out put 

- “>” take input followed arguments
22
Example of Standard I/O use
$ ls >there
- Create a file called “there” and places the listing

$ ed <script
- It interprets script as a file of editor command
Execution Example
23
Filter copies standard input to its standard output
A sequence of commands separated by vertical vars causes
to execute simultaneously and standard out put of each
commands is delivered to the next commands.

$ cat /var/log/secure | grep sudo > sudo_result
- $ cat /var/log/secure > temp1

- $ grep sudo < temp1 > temp2

- $ sudo_result < temp2
Example
Divided…
24
The shell is itself a command
$ ls; ed
- With semicolon when ls ends, ed is executed

$ as source >output &
- Assembling source and diagnostic output going to output
$ as source >output & ls >files &
- Both assembly and listing in the background
$ (date; ls) >x &
- Print current date followed by listing output going to x
25
Sequential use of commands
$ as source

$ mv a.out testprog

$ testprog

as assembles code and output a.out (binary)

mv causes a.out to be renamed testprog

testprog executes itself

$ sh <tryout

sh to excute the commands sequentially
26
Waiting
read return
Analyze
command
line
fork called
How to work the Shell
The new-line character

ending the line is typed
Putting the arguments

in a form for execute
fork childfork parent
wait
exec
exit
Die process
2727
When a process is created by the fork primitive

- It inherits the core image, all open files in parents with file
descriptor

- Its child process automatically inherits file descriptor value

When a n argument with “<” or “>” is given

- Offspring process, before it execute, makes the standard 

I/O file descriptor 0 or 1 respectively refer to the named file

Terminate point

- Discovering an end of file, the Shell terminates
28
init creates one process for each typewriter channel
The last step in the initialization of UNIX is the creation of a 

single process and invocation of a program called init.

When init was invoked there were no files open, in each 

process I/O devices will receive 0 or 1 file descriptor.

When user typed correct login name and password, init will 

wake up and change the user’s default current directory.

Logout need only type the end of the file sequence.
29
Faults cause the processor to trap to a system routine
Faults are such as..

- Referring nonsexist memory, unimplemented instruction…

When an illegal action is caught, the system terminates the 

process and writes the user’s image on file core

A debugger can be used to determine faults

“deletes” is interrupt signal which simply cease execution

quit signal is also used to force a core image to be produced
30
Three consideration influenced the design of UNIX
❶ From programmers perspective…

- Interactive system is much more productive and satisfying to 

use than a “batch” system

❷ Severe regulation of system an d its software

- The size constraint made economy and elegance of design.

❸ UNIX is able to maintain themselves

- Programs are always available and modified online, we were 

willing to rewrite the system when new idea were invented

More Related Content

What's hot

Linux standard file system
Linux standard file systemLinux standard file system
Linux standard file systemTaaanu01
 
Course 102: Lecture 5: File Handling Internals
Course 102: Lecture 5: File Handling Internals Course 102: Lecture 5: File Handling Internals
Course 102: Lecture 5: File Handling Internals Ahmed El-Arabawy
 
Install and configure linux
Install and configure linuxInstall and configure linux
Install and configure linuxVicent Selfa
 
Complete Guide for Linux shell programming
Complete Guide for Linux shell programmingComplete Guide for Linux shell programming
Complete Guide for Linux shell programmingsudhir singh yadav
 
Unix Shell Scripting
Unix Shell ScriptingUnix Shell Scripting
Unix Shell ScriptingMustafa Qasim
 
Linux and windows file system
Linux and windows  file systemLinux and windows  file system
Linux and windows file systemlin yucheng
 
Introduction to Operating System
Introduction to Operating SystemIntroduction to Operating System
Introduction to Operating SystemImtiaz Ahmed
 
Advance linux presentation_0702011
Advance linux presentation_0702011Advance linux presentation_0702011
Advance linux presentation_0702011Aravindan Arun
 
Course 102: Lecture 12: Basic Text Handling
Course 102: Lecture 12: Basic Text Handling Course 102: Lecture 12: Basic Text Handling
Course 102: Lecture 12: Basic Text Handling Ahmed El-Arabawy
 
Operating Systems 1 (3/12) - Architectures
Operating Systems 1 (3/12) - ArchitecturesOperating Systems 1 (3/12) - Architectures
Operating Systems 1 (3/12) - ArchitecturesPeter Tröger
 
Linux System Programming - File I/O
Linux System Programming - File I/O Linux System Programming - File I/O
Linux System Programming - File I/O YourHelper1
 
Kernel Configuration and Compilation
Kernel Configuration and CompilationKernel Configuration and Compilation
Kernel Configuration and CompilationBud Siddhisena
 
Posix threads(asha)
Posix threads(asha)Posix threads(asha)
Posix threads(asha)Nagarajan
 
Linux Administration
Linux AdministrationLinux Administration
Linux AdministrationHarish1983
 
File system.
File system.File system.
File system.elyza12
 
file system in operating system
file system in operating systemfile system in operating system
file system in operating systemtittuajay
 

What's hot (20)

Linux standard file system
Linux standard file systemLinux standard file system
Linux standard file system
 
Course 102: Lecture 5: File Handling Internals
Course 102: Lecture 5: File Handling Internals Course 102: Lecture 5: File Handling Internals
Course 102: Lecture 5: File Handling Internals
 
Install and configure linux
Install and configure linuxInstall and configure linux
Install and configure linux
 
Complete Guide for Linux shell programming
Complete Guide for Linux shell programmingComplete Guide for Linux shell programming
Complete Guide for Linux shell programming
 
Unix Shell Scripting
Unix Shell ScriptingUnix Shell Scripting
Unix Shell Scripting
 
Linux and windows file system
Linux and windows  file systemLinux and windows  file system
Linux and windows file system
 
Introduction to Operating System
Introduction to Operating SystemIntroduction to Operating System
Introduction to Operating System
 
Advance linux presentation_0702011
Advance linux presentation_0702011Advance linux presentation_0702011
Advance linux presentation_0702011
 
Course 102: Lecture 12: Basic Text Handling
Course 102: Lecture 12: Basic Text Handling Course 102: Lecture 12: Basic Text Handling
Course 102: Lecture 12: Basic Text Handling
 
Operating Systems 1 (3/12) - Architectures
Operating Systems 1 (3/12) - ArchitecturesOperating Systems 1 (3/12) - Architectures
Operating Systems 1 (3/12) - Architectures
 
Shell Scripting
Shell ScriptingShell Scripting
Shell Scripting
 
Linux System Programming - File I/O
Linux System Programming - File I/O Linux System Programming - File I/O
Linux System Programming - File I/O
 
Kernel Configuration and Compilation
Kernel Configuration and CompilationKernel Configuration and Compilation
Kernel Configuration and Compilation
 
Linux Programming
Linux ProgrammingLinux Programming
Linux Programming
 
Windows Kernel-
Windows Kernel-Windows Kernel-
Windows Kernel-
 
Posix threads(asha)
Posix threads(asha)Posix threads(asha)
Posix threads(asha)
 
Basics of shell programming
Basics of shell programmingBasics of shell programming
Basics of shell programming
 
Linux Administration
Linux AdministrationLinux Administration
Linux Administration
 
File system.
File system.File system.
File system.
 
file system in operating system
file system in operating systemfile system in operating system
file system in operating system
 

Similar to Summarized of UNIX Time Sharing System

Linux Notes-1.pdf
Linux Notes-1.pdfLinux Notes-1.pdf
Linux Notes-1.pdfasif64436
 
Basics of Linux Commands, Git and Github
Basics of Linux Commands, Git and GithubBasics of Linux Commands, Git and Github
Basics of Linux Commands, Git and GithubDevang Garach
 
Linux 系統程式--第一章 i/o 函式
Linux 系統程式--第一章 i/o 函式Linux 系統程式--第一章 i/o 函式
Linux 系統程式--第一章 i/o 函式艾鍗科技
 
Lesson 1 Linux System Fundamentals
Lesson 1 Linux System Fundamentals  Lesson 1 Linux System Fundamentals
Lesson 1 Linux System Fundamentals Sadia Bashir
 
84640411 study-of-unix-os
84640411 study-of-unix-os84640411 study-of-unix-os
84640411 study-of-unix-oshomeworkping3
 
Chapter 2 Introduction to Unix Concepts
Chapter 2 Introduction to Unix ConceptsChapter 2 Introduction to Unix Concepts
Chapter 2 Introduction to Unix ConceptsMeenalJabde
 
Karkha unix shell scritping
Karkha unix shell scritpingKarkha unix shell scritping
Karkha unix shell scritpingchockit88
 
Unix operating system architecture with file structure
Unix operating system architecture with file structure Unix operating system architecture with file structure
Unix operating system architecture with file structure amol_chavan
 
Introduction to Unix-like systems (Part I-IV)
Introduction to Unix-like systems (Part I-IV)Introduction to Unix-like systems (Part I-IV)
Introduction to Unix-like systems (Part I-IV)hildenjohannes
 
Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to UnixSudharsan S
 

Similar to Summarized of UNIX Time Sharing System (20)

Systemcall1
Systemcall1Systemcall1
Systemcall1
 
Linux Notes-1.pdf
Linux Notes-1.pdfLinux Notes-1.pdf
Linux Notes-1.pdf
 
Basics of Linux Commands, Git and Github
Basics of Linux Commands, Git and GithubBasics of Linux Commands, Git and Github
Basics of Linux Commands, Git and Github
 
Linux 系統程式--第一章 i/o 函式
Linux 系統程式--第一章 i/o 函式Linux 系統程式--第一章 i/o 函式
Linux 系統程式--第一章 i/o 函式
 
Lesson 1 Linux System Fundamentals
Lesson 1 Linux System Fundamentals  Lesson 1 Linux System Fundamentals
Lesson 1 Linux System Fundamentals
 
84640411 study-of-unix-os
84640411 study-of-unix-os84640411 study-of-unix-os
84640411 study-of-unix-os
 
Linux Commands
Linux CommandsLinux Commands
Linux Commands
 
Basics of unix
Basics of unixBasics of unix
Basics of unix
 
Chapter 2 Introduction to Unix Concepts
Chapter 2 Introduction to Unix ConceptsChapter 2 Introduction to Unix Concepts
Chapter 2 Introduction to Unix Concepts
 
Karkha unix shell scritping
Karkha unix shell scritpingKarkha unix shell scritping
Karkha unix shell scritping
 
Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to Unix
 
Unix operating system architecture with file structure
Unix operating system architecture with file structure Unix operating system architecture with file structure
Unix operating system architecture with file structure
 
Operating system
Operating systemOperating system
Operating system
 
Introduction to Unix-like systems (Part I-IV)
Introduction to Unix-like systems (Part I-IV)Introduction to Unix-like systems (Part I-IV)
Introduction to Unix-like systems (Part I-IV)
 
Prog i
Prog iProg i
Prog i
 
Introduction to unix
Introduction to unixIntroduction to unix
Introduction to unix
 
Unix
UnixUnix
Unix
 
Linux
LinuxLinux
Linux
 
Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to Unix
 
App A
App AApp A
App A
 

More from Shuya Osaki

第2章 プロトコル
第2章 プロトコル第2章 プロトコル
第2章 プロトコルShuya Osaki
 
公的個人認証サービスを用いたスマートエスクロー
公的個人認証サービスを用いたスマートエスクロー公的個人認証サービスを用いたスマートエスクロー
公的個人認証サービスを用いたスマートエスクローShuya Osaki
 
学部紹介セミナー[森村学園高等部]
学部紹介セミナー[森村学園高等部]学部紹介セミナー[森村学園高等部]
学部紹介セミナー[森村学園高等部]Shuya Osaki
 
OSTEP Chapter2 Introduction
OSTEP Chapter2 IntroductionOSTEP Chapter2 Introduction
OSTEP Chapter2 IntroductionShuya Osaki
 
マスタリングTCP/IP 入門編 1章
マスタリングTCP/IP 入門編 1章マスタリングTCP/IP 入門編 1章
マスタリングTCP/IP 入門編 1章Shuya Osaki
 
Nand2 tetris 1and2
Nand2 tetris 1and2Nand2 tetris 1and2
Nand2 tetris 1and2Shuya Osaki
 
RG_LT大会_SFCで車通学をする
RG_LT大会_SFCで車通学をするRG_LT大会_SFCで車通学をする
RG_LT大会_SFCで車通学をするShuya Osaki
 
Primer to Browser Netwroking
Primer to Browser NetwrokingPrimer to Browser Netwroking
Primer to Browser NetwrokingShuya Osaki
 
How to Upload File in SFC.
How to Upload File in SFC.How to Upload File in SFC.
How to Upload File in SFC.Shuya Osaki
 
How to Use Email in SFC.
How to Use Email in SFC.How to Use Email in SFC.
How to Use Email in SFC.Shuya Osaki
 
自動運転の概要
自動運転の概要自動運転の概要
自動運転の概要Shuya Osaki
 
Introduction to QUIC
Introduction to QUICIntroduction to QUIC
Introduction to QUICShuya Osaki
 
ハイパフォーマンスブラウザネットワーキング2
ハイパフォーマンスブラウザネットワーキング2ハイパフォーマンスブラウザネットワーキング2
ハイパフォーマンスブラウザネットワーキング2Shuya Osaki
 
ハイパフォーマンスブラウザネットワーキング1
ハイパフォーマンスブラウザネットワーキング1ハイパフォーマンスブラウザネットワーキング1
ハイパフォーマンスブラウザネットワーキング1Shuya Osaki
 

More from Shuya Osaki (15)

第2章 プロトコル
第2章 プロトコル第2章 プロトコル
第2章 プロトコル
 
公的個人認証サービスを用いたスマートエスクロー
公的個人認証サービスを用いたスマートエスクロー公的個人認証サービスを用いたスマートエスクロー
公的個人認証サービスを用いたスマートエスクロー
 
学部紹介セミナー[森村学園高等部]
学部紹介セミナー[森村学園高等部]学部紹介セミナー[森村学園高等部]
学部紹介セミナー[森村学園高等部]
 
OSTEP Chapter2 Introduction
OSTEP Chapter2 IntroductionOSTEP Chapter2 Introduction
OSTEP Chapter2 Introduction
 
マスタリングTCP/IP 入門編 1章
マスタリングTCP/IP 入門編 1章マスタリングTCP/IP 入門編 1章
マスタリングTCP/IP 入門編 1章
 
Nand2 tetris 1and2
Nand2 tetris 1and2Nand2 tetris 1and2
Nand2 tetris 1and2
 
RG_LT大会_SFCで車通学をする
RG_LT大会_SFCで車通学をするRG_LT大会_SFCで車通学をする
RG_LT大会_SFCで車通学をする
 
RG講義_SSH
RG講義_SSHRG講義_SSH
RG講義_SSH
 
Primer to Browser Netwroking
Primer to Browser NetwrokingPrimer to Browser Netwroking
Primer to Browser Netwroking
 
How to Upload File in SFC.
How to Upload File in SFC.How to Upload File in SFC.
How to Upload File in SFC.
 
How to Use Email in SFC.
How to Use Email in SFC.How to Use Email in SFC.
How to Use Email in SFC.
 
自動運転の概要
自動運転の概要自動運転の概要
自動運転の概要
 
Introduction to QUIC
Introduction to QUICIntroduction to QUIC
Introduction to QUIC
 
ハイパフォーマンスブラウザネットワーキング2
ハイパフォーマンスブラウザネットワーキング2ハイパフォーマンスブラウザネットワーキング2
ハイパフォーマンスブラウザネットワーキング2
 
ハイパフォーマンスブラウザネットワーキング1
ハイパフォーマンスブラウザネットワーキング1ハイパフォーマンスブラウザネットワーキング1
ハイパフォーマンスブラウザネットワーキング1
 

Recently uploaded

The Use of AI in Indonesia Election 2024: A Case Study
The Use of AI in Indonesia Election 2024: A Case StudyThe Use of AI in Indonesia Election 2024: A Case Study
The Use of AI in Indonesia Election 2024: A Case StudyDamar Juniarto
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxlaozhuseo02
 
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理aagad
 
How Do I Begin the Linksys Velop Setup Process?
How Do I Begin the Linksys Velop Setup Process?How Do I Begin the Linksys Velop Setup Process?
How Do I Begin the Linksys Velop Setup Process?Linksys Velop Login
 
The AI Powered Organization-Intro to AI-LAN.pdf
The AI Powered Organization-Intro to AI-LAN.pdfThe AI Powered Organization-Intro to AI-LAN.pdf
The AI Powered Organization-Intro to AI-LAN.pdfSiskaFitrianingrum
 
ER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAEER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAEHimani415946
 
Article writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptxArticle writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptxabhinandnam9997
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shoplaozhuseo02
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesSanjeev Rampal
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxGal Baras
 
Pvtaan Social media marketing proposal.pdf
Pvtaan Social media marketing proposal.pdfPvtaan Social media marketing proposal.pdf
Pvtaan Social media marketing proposal.pdfPvtaan
 

Recently uploaded (12)

The Use of AI in Indonesia Election 2024: A Case Study
The Use of AI in Indonesia Election 2024: A Case StudyThe Use of AI in Indonesia Election 2024: A Case Study
The Use of AI in Indonesia Election 2024: A Case Study
 
The Best AI Powered Software - Intellivid AI Studio
The Best AI Powered Software - Intellivid AI StudioThe Best AI Powered Software - Intellivid AI Studio
The Best AI Powered Software - Intellivid AI Studio
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
 
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
 
How Do I Begin the Linksys Velop Setup Process?
How Do I Begin the Linksys Velop Setup Process?How Do I Begin the Linksys Velop Setup Process?
How Do I Begin the Linksys Velop Setup Process?
 
The AI Powered Organization-Intro to AI-LAN.pdf
The AI Powered Organization-Intro to AI-LAN.pdfThe AI Powered Organization-Intro to AI-LAN.pdf
The AI Powered Organization-Intro to AI-LAN.pdf
 
ER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAEER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAE
 
Article writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptxArticle writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptx
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
 
Pvtaan Social media marketing proposal.pdf
Pvtaan Social media marketing proposal.pdfPvtaan Social media marketing proposal.pdf
Pvtaan Social media marketing proposal.pdf
 

Summarized of UNIX Time Sharing System

  • 1. 1 KUMO B4 shuya Ritchie, O. M., and Ken Thompson. “The UNIX time-sharing system.” The Bell System Technical Journal 57.6 (1978): 1905-1929.
  • 2. 2 UNIX is general-purpose, multi-user, interactive OS A hierarchical file system incorporating demountable volumes Compatible file, device, and inter-process I/O The ability to initiate asynchro- nous processes System command language select- able on a per-user basis Over 100 subsystems including a dozen languages
  • 3. 3 UNIX the system are simple, elegance, ease of use First UNIX is installed on DEC PDP-11/40 computer Powerful operating system for interactive use Not expensive either in equipment ($4,000) or in human effort These programs are available under UNIX - assembler, text editor, link loader, compiler… All UNIX software is maintained under UNIX PDP-11/40 http://webpages.charter.net/thecomputercollection/pdp11/pdp1140.jpg
  • 4. 4 PDP-11/45 UNIX installed Computer - 16-bit word (8-bit byte) computer, Core memory 144K bytes - UNIX occupies 42K bytes UNIX occupies 42K bytes The minimum configuration require 50K bytes of core The minimal system capable of running the software
  • 5. 5 The size of UNIX written in C is one third greater than old one
 which written in assembly. New system is not only easier to understand and to modify
 but also many functional improvements - multiprogramming, can share reentrant code UNIX software is written in C language
  • 6. 6 Ordinary Files - A file contains whatever information the user places on it Directories - Files for managing regular files and special files Special Files - Treat peripheral devices as virtual files UNIX has three file system
  • 7. 7 Ordinary Files A file contains whatever information the user places on it Ex. -> symbolic or binary programs System don’t expect file structure. Structure of files is controlled by programs not by system
  • 8. 8 Directories It provide mapping between file names and themselves Each user has a directory of his own files and 
 can create subdirectories Several directories is maintained by system for its own use - root - all files can be found by tracing a path through Files are named by sequence of 14 fewer characters
  • 9. 9 Directories Directory names are separated by slash “/” - If the sequence begin with slash, search begin in “root” - Not starting with slash, search begin in current directory The name “.” in each directory refers to directory itself The name “..” in each directory refers to its parent Same nondirectory file may appear in several directories
 which called linking
  • 10. 10 “root” is stored on same device but it is not necessary that
 the entire file system hierarchy reside on this device Mount replaces a leaf of the hierarchy tree by new subtree After the mount, there is virtually no distinction between files
 on the removable volume and parent file system No link may exist between one file system hierarchy and 
 another
  • 11. 11 Access control scheme in UNIX is quite simple Each user is assigned a unique user ID number When a file is created, it is marked with ID of its owner Also given for new files is set of seven protection bits Privileged programs are not accessed by other users The system recognizes “super-user” as except from the usual
 constraints on file access
  • 12. 12 System calls todo I/O of UNIX is quite simple filep = open (name, flag) - filep is called file descriptor which is used to identify to read, write, manipulate - name indicates the name of the file - flag indicates file status such as read, write location = seek (filep, base, offset) - offset indicates starting points and base indicates destination
  • 13. 13 System calls todo I/O of UNIX is quite simple n = read (filep, buffer, count) n = write (filep, buffer, count) - n is the number of bytes transmitted - buffer is is specified byte array - count is number of bytes to receive / send write case, n is the same as count read case, n is less than count when read call returns equal to zero it indicates the end of the file
  • 14. 14 Data structure of UNIX file system Directory entry contains only a name for the associated file
 and pointer which integer is called “i-number” (index number) “i-list” stored the device on which the directory resides 
 when the file is accessed “i-node” contains the description of the file as follow - owner, protection, address, size, last modification …
  • 15. 15 An image is a computer excitation environment - An image is current state of pseudo computer - core image, general register values, status of files ... An process is the execution of an image - During processing, image resides in core An image is divided into [text, data, stack] segments - Machine instruction is placed in text segment - Data (variables on heap) is placed in data segment - Stack segment is place for stack, auto variables placed in
  • 16. 16 New process is presented by only by fork system call processid = fork (label) When fork is executed by a process, it spills into two process - parent, control returns directly from fork - child, control is passed to location label The processid is the identification of the other program fork may determine whether process is the parent or child
  • 17. 17 pipe is used for interprocess communication filep = pipe ( ) - It returns filep and creates interprocess channel called pipe - pipe is passed from parent to child process in the image
 by the fork call - One pipe returns two file descriptor (for read and write)
  • 18. 18 Requests the system to read in and execute program execute (file, arg1, arg2, …, argn) - arg1 is the same string as file, so that program may determine the name by which it was invoked - All the code and data in the process using excuse is replaced from file
  • 19. 19 processid = wait ( ) - wait suspend execution until its children has completed execution - It returns the processid of the terminated process exit (status) - exit terminates a process, destroy its image, close its files - Process may also terminate as result of various illegal actions or user-granted signals
  • 20. 20 When communicate UNIX, the Shell is helpful The shell is command line interpreter command arg1, arg2, …, argn - Command line consist of command name and arguments - The command name and arguments separated by spaces The site of command - Directory /bin contains all the commands generally used - Path of command may be including “/” character to specify
  • 21. 21 No special coding is needed handling I/O redirection The shell start with two files which have file descriptor 0, 1 - 0 is for reading, programs read massages typed by users - 1 is for writing, understood as the standard output The shell can change standard assignments of file descriptor The file name following “<” and “>” are called redirect - “<” means place out put - “>” take input followed arguments
  • 22. 22 Example of Standard I/O use $ ls >there - Create a file called “there” and places the listing $ ed <script - It interprets script as a file of editor command Execution Example
  • 23. 23 Filter copies standard input to its standard output A sequence of commands separated by vertical vars causes to execute simultaneously and standard out put of each commands is delivered to the next commands. $ cat /var/log/secure | grep sudo > sudo_result - $ cat /var/log/secure > temp1 - $ grep sudo < temp1 > temp2 - $ sudo_result < temp2 Example Divided…
  • 24. 24 The shell is itself a command $ ls; ed - With semicolon when ls ends, ed is executed $ as source >output & - Assembling source and diagnostic output going to output $ as source >output & ls >files & - Both assembly and listing in the background $ (date; ls) >x & - Print current date followed by listing output going to x
  • 25. 25 Sequential use of commands $ as source $ mv a.out testprog $ testprog as assembles code and output a.out (binary) mv causes a.out to be renamed testprog testprog executes itself $ sh <tryout sh to excute the commands sequentially
  • 26. 26 Waiting read return Analyze command line fork called How to work the Shell The new-line character
 ending the line is typed Putting the arguments in a form for execute fork childfork parent wait exec exit Die process
  • 27. 2727 When a process is created by the fork primitive - It inherits the core image, all open files in parents with file descriptor - Its child process automatically inherits file descriptor value When a n argument with “<” or “>” is given - Offspring process, before it execute, makes the standard 
 I/O file descriptor 0 or 1 respectively refer to the named file Terminate point - Discovering an end of file, the Shell terminates
  • 28. 28 init creates one process for each typewriter channel The last step in the initialization of UNIX is the creation of a 
 single process and invocation of a program called init. When init was invoked there were no files open, in each 
 process I/O devices will receive 0 or 1 file descriptor. When user typed correct login name and password, init will 
 wake up and change the user’s default current directory. Logout need only type the end of the file sequence.
  • 29. 29 Faults cause the processor to trap to a system routine Faults are such as.. - Referring nonsexist memory, unimplemented instruction… When an illegal action is caught, the system terminates the 
 process and writes the user’s image on file core A debugger can be used to determine faults “deletes” is interrupt signal which simply cease execution quit signal is also used to force a core image to be produced
  • 30. 30 Three consideration influenced the design of UNIX ❶ From programmers perspective… - Interactive system is much more productive and satisfying to 
 use than a “batch” system ❷ Severe regulation of system an d its software - The size constraint made economy and elegance of design. ❸ UNIX is able to maintain themselves - Programs are always available and modified online, we were 
 willing to rewrite the system when new idea were invented