The document discusses operating system support for distributed computing systems. It describes how the operating system facilitates resource encapsulation, protection, and concurrent access. The OS provides processes, threads, communication, and an architecture to support middleware applications. Core OS components include a process manager, thread manager, communication manager, and memory manager. The OS uses protection rings and address space isolation to protect resources and enforce access control policies for processes. Threads allow sharing within a process while maintaining separation between processes.
Introduction to Machine Learning Unit-3 for II MECH
Unit 3 part a. operating system support
1. Distributed Computing System
UNIT III –Part A
Topic : Operating System Support
(Topics According to VTU University)
Book Referred: Distributed Computing
Concepts and Design
George Coulouris Cambridge University
Jean Dollimore formerly of Queen Mary, University of London
Tim Kindberg matter 2 media
Gordon Blair Lancaster University
Dr. Saira Banu, Professor
Department Of Information Science and Engineering
HKBK College of Engineering 1
2. Topics :
1. Introduction
2. OS Layer
3. Protection
4. Processes and Threads
5. Communication and Invocation
6. Operating System Architecture
Dr. Saira Banu, Professor
Department Of Information Science and Engineering
HKBK College of Engineering 2
3. Introduction
• The operating system facilitates the
encapsulation and protection of resources
inside servers and it supports the mechanisms
required to access these resources, including
communication and scheduling.
• kernel- and user-level functionalities
• Multi threaded and communication facilities.
Dr. Saira Banu, Professor
Department Of Information Science and Engineering
HKBK College of Engineering
3
4. Introduction
• Client applications invoke operations on
resources that are often on another node or at
least in another process. Applications and use
the middleware layer for their interactions.
• Below the middleware layer is the operating
system (OS) layer
Dr. Saira Banu, Professor
Department Of Information Science and Engineering
HKBK College of Engineering 4
5. Introduction
• Middleware – OS combination : decides the
performance.
• OS – Hardware Combination : Middle ware
runs.
Dr. Saira Banu, Professor
Department Of Information Science and Engineering
HKBK College of Engineering 5
6. OS Layer
• The OS must provide
Encapsulation : Details such as management of
memory and devices used to implement
resources should be hidden from clients.
Concurrent Processing : Clients may share
resources and access them concurrently.
Protection: Resources require protection from
illegitimate accesses.
Dr. Saira Banu, Professor
Department Of Information Science and Engineering
HKBK College of Engineering
6
7. OS Layer (Core Components and its functionalities)
Process Manager: Creation of and operations upon
processes. A process is a unit of resource management,
including an address space and one or more threads.
Thread Manager: Thread creation, synchronization and
scheduling. Threads are schedulable activities attached to
processes.
Communication Manager: Communication between threads
attached to different processes on the same computer. Some
kernels also support communication between threads in
remote processes. Other kernels have no notion of other
computers built into them, and an additional service is
required for external communication.
Dr. Saira Banu, Professor
Department Of Information Science and Engineering
HKBK College of Engineering 7
8. OS Layer (Core Components and
its functionalities
• Memory Manager: Management of physical and
virtual memory. Utilization of memory management
techniques for efficient data copying and sharing.
• Supervisor: Dispatching of interrupts, system call
traps and other exceptions; control of memory
management unit and hardware caches; processor
and floating-point unit register manipulations. This is
known as the Hardware Abstraction Layer in
Windows.
Dr. Saira Banu, Professor
Department Of Information Science and Engineering
HKBK College of Engineering
8
9. Protection
• Resources require protection from illegitimate
accesses and maliciously contrived code.
• Each resource file has two operations
• 1)Read 2)Write.
• Protecting the file consists of two sub-problems.
• The first is to ensure that each of the file’s two
operations can be performed only by clients
with the right to perform it.
• Misbehaving client : Meaningless operation
that would upset normal use of the file.
Dr. Saira Banu, Professor
Department Of Information Science and Engineering
HKBK College of Engineering
9
10. Protection
• Example of illegitimate invocations of file :
setFilePointerRandomly.
• The kernel can control the memory
management unit and set the processor
registers so that no other code may access the
machine’s physical resources.
Dr. Saira Banu, Professor
Department Of Information Science and Engineering
HKBK College of Engineering 10
11. Protection
• A kernel process executes with the processor
in supervisor (privileged) mode; the kernel
arranges that other processes execute in user
(unprivileged) mode.
• The kernel also sets up address spaces to
protect itself from the accesses of an aberrant
process.
Dr. Saira Banu, Professor
Department Of Information Science and Engineering
HKBK College of Engineering
11
12. Processes and Threads
• the traditional process makes sharing between related
activities awkward and expensive.
• The solution is to associate the process with multiple
activities. Each process consists of an execution
environment together with one or more threads.
• A thread is the operating system abstraction of an
activity (the term derives from the phrase ‘thread of
execution’).
• An execution environment is the unit of resource
management: a collection of local kernel managed
resources to which its threads have access.
Dr. Saira Banu, Professor
Department Of Information Science and Engineering
HKBK College of Engineering
12
13. Processes and Threads
• An execution environment primarily consists of:
• an address space;
• thread synchronization and communication
resources such as semaphores and
communication interfaces (Ex. sockets);
• higher-level resources such as open files and
windows
Dr. Saira Banu, Professor
Department Of Information Science and Engineering
HKBK College of Engineering 13
14. Processes and Threads
• Address spaces: An address space is a unit of
management of a process virtual memory and
consist of one or more regions.
• Each region is specified by the following
properties:
• its extent (lowest virtual address and size);
• read/write/execute permissions for the process’s
threads;
• whether it can be grown upwards or downwards.
Dr. Saira Banu, Professor
Department Of Information Science and Engineering
HKBK College of Engineering
14
15. Processes and Threads
• A shared memory region is one that is backed by the same physical memory
as one or more regions belonging to other address spaces. Processes
therefore access identical memory contents in the regions that are shared,
while their non-shared regions remain protected.
• The uses of shared regions include the following:
• Libraries: Library code can be very large and would waste considerable
memory if it was loaded separately into every process that used it.
• Kernel: Often the kernel code and data are mapped into every address space
at the same location. When a process makes a system call or an exception
occurs, there is no need to switch to a new set of address mappings.
• Data sharing and communication: Two processes, or a process and the
kernel, might need to share data in order to cooperate on some task. It can
be considerably more efficient for the data to be shared by being mapped as
regions in both address spaces than by being passed in messages between
them.
Dr. Saira Banu, Professor
Department Of Information Science and Engineering
HKBK College of Engineering
15
16. Processes and Threads
• The design of the process-creation mechanism
has to take into account the utilization of multiple
computers;
• The process-support infrastructure is divided into
separate system services.
• The creation of a new process can be separated
into two independent aspects:
• The choice of a target host,
• The creation of an execution environment (and
an initial thread within it).
Dr. Saira Banu, Professor
Department Of Information Science and Engineering
HKBK College of Engineering
16