osos sem 4 chapter 2 part 1

28
CHAPTER 2: BASIC OF OPEN SOURCE OPERATING SYSTEM Part 1

Upload: cenyum-cokmo

Post on 25-Jul-2015

93 views

Category:

Education


3 download

TRANSCRIPT

CHAPTER 2: BASIC OF OPEN SOURCE OPERATING SYSTEM

Part 1

By the end of this chapter, students will be able to:1) Describe the development of Linux2) State the benefits of Linux3) Compare the characteristics between Linux kernel

and Microsoft Windows kernel4) State the various Linux distributions

3

1960, Early stage of computation

Mainframes are the “computers”

Innovating idea: Multi-programming & Multi-user

Create a multi-user & multi-program OS

1964, Multics

Multiplexed Information and Computing Service

GE, MIT and AT&T

Standard Operating System for USA government

4

Many difficulties in Multics development

1969

AT&T pulled out of Multics

Ken Thompson

A simplified version of Multics UNIX

Dennis Ritchie

Rewrite the UNIX in C

AT&T cannot sell the UNIX

UNIX is the first free Operating System

5

1974

Berkeley University buy a tape of UNIX

Student start code navigation

UNIX is customized and improved

They call the OS as BSD (Berkeley Software Distribution)

Now

BSD does NOT contain any code of AT&T

BSD 4.4, FreeBDS, NetBSD and OpenBSD

6

1983, AT&T is splitted It can sell software

There is a great market for Operating System

Major hardware vendors need OS

AT&T is selling UNIX System v4 and licensing it

AIX for IBM, HP-UX for HP, …

BSD is a real danger for AT&T’s market

BSD is not supported

BSD should not be used in commercial

7

AT&T sold UNIX as much as possible

Novel bought UNIX code and License

Novel sold the code and license after 2 years

Santa Cruz Operating System

Microsoft developed Xenix

Based on UNIX VIII

It was NOT successful

8

1983, GNU project was started by Stallman

The goal is creating free UNIX-like

GNU’s kernel Hurd cannot attract attentions

9

Tanenbaum developed free OS

Its name is Minix

Minix is based on UNIX

Source code available, Modification is restricted

It cannot run on 32bit processors

10

Develop a free OS for 32bit (Intel) processors

Title of a Finnish student’s MS thesis

The student is Linus Benedict Torvalds

11

Birthday

25 August 1991

Linux 0.02

It was developed in MINIX

It run on 80386 (32bit microprocessor)

It had a terminal emulator & C compiler

Linus posted the code to Minix mailing list

He requested feedback

12

1) Reliability

The majority of Linux variants and versions are notoriously reliable and can often run for months and years without needing to be rebooted.

2) Scalability

Support Wide Range of Hardware

-Less memory

3) Security

Linux programs are designed to operate in a more secure manner as isolated processes.

Email attachments can’t be executed automatically, as are ActiveX controls and other specially built virus files.

Linux (and Mac OS X) prevent any real damage occurring on a system unless the user is logged in with the highest levels of permissions as root or administrator.

14

Kernel???

Kernel is the main component of most computer operating systems; it is a bridge between applications and the actual data processing done at the hardware level. 

A kernel connects the application software to the hardware of a computer

15

Both Linux and Windows are monolithic

All core operating system services run in a shared address space in kernel-mode

All core operating system services are part of a single module

Linux: vmlinuz

Windows: ntoskrnl.exe

Windowing is handled differently:

Windows has a kernel-mode Windowing subsystem

Linux has a user-mode X-Windowing system

16

Device Drivers

Process Management, Memory Management, I/O Management, etc.

X-Windows

Application

System Services

User ModeKernel Mode

Hardware Dependent Code

Linux

Device Drivers

Process Management, Memory Management, I/O Management, etc.

Win32Windowing

Application

System Services

User ModeKernel Mode

Hardware Dependent Code

Windows

17

Linux is a monolithic but modular system

All kernel subsystems form a single piece of code with no protection between them

Modularity is supported in two ways:

Compile-time options

Most kernel components can be built as a dynamically loadable kernel module (DLKM)

DLKMs

Built separately from the main kernel

Loaded into the kernel at runtime and on demand (infrequently used components take up kernel memory only when needed)

Kernel modules can be upgraded incrementally

Support for minimal kernels that automatically adapt to the machine and load only those kernel components that are used

18

Windows is a monolithic but modular system

No protection among pieces of kernel code and drivers

Support for Modularity is somewhat weak:

Windows Drivers allow for dynamic extension of kernel functionality

Windows XP Embedded has special tools / packaging rules that allow coarse-grained configuration of the OS

Windows Drivers are dynamically loadable kernel modules

Significant amount of code run as drivers (including network stacks such as TCP/IP and many services)

Built independently from the kernel

Can be loaded on-demand

Dependencies among drivers can be specified

19

Both Linux and Windows kernels are portable

Mainly written in C

Have been ported to a range of processor architectures

Windows

i486, MIPS, PowerPC, Alpha, IA-64, x86-64

Only x86-64 and IA-64 currently supported

> 64MB memory required

Linux

Alpha, ARM, ARM26, CRIS, H8300, i386, IA-64, M68000, MIPS, PA-RISC, PowerPC, S/390, SuperH, SPARC, VAX, v850, x86-64

DLKMs allow for minimal kernels for microcontrollers

> 4MB memory required

20

Windows

Kernel exports about 250 system calls (accessed via ntdll.dll)

Layered Windows/POSIX subsystems

Rich Windows API (17 500 functions on top of native APIs)

Linux

Kernel supports about 200 different system calls

Layered BSD, Unix Sys V, POSIX shared system libraries

Compact APIs (1742 functions in Single Unix Specification Version 3; not including X Window APIs)

• Linux distributions consists of the Linux kernel (the operating system) and a collection of applications, together with an easy-to-use installation program.

• Most people just say Linux to refer to a specific Linux distribution.

• Each and every one of the Linux distribution includes the standard Linux operating system and the following major packages:– The X Windows System – GUI

– One or more graphical desktop – among the most popular are GNOME or KDE

– A selection of application – Linux programs come in the form of ready-to-run software, but the source code is included (or easily available).

1) Fedora Core

Official website:wwwwww.fedoraproject.org

2)Knoppix

Official website:www.knoppix.org

3) Debian GNU/Linux

Official website:www.debian.org

4) OpenSUSE

Official website:www.opensuse.org

5) Ubuntu

Official website:www.ubuntu.com

6) Slackware

Official website:www.slackware.com

7) Gentoo

Official website:http://www.gentoo.org