lecture 2 : OS and UNIX/LINUX summary
Download
Report
Transcript lecture 2 : OS and UNIX/LINUX summary
LINUX System : Lecture 2
OS and UNIX summary
Bong-Soo Sohn
Assistant Professor
School of Computer Science and Engineering
Chung-Ang University
Acknowledgement : (i) wikipedia.org ,
(ii) http://www.doc.ic.ac.uk/~wjk/UnixIntro
Operating Systems
OS acts as an intermediary between user and HW
Resource Manager
Allocates and manages system resources (CPU, Memory, Disks,
Networks, … )
Efficient and fair use of the resources
Interface
OS allows users and application programs to access system
resources
Controls the execution of user programs accurately
Efficiently, Fairly, Safely(Accurately), Abstractly
Computer System Structure
HW – provides basic computing resources
CPU, memory, disk (flash memory), …
OS Kernel
direct control of underlying HW
System call
Programming interface to the services provided by the
OS
The one program running at all times on the
computer is the kernel. Everything else is either a
system program (shipped with OS) or an application
program
Application programs
Define the ways in which the system resources are
used to solve user problems
executed thru shell/GUI.
Ex) word processor, video games, etc
Operating Systems
Functionality
Process Management
Memory Management
CPU scheduling : batch vs time-sharing
Memory allocation : determine what is in memory when?
Virtual memory : a technique that gives an application program the
impression that it has large contiguous working memory, while in fact it
is physically fragmented and may even overflow on to disk storage.
Disk and file system
Device driver : interface for communicating with HW devices
Networking : supports network protocols. (ex) TCP/IP
Security : authentication (login), authorization (file permission), …
UI : GUI (Graphical User Interface), CLI (Command Line Interface)
OS comes with application programs that provide an interface for
managing OS.
Storage Hierarchy
Register, Cache, Main memory, Secondary Storage (disks),
Magnetic tapes
Why hierarchical structure?
Speed
Cost
Volatility
Caching
Copying information into faster storage system.
Faster storage checked first to determine if information is
there
Cache<->main memory, main memory<->disk
Important principle, performed at many levels in computer
OS Structures
Multiprogramming
a technique used to utilize maximum CPU time by running multiple
programs
Multiprogramming organizes jobs (code and data) so CPU always has
one to execute
One job is selected and run via job scheduler
When a running job has to wait for I/O, OS switches to another job
Multitasking (time-sharing)
CPU switches jobs so frequently that users can interact with each job
while it is running.
Creates interactive computing
Response time can be controlled
If processes don’t fit in memory, swapping moves them in and out to
run
Operating Systems
MS Windows
Most popular on desktop computers
Gaining popularity in servers.
UNIX/LINUX
Most popular in server environments
LINUX are gaining popularity on desktop PC.
UNIX History
Created by Ken Thompson et al. ( a researcher at AT&T Bell Lab)
UNICS(1969) (shortened to UNIX later) : first version (Assembly)
Released Fifth version of UNIX
kernel was rewritten in C, which was a big step forwards in terms of
system portability (1973)
EX) LINUX, FreeBSD, Solaris, AIX , HP-UX, IRIX, etc
UNIX-like OS
UNIX 장점
has been popular for more than two decades
Portability (platform-independent)
Written mostly in C + a few in assembly language
Kernel size is small
Multi-user, multi-tasking (interactive) environment
Security (Permission)
Stability
Powerful networking capabilities (client-server model)
LINUX is free / open source code
Suitable for using as a server
UNIX 장점
UNIX is simple
Everything is file
portability
Fast process creation
Uniform access to file, device and socket
Written in C
Clear design :상대적으로 적은 개수의 system call
Make each program do one thing well. (combined with pipe)
Various research (fork with COW)
Robust IPC mechanism
LINUX
Developed by Linus Torvalds(핀란드 헬싱키대), in 1991 (22yo)
Free open source UNIX OS for PC
GPL license : GNU project by Richard Stallman
리눅스는 LINUX 커널 (Linus Torvalds) + LINUX에서 실행되는 UNIX
utilities/applications (GNU project) 로 구성됨
Now run on mainframe, supercomputer, embedded/smart
system
Open source code nature
Several different distributions (e.g. Redhat, Debian, … etc)
any one can add features and correct deficiencies.
Turned into collaboration of volunteer developers around the world.
a prepackaged kernel, system utilities, GUI, application programs
Having all advantages of UNIX with low cost
<Linus Tovalds>
LINUX
Kernel
Shells / GUI : two forms of command input
Device driver support for various HW device
Advanced processor and memory management
Support different types of file system
Textual command line shells (e.g. C shell, … )
Graphical user interface (e.g. GNOME window manager)
System utilities
Virtually every UNIX system utilities were ported to LINUX
Include daemons
server program running as a background process
Application programs
Come with standard application programs
e.g. vi, emacs, xv, gcc/g++, xfig, latex, …
GPL (General Public License)
GNU에서 만든 free software license
GNU GPL이 적용된 SW는 다음 사항을 강제함.
컴퓨터 프로그램을 어떠한 목적으로든지 사용할 수 있다. 다만
법으로 제한하는 행위는 할 수 없다.
컴퓨터 프로그램의 실행 복사본은 언제나 프로그램의 소스 코드
와 함께 판매하거나 소스코드를 무료로 배포해야 한다.
컴퓨터 프로그램의 소스 코드를 용도에 따라 변경할 수 있다.
변경된 컴퓨터 프로그램 역시 프로그램의 소스 코드를 반드시 공
개 배포해야 한다.
변경된 컴퓨터 프로그램 역시 반드시 똑같은 라이선스를 취해야
한다. 즉 GPL 라이선스를 적용해야 한다.