71
1.1 Designed and Presented by Dr. Ayman Elshenawy Elsefy Dept. of Systems & Computer Eng.. AL-AZHAR University Email : [email protected] eaymanelshenawy.wordpress.com Operating Systems

Designed and Presented by Dr. Ayman Elshenawy … · Designed and Presented by Dr. Ayman Elshenawy Elsefy ... The controller starts the transfer of data from the device to ... Computer

Embed Size (px)

Citation preview

1.1

Designed and Presented by

Dr. Ayman Elshenawy Elsefy

Dept. of Systems & Computer Eng..

AL-AZHAR University

Email : [email protected]

eaymanelshenawy.wordpress.com

Operating Systems

Silberschatz, Galvin and Gagne ©2009OS Concepts – 8th Edition

Part 1:

OS Overview

Chapter 1: Introduction

What Operating Systems Do

Computer-System Organization

Computer-System Architecture

Operating-System Structure

Operating-System Operations

Process Management

Memory Management

Storage Management

Protection and Security

Distributed Systems

Special-Purpose Systems

Computing Environments

Open-Source Operating Systems

What is an Operating System?

A software program that acts as an intermediary between a

user of a computer and the computer hardware

OS goals:

Execute user programs and make solving user

problems easier

Make the computer system convenient to use

Use the computer hardware in an efficient manner

Computer System Structure

Computer system can be divided into four components:

Hardware – provides basic computing resources

CPU, memory, I/O devices

Operating system

Controls and coordinates use of hardware among

various applications and users

Application programs – define the ways in which the

system resources are used to solve the computing

problems of the users

Word processors, compilers, web browsers,

database systems, video games

Users

People, machines, other computers

Computer System StructureFour Components of a Computer System

Operating Systems Role- User View

OS is designed mostly for ease of use, with some attention

paid to performance and none paid to resource utilization.

Varies according to the interface being used.

In most PC computer systems, The user site in front of

monitors , keyboard, mouse and system unit. Users want to

maximize the work that he performed with high performance

(ease of use), Don’t care about resource utilization.

But shared computer such as mainframe and minicomputers

must keep all users happy (maximize resource utilization)

Users of dedicate systems such as workstations have

dedicated resources but frequently use shared resources from

servers, files , printers ( usability & resources Utilization)

No user interface, such as embedded computers in devices

and automobiles (run without user interaction , and no

resource sharing)

Operating Systems Role- User View

Operating Systems Role- System View

OS may be a resource allocator or control program:

Resource allocator:

OS acts as the manager of the computer resources that

used to solve problems ( CPU time, memory space, file

storage space, I/O devices, ….).

Solving conflict requests for resources,

decide how to allocate them to specific programs and users (

efficiently and fairly).

Control Program

manages the execution of user programs to prevent errors

and improper use of the computer. It is especially concerned

with the operation and control of I/O devices.

Definition of an Operating system No universally accepted definition

OS Is the one program running at all times on the computer,

usually called the kernel.

(Along with the kernel, there are two other types of programs:

Sytems programs, which are associated with the OS but

are not part of the kernel (run as needed).

Application programs, which include all programs not

associated with the operation of the system.)

Computer System Organization Computer system consists of:

One or more CPU’s.

A number of device controllers (for example, disk drives, audio

devices, and video displays) connected through a common bus

that provides access to shared memory .

The CPU and the device controllers can execute concurrently,

competing for memory cycles. To ensure orderly access to the

shared memory, a memory controller is provided whose

function is to synchronize access to the memory.

When the computer is powered on or rebooted, it needs to have

an initial program or bootstrap program to run.

Bootstrap Program:

Simple program, stored in (ROM) or (EEPROM), known by

firmware, within the computer HW.

It initializes all aspects of the system, from CPU registers to

device controllers to memory contents.

Must know how to load the OS (load into memory the OS

kernel) and how to execute the first process, such as “init”.

Waits for some event to occur(usually signalled by an

interrupt),

Hardware Interrupt: I/O device sending signals to CPU.

Software Interrupt: (executing a special operation called

a system call or a monitor call).

Computer-System Operation

When the CPU is interrupted:

it stops what it is doing and immediately.

Execute the Interrupt Service Routine (ISR), using the memory

address in Interrupt Vector Table (IVT) for each interrupt type.

After executing of ISR, the CPU resumes the computation.

Interrupts are an important part of a computer architecture. Each

computer design has its own interrupt mechanism, but several

functions are common.

Computer-System Operation

Common Functions of Interrupts Interrupt transfers control to the interrupt service routine

generally, through the interrupt vector, which contains the

addresses of all the service routines

Interrupt architecture must save the address of the interrupted

instruction

Incoming interrupts are disabled while another interrupt is being

processed to prevent a lost interrupt

A trap is a software-generated interrupt caused either by an

error or a user request

An OS is interrupt driven

Computer-System Operation

Device controller:

a specific type of device.

seven or more devices can be attached to the small computer-systems

interface (SCSI) controller.

Have some local buffer storage & a set of special-purpose registers.

Transfer data between the I/O devices and its local buffer.

Device Driver:

Each OS has a device driver for each device controller.

Understands the device controller and provide Uniform interface for

the device, and loads the registers within the device controller.

The device controller examines the contents of the registers to

determine the action (read character from keyboard to local buffer).

After finishing the device driver return the control to the OS.

Fine for moving small amounts of data, but can produce high overhead.

For bulk data or Disk I/O direct memory access (DMA) is used.

Computer-System Operation- I/O Operation

To start an I/O operation: Interrupt Driven I/O

the device driver loads the appropriate registers within the

device controller.

The device controller, in turn, examines the contents of

these registers to determine what action to take (such as

“read a character from the keyboard”).

The controller starts the transfer of data from the device to

its local buffer.

Once the transfer of data is complete, the device controller

informs the device driver via an interrupt that it has finished

its operation.

The device driver then returns control to the OS

Interrupt Driven I/O is fine for moving small amount of data.

Computer-System Operation- DMA

Direct Memory Access used for bulck data movement.

After setting up buffers, pointers, and counters for the I/O

device, the device controller transfers an entire block of data

directly to or from its own buffer storage to memory, with no

intervention by the CPU.

Only one interrupt is generated per block, to tell the device

driver that the operation has completed,

While the device controller is performing these operations, the

CPU is available to accomplish other work.

Computer-System Operation- DMA

• Computers employ many different types of memory to hold

data and programs.

Semi-conductor Memories

magnetic disks, USB sticks, DVDs etc.)

• Each type has its own characteristics and uses.

Computer Memory

Common Types of Memory Devices

There are four common types of memory:

read-only memory (ROM)

flash memory (EEPROM)

static random access memory (SRAM)

dynamic random access memory (DRAM).

Storage Structure –Main Memory Memory consists an array of words with addresses, or storage units.

The CPU execute programs that located in main memory (random-

access memory RAM):

implemented in a semiconductor technology called Dynamic RAM

(DRAM).

too small to store all needed programs

Volatile : loses its contents when power is turned off or otherwise lost

Bootstrap program is typically stored in ROM or EEPROM.

ROM cannot be changed, only static programs are stored there

(game cartridges, so manufacturers can distribute games that cannot

be modified.

EEPROM cannot be changed frequently and so contains mostly

static programs (smartphones store their factory setting).

The load instruction and store instruction moves a word from/to

main memory and the internal register within the CPU.

Storage Structure –Secondary Memory an extension of main memory, able to hold large quantities of data

permanently.

magnetic disk, which provides storage for both programs and

data. Most programs (system and application) are stored on a disk

until they are loaded into memory.

Many programs then use the disk as both the source and the

destination of their processing. Hence, the Disk management of

disk storage is very important.

The wide variety of storage systems in a computer system can be

organized in a hierarchy (memory hierarchy).

The main differences among the various storage systems lie in

speed,

cost,

size,

volatility.

• A computer have several types of memory, ranging from

fast, expensive internal registers, to slow, inexpensive

Hard Magnetic Disks.

• Registers:• are matched in speed to the CPU

• consume a significant amount of power.

• only a small number of registers in a processor

• more expensive.

• Secondary storage:• such as hard magnetic disks.

• the cost per stored bit is small in terms of money and electrical

power.

• Access time is very long when compared with registers.

• Between the registers and secondary storage there are a

number of other forms of memory that bridge the gap

between the two.

Memory Hierarchy

• The memory hierarchy can be characterized by a number of

parameters:

• Access Type: how physically the memory read/write is

done (Random or Sequential).

• Capacity measured in bytes or KB or MB.

• Cycle time: the time elapsed from the start of a read

operation to the start of a next read.

• Latency is defined as the time interval between the

request for information and the access to the first bit of

that information.

• Bandwidth: the number of bits that can be accessed in

one second.

• Cost of a memory is usually specified as dollars/MB

• Total Cost = cost/MB * Memory Size.

Memory Hierarchy

The Memory

HierarchyTypical Cost = Cost/MB * Typical Amount

Storage-Device Hierarchy

Computer-System Architecture

A computer system may be organized in a number of different

ways, which can be categorized according to the number of

general-purpose processors used.

Single Processor system

Multi Processor system

Clustered system

Single Processor System A system have one general-purpose CPU capable of executing

an instruction sets, and user processes. And may have other

special-purpose CPU that run instruction sets and does not

run user process (disk, keyboard, and graphics controllers);

Special purpose CPU’s:

May managed by the OS, For example, PCs contain a CPU in

the keyboard to convert the keystrokes into codes to be sent to

the CPU.

May be low-level components built into the HW. The OS cannot

communicate with these CPU’s; they do their jobs

autonomously.

The use of special-purpose CPU is common and does not turn a

single-processor system into a multiprocessor.

If there is only one general-purpose CPU, then the system is a

single-processor system.

Multiple Processor System (Parallel systems) A system have two or more CPU in close communication, sharing the

computer bus and sometimes the clock, memory, and peripheral

devices.

advantages:

Increased throughput. more work done in less time.

Cost less than equivalent multiple single-processor systems,

because they can share peripherals, mass storage, and power

supplies.

Increased reliability. the failure of one processor will not halt the

system, only slow it down.

Increase Addressable memory and computing power.

Asymmetric multi-processor: each MP is assigned to a specific task in

a (master –slave relationship). A master MP controls the system; the

other MP’s either look to the master for instruction or have predefined

tasks.

symmetric multiprocessing (SMP), in which each processor performs

all tasks within the operating system.

Symmetric Multiprocessing Architecture

• N processes can run if there are N CPUs. I/O must be controlled to

ensure that the data reach the appropriate processor.

• Ensure that no CPU is idle while another is overloaded, resulting in

inefficiencies.

• The difference between symmetric and asymmetric multiprocessing

may result from either hardware or software.

• Special hardware can differentiate the multiple processors, or the

software can be written to allow only one master and multiple slaves.

• Uniform memory access (UMA): access to any RAM from any

CPU takes the same amount of time.• Non-uniform memory access (NUMA): some parts of memory may

take longer to access than other parts.

A Dual-Core Design• Include multiple computing cores on a single chip. In essence, these are

multiprocessor chips.

• They can be more efficient than multiple chips with single cores (on-chip

communication is faster than between-chip communication).

• appear to the operating system as N standard processors.

Clustered Systems Like multiprocessor systems, but multiple systems working together

composed of two or more individual systems or nodes—joined together.

Usually sharing storage via a storage-area network (SAN)

Provides a high-availability service which survives failures

Asymmetric clustering has one machine in hot-standby mode

Symmetric clustering has multiple nodes running applications,

monitoring each other

Some clusters are for high-performance computing (HPC)

Applications must be written to use parallelization

Operating system Structure – Multi Programming

One of the most important aspects of OS.

A single program cannot, in general, keep either the CPU or the

I/O devices busy at all times.

Single users frequently have multiple programs running.

Multiprogramming:

Increases CPU utilization by organizing jobs (code and data) so

that the CPU always has one to execute.

The OS keeps several jobs in memory simultaneously.

Main memory is too small to accommodate all jobs, the jobs are

kept initially on the disk in the job pool (consists of all processes

residing on disk awaiting allocation of main memory).

The set of jobs in memory can be a subset of job pool.

The OS picks and begins to execute one of the jobs, it may have

to wait for some task, such as an I/O operation, to complete.

OS Structure – Multi Programming

In a non-multiprogrammed system, the CPU would sit idle.

In a multiprogrammed system, the OS simply switches to, and

executes, another job. When that job needs to wait, the CPU is

switched to another job, and so on.

Eventually, the first job finishes waiting and gets the CPU back.

As long as at least one job needs to execute, the CPU is never

idle (A lawyer example).

do not provide for user interaction with the computer system.

Memory Layout for

Multiprogrammed System

OS Structure- Multi Tasking Time sharing (or multitasking) is a logical extension of

multiprogramming.

In time-sharing systems, the CPU executes multiple jobs by

switching among them, but the switches occur so frequently that

the users can interact with each program while it is running.

Time sharing requires an interactive computer system, which

provides direct communication between the user and the system.

The user gives instructions to the OS using input device

(keyboard or mouse), and waits for an output device results.

allows many users to share the computer simultaneously. The

system switches rapidly from one user to the next,

each user is given the impression that the entire computer system

is dedicated to his use.

Time Sharing Requirements

If several jobs are ready to be brought into memory, and if there

is not enough room for all of them, then the system must

choose among them. Making this decision is job scheduling.

When the OS selects a job from the job pool, it loads that job

into memory for execution. Having several programs in memory

at the same time requires some form of memory

management.

if several jobs are ready to run at the same time, the system

must choose among them. Making this decision is CPU

scheduling.

Running multiple jobs concurrently requires that they cant affect

each other in all phases of the OS, including process

scheduling, disk storage, and memory management.

Time Sharing Requirements

The OS must:

ensure reasonable response time. This is sometimes

accomplished through swapping, in which processes are

swapped in and out of main memory to the disk. virtual

memory, a technique that allows the execution of a process

that is not completely in memory. The main advantage of the

virtual memory scheme is that it enables users to run programs

that are larger than actual physical memory.

provide a file system that system resides on a collection of

disks; hence, disk management must be provided.

Provide a mechanism for protecting resources from

inappropriate use.

provide mechanisms for job synchronization and

communication ,and it may ensure that jobs do not get stuck

in a deadlock, forever waiting for one another.

Operating-System Operations

Modern OS are interrupt driven. waiting for something to

happen. Events are almost always signalled by the occurrence

of an interrupt or trap or an exception.

Exception is a software-generated interrupt caused either by

an error (division by zero or invalid memory access) or by a

specific request from a user program that an OS service be

performed.

For each type of interrupt, separate segments of code in the

operating system determine what action should be taken (ISR).

An error in a user program could cause problems only for the

one program running.

an incorrect (or malicious) program cannot cause other

programs to execute incorrectly.

Dual Mode Operations OS must distinguish between the execution of OS code ( Kernel

mode or supervisor mode, system mode, or privileged mode)

and user-defined code(user mode ).

Mode bit, is added to the hardware of the computer to indicate the

current mode: kernel[0] (task that is executed on behalf of the OS)

or user[1] (task is executed on behalf of the user).

When a user application requests a service from the OS (via a

system call), it must transition from user to kernel.

At system boot time, the hardware starts in kernel mode. The OS

is then loaded and starts user applications in user mode.

If a trap or interrupt occurs, the HW switches from user mode to

kernel mode (changes the state of the mode bit to 0).

Thus, whenever the OS gains control of the computer, it is in

kernel mode.

The system always switches to user mode (by setting the mode bit

to 1) before passing control to a user program.

Operating-System Operations Interrupt driven by hardware

Software error or request creates exception or trap

Division by zero, request for OS service

Other process problems include infinite loop, processes modifying each other or the operating system

Dual-mode operation allows OS to protect itself and other system components

User mode and kernel mode

Mode bit provided by hardware

Provides ability to distinguish when system is running user code or kernel code

Some instructions designated as privileged, only executable in kernel mode

System call changes mode to kernel, return from call resets it to user

Transition from User to Kernel Mode

Timer The OS must maintains control over the CPU.

Prevent a user program to get stuck in an infinite loop or to fail to

call system services and never return control to the OS.

A timer:

can be set to interrupt the computer after a specified period.

The period may be fixed timer (1/60 second) or variable timer

(from 1 millisecond to 1 second).

The OS sets the counter before transfer the control to the user.

Every clock pulse, the counter is decremented. When the

counter reaches 0, an interrupt occurs (a 10-bit counter with a

1 ms clock allows interrupts from 1 ms to 1,024 ms, in steps of

1 ms).

If the timer interrupts, control transfers automatically to the OS,

which may treat the interrupt as a fatal error or may give the

program more time. Clearly, instructions that modify the content

of the timer are privileged.

Process Management A process is a program in execution. It is a unit of work within the

system. Program is a passive entity, process is an active entity.

A word-processing program being run by an individual user on a

PC is a process. A system task, such as sending output to a

printer, can also be a process (or at least part of one).

Process needs resources to accomplish its task

CPU, memory, I/O, files, Initialization data (such as file namefor printing )

Process termination requires release of any reusable resources

Single-threaded process has one program counter specifyinglocation of next instruction to execute

Process executes instructions sequentially, one at a time, untilcompletion

Multi-threaded process has one program counter per thread

Process Management Activities

Creating and deleting both user and system processes

Suspending and resuming processes

Providing mechanisms for process synchronization

Providing mechanisms for process communication

Providing mechanisms for deadlock handling

The OS is responsible for the following activities in connection

with process management:

Memory Management

All data in memory before and after processing

All instructions in memory in order to execute

Memory management determines what is in memory when

Optimizing CPU utilization and computer response to users

Memory management activities

Keeping track of which parts of memory are currently being

used and by whom

Deciding which processes (or parts thereof) and data to

move into and out of memory

Allocating and reallocating memory space as needed

Storage Management

OS provides uniform, logical view of information storage

Abstracts physical properties to logical storage unit - file

Each medium is controlled by device (i.e., disk drive, tape drive)

Varying properties include access speed, capacity, data-transfer rate, access method (sequential or random)

File-System management

Mass storage management

Cashing

I/O Systems

File System Management Is one of the most visible components of an OS.

Computers can store information on several different types of

physical media ( Magnetic disk, optical disk, and magnetic tape).

Each of these media has its own characteristics and physical

organization.

Each medium is controlled by a device, such as a disk drive or tape

drive, that have its own characteristics (access speed, capacity,

data-transfer rate, and access method (sequential or random)).

A file is:

a collection of related information defined by its creator.

represent programs and data.

Data files may be numeric, alphabetic, alphanumeric, or binary.

Files may be free-form (for example, text files), or they may be

formatted rigidly (for example, fixed fields).

organized into directories to make them easier to use.

File System Management when multiple users have access to files, it may be desirable to

control by whom and in what ways (for example, read, write,

append) files may be accessed.

The operating system is responsible for the following activities

in connection with file management:

Creating and deleting files

Creating and deleting directories to organize files

Supporting primitives for manipulating files and directories

Mapping files onto secondary storage

Backing up files on stable (nonvolatile) storage media

Mass-Storage Management Main memory are small to hold all data and program and data in

main memory are lost when the power is off.

Secondary storage are used as a backup for the main memory.

Most programs (compilers, assemblers, and word processors) are

stored on a disk until loaded into memory and then use the disk as

both the source and destination of their processing.

The OS is responsible for Free-space management, Storage

allocation and Disk scheduling.

Files usually organized into directories, Access control systemsdetermines who can access what

Some storage need not be fast

Tertiary storage includes optical storage, magnetic tape

Still must be managed – by OS or applications

Varies between WORM (write-once, read-many-times) and RW

(read-write)

Caching Caching is an important principle of computer systems.

Information is normally kept in some storage system (such as main

memory). As it is used, it is copied into a faster storage system.

When we need a particular piece of information, we first check

whether it is in the cache. If it is, we use the information directly from

the cache; if it is not, we use the information from the source, putting

a copy in the cache under the assumption that we will need it again

soon.

Without this cache, the CPU would have to wait several cycles while

an instruction was fetched from main memory.

Careful selection of the cache size and of a replacement policy can

result in greatly increased performance.

Performance of Various Levels of Storage

Movement between levels of storage hierarchy can

be explicit or implicit

Migration of Integer A from Disk to Register

Multitasking environments must be careful to use most recent

value, no matter where it is stored in the storage hierarchy

Multiprocessor environment must provide cache coherency in

hardware such that all CPUs have the most recent value in their

cache

Distributed environment situation even more complex

Several copies of a datum can exist

Various solutions covered

I/O Subsystem

One purpose of OS is to hide peculiarities of hardware devices

from the user

I/O subsystem responsible for

Memory management of I/O including buffering (storing data

temporarily while it is being transferred), caching (storing

parts of data in faster storage for performance), spooling

(the overlapping of output of one job with input of other jobs)

General device-driver interface

Drivers for specific hardware devices

Only the device driver knows the peculiarities of the specific

device to which it is assigned.

Protection and Security

Protection – any mechanism for controlling access of processes or users to resources defined by the OS

memory-addressing hardware ensures that a process can execute only within itsown address space.

Device-control registers are not accessible to users,

an unprotected resource cannot defend against use (or misuse) by anunauthorized or incompetent user.

Security – defense of the system against internal and external attacks

Huge range, including denial-of-service, worms, viruses, identity theft, theft of service

OS generally must distinguish among users, to determine who can do what

User identities (user IDs ) name and associated number, one per user

User ID then associated with all files, processes of that user to determine access control

Group identifier (group ID) allows set of users to be defined and controls managed, then also associated with each process, file

Privilege escalation allows user to change to effective ID with more rights

Distributed Computing Collection of separate, possibly heterogeneous, systems

networked together

Network is a communications path

Networks vary by the protocols used, the distances between

nodes, and the transport media. They also vary in their

performance and reliability.

– Local Area Network (LAN) room, floor , building.

– Wide Area Network (WAN) building, cities , countries

– Metropolitan Area Network (MAN) building within a city

A network OS provides:

file sharing across the network and that includes a communication

scheme that allows different processes on different computers to

exchange messages.

the different OS communicate closely enough to provide the

illusion that only a single operating system controls the network.

Special-Purpose Systems

Real-time embedded systems:

Embedded computers is a HW device with special purpose OS

(car engines and manufacturing robots to DVDs and microwave

ovens).

Have a specific task and it’s OS provides limited functions or it

may use a general PC with standard OS to run a special App.

Have little or no user interface.

HW device with App Specific Integrated Circuits (ASIC)

Almost always run Real-time OS, A real-time system is often

used as a control device in a dedicated application. Sensors bring

data to the computer. The computer must analyze the data and

possibly adjust controls to modify the sensor inputs.

Special-Purpose Systems

Multimedia Systems:

Most OS’s are designed to handle conventional data (text

files, programs, word documents, and spreadsheets) and

multimedia data (consists of audio and video files, frames of

video). These data (such as frames of video) must be delivered

(streamed) according to certain time restrictions ( 30 frames/s).

Multimedia systems:

describes a wide range of applications that include audio files

such as MP3, DVD movies, video conferencing, and short

video clips of movie or news stories downloaded over the

Internet, live webcasts (broadcasting over the Web) of

speeches or sporting events and even live webcams.

Includes a combination of audio and video. For example, a

movie may consist of separate audio and video tracks.

Exist in desktop PC’s. PDAs and cellular telephones.

Special-Purpose Systems Handheld systems:

include personal digital assistants (PDAs), and cellular

telephones, many of which use special-purpose embedded OS.

Developers of handheld systems and applications face many

challenges due to the limited size of these devices:

Size, most handheld devices have small amounts of memory,

slow processors, and small display.

CPU’s for most handheld devices run at a fraction of the speed of

a CPU in a PC (consume less power, have no large battery).

A lack of physical space limits input methods to small KB,

handwriting recognition, or small screen-based KB’s.

The small display screens limit output options (3 inch square).

Web clipping, only a small subset of a Web page is delivered and

displayed on the handheld device.

use wireless technology, such as BlueTooth, allowing remote

access to e-mail and Web browsing.

Computing Environments How computer-system organization and major OS’s

components are used in a variety of computing environments.

Traditional Computing

Client server computing

Peer to Peer computing

Web Based Computing

Computing Environments Traditional Computing ( an office)

Consists of PCs connected to a network, with servers providing

file and print services.

Remote access desktop.

Terminals attached to mainframes.

Portability was achieved by use of laptop computers.

Web technology resizes the boundary.

portals, which provide Web accessibility to their internal servers.

Network computers are essentially terminals that understand

Web-based computing.

Handheld PDAs can also connect to wireless networks to use the

company’s Web portal

home computers serve up Web pages and run networks that

include printers, client PCs, and servers.

firewalls to protect their networks from security warms.

Computing Environments (Cont.)

Client-Server Computing

Terminals connected to centralized systems and user-interfacefunctionality once handled directly by centralized.

The centralized system acts as computer servers or fileservers to satisfy requests generated by client systems.

compute-server system: Provides an interface to a client thatcan send a request to perform an action (read data); the serverexecutes the action and sends back results to the client. (A serverrunning a database that responds to client requests for data).

The file-server system: provides a file-system interface whereclients can create, update, read, and delete files ( Web serverdelivers files to clients running Web browsers).

Computing Environments (Cont.)

Peer to Peer (P2P) Computing

All nodes are identical, and each of them can act as client orserver, depend on it have a request or provide a service.

Services can be provided by several nodes distributed throughoutthe network, in client server model a server has a bottleneck.

Once a node has joined the network, it can begin providingservices to and requesting services from—other nodes in thenetwork. By:

When a node joins a network, it registers its service with acentralized lookup service on the network. Any node desiring aspecific service first contacts this centralized lookup service todetermine which node provides the service.

A client peer broadcasting a request for the service to all othernodes in the network. The node (or nodes) providing that serviceresponds to the peer making the request.

Computing Environments (Cont.)

Web Based Computing

Web computing has increased the emphasis on networking.Devices that were not previously networked now includewired or wireless access. Devices that were networkednow have faster network connectivity, provided by eitherimproved networking technology, optimized networkimplementation code, or both.

The implementation of Web-based computing has given riseto new categories of devices, such as load balancers,which distribute network connections among a pool of similarservers.

Open-Source Operating Systems

Source code can be compiled and deployed to a binary code format to be executed on a system, Reverse Engineering is to reach to the source code from the binary code.

Open-source OS are those made available in source-code format (Linux is the most famous )rather than as compiled binary code (Closed source) Microsoft Windows is a well-known example of the opposite closed source approach.

Benefits :

learning operating systems by examining the actual source code.

OS can be modified and compiled again (excellent learning tool).

Large community of interested programmers who contribute to thecode by helping to debug it, analyze it, provide support, andsuggest changes.

more secure than closed-source code because many more eyesare viewing the code.

Any bug can be founded and fixed faster.

Open-Source Operating Systems

Computer and software companies eventually sought to limitthe use of their software to authorized computers andcustomers by releasing only the binary files compiled from thesource code, rather than the source code itself ( to save theirideas from their competitors).

Counter to the copy protection and Digital Rights Management(DRM) movement

Started by Free Software Foundation (FSF) (encouraging thefree exchange of software source code and the free use of thatsoftware), which has “copyleft” GNU Public License (GPL)

Linux Operating Systems As an example of an open-source OS, produced many tools, including

compilers, editors, and utilities, but never released a kernel.

Linus Torvalds, released a rudimentary UNIX-like kernel using the GNU

compilers and tools and invited contributions worldwide programmers to

download the source code, modify it, and submit changes to Torvalds.

Releasing updates once a week allowed this so-called Linux operating

system to grow rapidly, enhanced by several thousand programmers.

The resulting GNU/Linux operating system has hundreds numbers of

unique distributions, or custom builds, of the system. Major

distributions include RedHat, SUSE, Fedora, Debian, Slackware, and

Ubuntu.

Distributions vary in function, utility, installed applications, hardware

support, user interface, and purpose. For example, RedHat Enterprise

Linux is geared to large commercial use.

PCLinuxOS is a LiveCD , LiveDVD—an operating system that can be

booted and run from a CD-ROM without being installed on a system’s

hard disk.

Linux Operating Systems Ubuntu Linux. Ubuntu is a popular Linux distribution that comes in a

variety of types, including those tuned for desktops, servers, and

students.

The following steps outline a way to explore the Ubuntu kernel source

code on systems that support the free “VMware Player” tool:

1. Download the player from http://www.vmware.com/download/player/

and install it on your system.

2. Download a virtual machine containing Ubuntu. are available from

VMware at http://www.vmware.com/appliances/.

3. Boot the virtual machine within VMware Player.

4. Get the source code of the kernel release of interest, such as 2.6, by

executing wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-

2.6.18.1.tar.bz2 within the Ubuntu virtual machine.

Uncompress and untar the downloaded file via tar xjf linux-

2.6.18.1.tar.bz2.

Explore the source code of the Ubuntu kernel, which is now in ./linux-

2.6.18.1.

End of Chapter 1