Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous.

Similar presentations


Presentation on theme: "Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous."— Presentation transcript:

1

2 Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous in kernel mode causes integrity problem.

3 Problem of multiprocessor system Integrity protected by two policies: – Kernel cannot preempt a process and switch to other process when executing in kernel mode. – It masks out interrupts when executing in critical region. This security measures may not suffice in multiprocessor systems. 3 methods for preventing such corruption: – Execute all critical activity on one processor. – Serialize access to critical regions of code with locking primitives. – Redesign algorithm to avoid contention of data structures.

4 Solution with Master Slave Process First processor called master processor execute in kernel mode. Other processors called slave processor in user mode. 1 master and many slaves. responsible for handling execute process in user mode system calls and interrupts and inform master process when process makes system call

5 Solution with Master Slave Process(contd.) Scheduler algorithm decides which processor should execute. New field in process table processor id that process must run on It indicate process either slave or master. lets see two scenarios when the process executes.

6 Solution with Master Slave Process(contd.) When process on slave processor execute system call: – Slave kernel sets processor ID field indicating that process only run in master processor and no context switch. – Master kernel scheduled process with highest priority. – When system call finished processor ID field set to slave and allow process to run on slave processor again.

7 Solution with Master Slave Process(contd.) If processor must run on master processor must run them right away and not keep them waiting. Corruption of kernel data structure can occur because it does not protect against having a process selected for executing on two processor. Suppose if 1 master and 2 slaves both find one process in user mode ready for execution. If both processor were to schedule process simultaneously they would read, write and corrupt address space

8 Solution with Master Slave Process(contd.) Avoid problem in two ways: – Master can specify slave process on which process execute. – Kernel can allow only one process to execute scheduling loop at a time using semaphores.

9 Fig. Race Condition in Sleep-Locks on Multiprocessor

10 Buffer allocation with semaphores There are 3 major data structures in buffer allocation. – Buffer header. – Buffer hash queue. – Free list of buffers. Semaphore associated with each instruction of data structure.

11 Distributed UNIX System Two types of multiprocessor systems: – Tightly coupled systems – Loosely coupled systems Tightly coupled systems are not transparent. The editors and system calls do not work for files on remote machines as for local systems.

12 Distributed UNIX System Fig: Model of Distributed architecture

13 Distributed UNIX System The architecture contain the autonomous systems consisting of CPU memory peripherals. The system might not have memory but should have peripheral devices for communication. The kernel on each machine are independent.

14 Satellite Processors These are the implementations of distributed systems. They are tightly clustered groups centered on one machine. Satellite process share process load with central processor. Purpose is to increase system throughput and allow dedicated use of processors

15 Satellite Processors Purpose is to improve system throughput by offloading the processes form central processors. Each satellite processor has no local peripheral devices. File system and all devices are on central processor. All users execute process on satellite processor and stay their till execution completes. The satellite processors use simplified OS and device drivers. The system on initialization downloads local OS on each satellite processor.

16 Fig: Satellite processor configuration

17 Satellite Processors(contd.) Each processor on satellite processor has associated stub process on central process. The satellite processor communicate with central processor through stub when they want their system call to function. The stub executes system call and sends back result. The satellite processor and stub function as client server.(satellite is client)

18 Fig: Message formats

19 Satellite Processors(contd.) If system call can be handled locally no request sent to stub process. Functioning of stub: – waits for requests from satellite processor. – when request received it is decoded. – the system call to be invoked is determined. – the system call is executed. – the response is generated by encoding the result of executed system call.

20 Satellite Processors(contd.) System calls used for working of satellite systems: getppid, open, write, fork, exit and signal getppid: – is simple as require simple response and request between satellite and central processors. – the identification of system call is done by the token. – the stub on central processor reads message from satellite and decodes msg. – executes getppid and gets parent process id. – the response is generated after execution. – the response returned to the process originally invoking system call.

21 Satellite Processors(contd.) open: – satellite processors send open message to stub process. – when open done successfully, it allocates inode and file table entry on central processor. – In between all this allocation the satellite process reading communication from stub process waits. – The satellite process has no kernel data structures to record information about file open. – The file descriptor returned by open is index into user file descriptor table of stub process.

22 Fig: Open call from a satellite process

23 Satellite Processors(contd.) write: – Satellite processor formulates message using token. – Then the data is copied from satellite process user space and write it to communication link. – The stub process decodes write message reads data from communication link and writes it to appropriate file. – When done stub writes ack. msg. to satellite including the number of bytes written. – The stub informs satellite process if it does not return requested no. of bytes.

24 Satellite Processors(contd.) read: – Stub inform satellite process if it does not return requested number of bytes – Require transmission of multiple data message across the network

25 Satellite Processors(contd.) fork: – First select the satellite & send a message to special server process – Initialize process table & u area – Central download copy of fork process to satellite – Create stub for communicate with satellite & send message to satellite to initialize PC of new process – Stud process is child of fork process


Download ppt "Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous."

Similar presentations


Ads by Google