8
Symmetric multiprocessing Symmetric multiprocessing (SMP) involves a multiprocessor computer hardware and software architecture where two or more identical processors are connected to a single shared main memory, have full access to all I/O devices, and are controlled by a single OS instance, and in which all processors are treated equally, with none being reserved for special purposes. Most common multiprocessor systems today use an SMP architecture. In the case of multi-core processors, the SMP architecture applies to the cores, treating them as separate processors. In a symmetric multiprocessor (SMP), the kernel can execute on any processor, and typically each processor does self-scheduling from the pool of available processes or threads. The kernel can be constructed as multiple processes or multiple threads, allowing portions of the kernel to execute in parallel. The SMP approach complicates the OS. It must ensure that two processors do not choose the same process and that processes are not somehow

Symmetric multiprocessing and Microkernel

Embed Size (px)

DESCRIPTION

-Introduction to each topic -Detailed description of the topic -Advantage/disadvantage/issue

Citation preview

Page 1: Symmetric multiprocessing and Microkernel

Symmetric multiprocessing

Symmetric multiprocessing (SMP) involves a multiprocessor computer hardware and software

architecture where two or more identical processors are connected to a single shared main

memory, have full access to all I/O devices, and are controlled by a single OS instance, and in

which all processors are treated equally, with none being reserved for special purposes. Most

common multiprocessor systems today use an SMP architecture. In the case of multi-core

processors, the SMP architecture applies to the cores, treating them as separate processors.

In a symmetric multiprocessor (SMP), the kernel can execute on any processor, and typically

each processor does self-scheduling from the pool of available processes or threads. The kernel

can be constructed as multiple processes or multiple threads, allowing portions of the kernel to

execute in parallel. The SMP approach complicates the OS. It must ensure that two processors do

not choose the same process and that processes are not somehow lost from the queue.

Techniques must be employed to resolve and synchronize claims to resources.

An SMP operating system manages processor and other computer resources so that the user may

view the system in the same fashion as a multiprogramming uniprocessor system. A user may

construct applications that use multiple processes or multiple threads within processes without

regard to whether a single processor or multiple processors will be available. Thus a

multiprocessor OS must provide all the functionality of a multiprogramming system plus

additional features to accommodate multiple processors. The key design issues include the

following:

Page 2: Symmetric multiprocessing and Microkernel

• Simultaneous concurrent processes or threads: Kernel routines need to be re-entrant to allow

several processors to execute the same kernel code simultaneously. With multiple processors

executing the same or different parts of the kernel, kernel tables and management structures must

be managed properly to avoid deadlock or invalid operations.

• Scheduling: Scheduling may be performed by any processor, so conflicts must be avoided. If

kernel-level multithreading is used, then the opportunity exists to schedule multiple threads from

the same process simultaneously on multiple processors.

• Synchronization: With multiple active processes having potential access to shared address

spaces or shared I/O resources, care must be taken to provide effective synchronization.

• Memory management: Memory management on a multiprocessor must deal with all of the

issues found on uniprocessor computers. In addition, the OS needs to exploit the available

hardware parallelism, such as multiport memories, to achieve the best performance. The paging

mechanisms on different processors must be coordinated to enforce consistency when several

processors share a page or segment and to decide on page replacement.

• Reliability and fault tolerance: The OS should provide graceful degradation in the face of

processor failure. The scheduler and other portions of the OS must recognize the loss of a

processor and restructure management tables accordingly.

The advantages of SMP include a large global memory and better performance per Watt,

important for SWaP (size, weight and power) sensitive applications thanks to the use of fewer

memory controllers. Instead of splitting memory between multiple CPUs, SMP’s large global

memory is accessible to all of the processor cores. Data intensive applications, such as image

processing and data acquisition systems, often prefer large global memories that can be accessed

at data rates up to 100s of Mbytes/sec. These large memory applications benefit from the single

large memory common in most multi-core designs.

Page 3: Symmetric multiprocessing and Microkernel

SMP also provides simpler node-to-node communication, and SMP applications can be

programmed to be independent of node count. SMP especially lends itself to the use of new

multi-core processor designs. Lastly, operating systems is that they perform load-balancing for

the tasks between all available cores. In Performance, where more than one program executes at

the same time, an SMP system will have considerably better performance than a uni-processor

because different programs can run on different CPUs simultaneously.In cases where an SMP

environment processes many jobs, administrators often experience a loss of hardware efficiency.

Software programs have been developed to schedule jobs so that the processor utilization reaches

its maximum potential. Good software packages can achieve this maximum potential by

scheduling each CPU separately, as well as being able to integrate multiple SMP machines and

clusters. Access to RAM is serialized; this and cache coherency issues causes performance to lag

slightly behind the number of additional processors in the system.

The disadvantages of SMP the fact that the memory latency and bandwidth of a given node can

be affected by other nodes, and cache “thrashing” may occur in some applications.

Page 4: Symmetric multiprocessing and Microkernel

Microkernel

A Microkernel OS architecture

A microkernel is a small OS core that provides the foundation for modular extensions. The term

is somewhat fuzzy, however, and there are a number of questions about microkernels that are

answered differently by different OS design teams.

The microkernel approach was popularized by its use in the Mach OS, which is now the core of

the Macintosh Mac OS X operating system. In theory, this approach provides a high degree of

flexibility and modularity. A number of products now boast microkernel implementations, and

this general design approach is likely to be seen in most of the personal computer, workstation,

and server operating systems developed in the near future.

Page 5: Symmetric multiprocessing and Microkernel

Less essential services and applications are built on the microkernel and execute in user mode.

Although the dividing line between what is in and what is outside the microkernel varies from

one design to the, next the common characteristic is that many services that traditionally have

been part of the OS are now external subsystems that interact Swith the kernel and with each

other; these include device drivers, file systems, virtual memory manager, windowing system,

and security services. OS components external to the microkernel are implemented as server

processes; these interact with each other on a peer basis, typically by means of messages passed

through the microkernel. Thus, the microkernel functions as a message exchange: It validates

messages, passes them between components, and grants access to hardware. The microkernel

also performs a protection function; it prevents message passing unless exchange is allowed. For

example, if an application wishes to open a file, it sends a message to the file system server. If it

wishes to create a process or thread, it sends a message to the process server. Each of the servers

can send messages to other servers and can invoke the primitive functions in the microkernel.

This is a client/server architecture within a single computer.

A number of advantages for the use of microkernels have been reported in the literature. These

include:

• Uniform interfaces – all services are provided by means of message passing.

• Extensibility - allowing the addition of new services.

• Flexibility – not only can new features be added to the OS, but also existing features can

be subtracted to produce a smaller, more efficient implementation

• Portability - Intel’s near monopoly of many segments of the computer platform market

is unlikely to be sustained indefinitely. Thus, portability becomes an attractive feature of

an OS. Changes needed to port the system to a new processor are changed in the

microkernel and not in other services.

Adding a new service does not require modifying the kernel.

It is more secure as more operations are done in user mode than in kernel mode.

A simpler kernel design and functionality typically results in a more reliable operating

system.

Page 6: Symmetric multiprocessing and Microkernel

Reference:

[1] Stallings, W. (2011), Operating Systems: Internals and Design Principles 7th Ed.,

Prentice Hall International, Inc.

[2] http://en.wikipedia.org/wiki/Symmetric_multiprocessing

[3] Lecture Slides in ULearn

[4]http://sawaal.ibibo.com/computers-and-technology/what-advantages-disadvantages-symmetric-

multiprocessing-649411.html