solaris andrew trice jon rossman alex kozel gary greene jake cyrus

28
SOLARIS Andrew Trice Jon Rossman Alex Kozel Gary Greene Jake Cyrus

Upload: julius-kennedy

Post on 03-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SOLARIS Andrew Trice Jon Rossman Alex Kozel Gary Greene Jake Cyrus

SOLARIS

Andrew TriceJon RossmanAlex Kozel

Gary GreeneJake Cyrus

Page 2: SOLARIS Andrew Trice Jon Rossman Alex Kozel Gary Greene Jake Cyrus

What is Solaris?

• UNIX based operating system made by Sun:– SPARC and Intel Architecture systems

• SunOS

• Designed for the network

• Designed for efficiency

Page 3: SOLARIS Andrew Trice Jon Rossman Alex Kozel Gary Greene Jake Cyrus

Basic Requirements

• SPARC (32- and 64-bit) or Intel Architecture (32-bit) platforms

• Disk space: 600 Mbytes for desktops; one Gbyte for servers

• Memory: 64 Mbytes minimum

Page 4: SOLARIS Andrew Trice Jon Rossman Alex Kozel Gary Greene Jake Cyrus

Solaris 8

• Efficiently manage resources and provide a higher level of service – Minimization of planned and unplanned

downtime– Reduction of administration errors– Simplification of troubleshooting

• High-speed, reliable access to the data

Page 5: SOLARIS Andrew Trice Jon Rossman Alex Kozel Gary Greene Jake Cyrus

An Important Note About Directories

• Similar to DOS– “Home" directory

• current working directory when they login

– Case sensitive

Page 6: SOLARIS Andrew Trice Jon Rossman Alex Kozel Gary Greene Jake Cyrus

Who Uses Solaris?

• AOL (America On Line), • Apple Computers (in addition to Mac OS X Server), • AT&T, • BillGates.com, • BMGMusicService.com, • CNN (Cable News Network)• CNNSI.com• Discovery.com• Disney.com• E-Trade.com• General Electric• MTV

Page 7: SOLARIS Andrew Trice Jon Rossman Alex Kozel Gary Greene Jake Cyrus

Solaris Security

• Solaris incorporates four levels of security:– Level 1 - consists of features and tools that help

administrators tightly control who can log onto the system.

– Level 2 - describes tools that enable administrators to set the overall security state of the system.

– Level 3 - covers Secure Distributed services and Developers Platforms, describing how Solaris supports different authentication and encryption mechanisms.

– Level 4 - describes the tools to control access to the physical network.

Page 8: SOLARIS Andrew Trice Jon Rossman Alex Kozel Gary Greene Jake Cyrus

Process Management

• Process creation and termination

• Process scheduling and dispatching

• Process switching

• Process synchronization and support for interprocess communication

• Management of process control blocks

Page 9: SOLARIS Andrew Trice Jon Rossman Alex Kozel Gary Greene Jake Cyrus

Process Creation

• A slot in the process table is allocated for the new process

• A unique process ID is assigned to the child process

• A copy of the process image of the parent is made

• Counters for any files owned by the parents are incremented to show that an additional process now owns those files

• The child process is set to the ready state

• The ID number of the child is returned to the parent process and a value of 0 is returned to the child process.

Page 10: SOLARIS Andrew Trice Jon Rossman Alex Kozel Gary Greene Jake Cyrus

Process Scheduling

• Two different types of processes– Real-time processes– Time-sharing processes

• All the real-time processes are given higher priority than any time-sharing processes.

• Whenever a real-time process is ready to run, it is picked up for execution by the scheduler.

– the frequency of priority update is once every 100ms.

Page 11: SOLARIS Andrew Trice Jon Rossman Alex Kozel Gary Greene Jake Cyrus

Process Switching

• Running process is interrupted and the OS assigns another process to the running state.

– Interrupt or Trap

• If an interrupt occurs, the interrupt goes to the interrupt handler and the goes to an OS routine that is concerned with it.

• If a trap occurs, if it is fatal, the process is switched, if not, it depends on the error.

– Mode switching in Solaris• Saves the context of the current program being

executed• Sets the program counter to the starting address of an

interrupt-handler• Switches from user mode to kernel mode to have

higher privilege

Page 12: SOLARIS Andrew Trice Jon Rossman Alex Kozel Gary Greene Jake Cyrus

Process Synchronization

• To enforce mutual exclusion and event ordering– Solaris implements thread synchronization using:

• MUTEX Lock– mutex_enter(), mutex_exit(), mutex_tryenter()

• Reader/Writer Lock– rw_enter(), rw_exit(), rw_tryenter(),

rw_downgrade(), rw_tryupgrade()

• Semaphores– sema_p(), sema_v(), sema_tryp()

• Condition Variables– cv_wait(), cv_signal(), vc_broadcast()

Page 13: SOLARIS Andrew Trice Jon Rossman Alex Kozel Gary Greene Jake Cyrus

Management of Process Control Blocks

• The data needed by the operating system to control the process

– This includes

• Process state– e.g. Running, ready waiting

• Priority – Scheduling priority of process

• Scheduling-related information– e.g. Amount of time process has been waiting

• Event– Identity of event the process is awaiting before it

can be resumed

Page 14: SOLARIS Andrew Trice Jon Rossman Alex Kozel Gary Greene Jake Cyrus

Threads in Solaris

• Threads can be implemented using Solaris’ own API, Solaris threads, or with POSIX’s API, pthreads.

• Both APIs behave similarly in action and syntax.• They are not 100% compatible, however, as each API has

functions that are not present in the other.

Page 15: SOLARIS Andrew Trice Jon Rossman Alex Kozel Gary Greene Jake Cyrus

Threads in Solaris

• Solaris allows the safe use of both APIs in the same program.• This gives a programmer the flexibility of exploiting the

exclusive functions found in Solaris threads and pthreads.

Page 16: SOLARIS Andrew Trice Jon Rossman Alex Kozel Gary Greene Jake Cyrus

Threads in Solaris

• Unique Solaris thread features:– Reader/Writer Locks– Ability to create “daemon”

threads– Suspending and continuing

a thread– Setting concurrency;

determining concurrency level

• Unique pthread features:– Attribute objects (these

replace many Solaris arguments or flags with pointers to pthreads attribute objects)

– Cancellation semantics – Scheduling policies

Page 17: SOLARIS Andrew Trice Jon Rossman Alex Kozel Gary Greene Jake Cyrus

Deadlock Avoidance

• Solaris utilizes several synchronization objects in order to prevent deadlock.

• These objects are:– Mutual Exclusion Locks– Condition Variables– Semaphores

Page 18: SOLARIS Andrew Trice Jon Rossman Alex Kozel Gary Greene Jake Cyrus

Mutual Exclusion Locks

• Solaris uses mutual exclusion locks (mutexes) to serialize thread execution.

• Mutual exclusion locks synchronize threads, usually by ensuring that only one thread at a time executes a critical section of code.

• Mutex locks can also preserve single-threaded code.

Page 19: SOLARIS Andrew Trice Jon Rossman Alex Kozel Gary Greene Jake Cyrus

Condition Variables

• Condition variables atomically block threads until a particular condition is true.

• The condition is tested under the protection of a mutual exclusion lock.• When the condition is false, a thread usually blocks on a condition

variable and atomically releases the mutex waiting for the condition to change.

• When another thread changes the condition, it can signal the associated condition variable to cause one or more waiting threads to wake up, acquire the mutex again, and reevaluate the condition.

Page 20: SOLARIS Andrew Trice Jon Rossman Alex Kozel Gary Greene Jake Cyrus

Semaphores

• Semaphores are integers.• A thread waits for permission to proceed and then signals that it has

proceeded by performing a P operation on the semaphore. • the thread must wait until the semaphore's value is positive, then

change the semaphore's value by subtracting one from it.

• When it is finished, the thread performs a V operation, which changes

the semaphore's value by adding one to it.

Page 21: SOLARIS Andrew Trice Jon Rossman Alex Kozel Gary Greene Jake Cyrus

Solaris Memory Management

Two kinds:•Virtual Memory Paging System

•Kernel Memory Allocator

Page 22: SOLARIS Andrew Trice Jon Rossman Alex Kozel Gary Greene Jake Cyrus

Kernel Memory Allocator

• Kernel Processes:– Many buffers and small tables

• Lazy buddy system

Page 23: SOLARIS Andrew Trice Jon Rossman Alex Kozel Gary Greene Jake Cyrus

Virtual Memory Paging System

• User Processes

• Data Structures:– Page table– Disk block descriptor– Page frame data table– Swap use table

Page 24: SOLARIS Andrew Trice Jon Rossman Alex Kozel Gary Greene Jake Cyrus

Global Clock-hand LRU

Fronthand

Backhand

Front of page listEnd of page list

Handspread

Page 25: SOLARIS Andrew Trice Jon Rossman Alex Kozel Gary Greene Jake Cyrus

Solaris File Systems

• Uses UFS (UNIX File System)• Directories organize files• Files hold information• Directories are files.

– Only hold information about other files.– Do not contain other files.

Page 26: SOLARIS Andrew Trice Jon Rossman Alex Kozel Gary Greene Jake Cyrus

Solaris File Systems

• File System has 3 components.

– Superblock

– Inodes

– Blocks

Page 27: SOLARIS Andrew Trice Jon Rossman Alex Kozel Gary Greene Jake Cyrus

Solaris File Systems

• Filenames can be up to 255 characters

• Almost any charcters are allowed.

– Even ! $ * _ ( )

Page 28: SOLARIS Andrew Trice Jon Rossman Alex Kozel Gary Greene Jake Cyrus

Solaris File Systems

• Organized like a typical UNIX environment

– Root directory is base of organization. • Every other file & directory extends from root.