SlideShare una empresa de Scribd logo
1 de 32
0 | P a g e
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
SEMESTER 1 YEAR 2
BITS 1213 - OPERATING SYSTEM
LIST OF MEMBERS :
NO NAME MATRIC NO.
1 NUR ATIQAH BT MOHD ROSLI B031210097
2 SU’AIDAH BT MOKHTAR B031210193
3 SITI NADIRAH BT MINHAT B0131210037
4 NOR HADHIRAH BT SHERIFF B031210041
5 NURUL NAJEEHA BT ANNUAR B031210270
1 | P a g e
CONTENT
PROCESS................................................................................................... 2-14
What is process............................................................................................ 2-3
Process state................................................................................................. 4-8
Process creation........................................................................................... 9-10
Process termination..................................................................................... 11-12
THREAD..................................................................................................... 12-23
Introduction................................................................................................. 12
How it work................................................................................................. 12-13
Advantages and disadvantages.................................................................... 14-15
Threading issues.......................................................................................... 16-18
Types of thread............................................................................................ 19-23
SYMMETRIC MULTIPROCESSING..................................................... 24-25
Description and process................................................................................ 24
How it works................................................................................................ 24
Diagram of multiprocessing......................................................................... 25
MICROKERNEL....................................................................................... 26-30
Introduction.................................................................................................. 26
Descriptions.................................................................................................. 26
Features........................................................................................................ 27
Advantages and disadvantages.................................................................... 28-29
Diagram of microkernel............................................................................... 30
2 | P a g e
PROCESS IN OPERATING SYSTEM
I. WHAT IS PROCESS?
 Process – a program in execution; process execution must progress in sequential fashion
 Task, execution of individual program.
 A process includes:
– program counter – specifying next instruction to be executed.
– Stack – containing temporary data such as return address.
– data section – containing global variables.
Figure 3.1
Process memory is divided into four sections as shown in Figure 3.1.
 Text - Comprises the compiled program code, read in from non-volatile storage
when the program is launched.
3 | P a g e
 Data -Stores global and static variables, allocated and initialized prior to
executing main.
 Heap - Dynamic memory allocation, and is managed via calls to new, delete,
malloc, free, etc.
 Stack - Local variables. Space on the stack is reserved for local variables when
they are declared ( at function entrance or elsewhere, depending on the
language ), and the space is freed up when the variables go out of scope. Note
that the stack is also used for function return values, and the exact mechanisms
of stack management may be language specific.
 Note that the stack and the heap start at opposite ends of the process's free
space and grow towards each other. If they should ever meet, then either a
stack overflow error will occur, or else a call to new or malloc will fail due to
insufficient memory available.
 When processes are swapped out of memory and later restored, additional
information must also be stored and restored. Key among them are the program
counter and the value of all program registers.
4 | P a g e
II. PROCESS STATE
There is five states in process as shown in Figure 3.2 below (may have other states besides the
ones listed):
 New - The process is in the stage of being created.
 Ready - The process has all the resources available that it needs to run, but the CPU is
not currently working on this process's instructions.
 Running - The CPU is working on this process's instructions.
 Waiting - The process cannot run at the moment, because it is waiting for some
resource to become available or for some event to occur. For example the process may
be waiting for keyboard input, disk access request, inter-process messages, a timer to
go off, or a child process to finish.
 Terminated - The process has completed.
Figure 3.2
Process Control Block (PCB)
5 | P a g e
Figure 3.3
A PCB contains the following Information:
– Process state: new, ready, …
– Program counter: indicates the address of the next instruction
to be executed for this program.
– CPU registers: includes accumulators, stack pointers, …
– CPU scheduling information: includes process priority,
pointers to scheduling queues.
– Memory-management information: includes the value of base
and limit registers (protection) …
– Accounting information: includes amount of CPU and real
time used, account numbers, process numbers, …
– I/O status information: includes list of I/O devices allocated to this process, a list
of open files, …
CPU Switch From Process to Process
6 | P a g e
Figure 3.4
Process Scheduling Queue
 The two main objectives of the process scheduling system are to keep the CPU busy
at all times and to deliver "acceptable" response times for all programs, particularly
for interactive ones.
 The process scheduler must meet these objectives by implementing suitable policies
for swapping processes in and out of the CPU.
 ( Note that these objectives can be conflicting. In particular, every time the system
steps in to swap processes it takes up time on the CPU to do so, which is thereby "lost"
from doing any useful productive work. ).
7 | P a g e
Figure 3.5 - Ready Queue And Various I/O Device Queues
 All processes are stored in the job queue.
 Processes in the Ready state are placed in the ready queue.
 Processes waiting for a device to become available or to deliver data are placed in
device queues. There is generally a separate device queue for each device.
Schedulers
 A long-term scheduler is typical of a batch system or a very heavily loaded system. It
runs infrequently, ( such as when one process ends selecting one more to be loaded in
from disk in its place ), and can afford to take the time to implement intelligent and
advanced scheduling algorithms.
8 | P a g e
 The short-term scheduler, or CPU Scheduler, runs very frequently, on the order of 100
milliseconds, and must very quickly swap one process out of the CPU and swap in
another one.
 Some systems also employ a medium-term scheduler. When system loads get high,
this scheduler will swap one or more processes out of the ready queue system for a
few seconds, in order to allow smaller faster jobs to finish up quickly and clear the
system. See the differences in Figures 3.7 and 3.8 below.
 An efficient scheduling system will select a good process mix of CPU-bound
processes and I/O bound processes.
Figure 3.6 - Queueing-diagram representation of process scheduling
9 | P a g e
III. PROCESS CREATION
• A process may create several new processes, via a create-process system call, during
execution.
• Parent process creates children processes, which, in turn create other processes,
forming a tree of processes.
• Resource sharing, such as CPU time, memory, files, I/O devices …
– Parent and children share all resources.
– Children share subset of parent’s resources.
– Parent and child share no resources.
• When a process creates a new process, two possibilities exist in terms of execution:
– Parent and children execute concurrently.
– Parent waits until children terminate.
• There are also two possibilities in terms of the address space of the new process:
– Child duplicate of parent.
– Child has a program loaded into it.
• UNIX examples:
– fork system call creates new process
– execve system call used after a fork to replace the process’ memory space with
new program.
10 | P a g e
IV. PROCESS TERMINATION
• Process executes last statement and asks the operating system to delete it by using
the exit system call.
– Output data from child to parent via wait system call.
– Process’ resources are deallocated by operating system.
• Parent may terminate execution of children processes via abort system call for a
variety of reasons, such as:
– Child has exceeded allocated resources.
– Task assigned to child is no longer required.
– Parent is exiting, and the operating system does not allow a child to continue if its
parent terminates.
Interprocess Communications (IPC)
Mechanism for processes to communicate and to synchronize their actions.
• IPC is best provided by message-passing systems.
• IPC facility provides two operations:
– send (message) – message size fixed or variable
– receive (message)
• If P and Q wish to communicate, they need to:
– establish a communication link between them
– exchange messages via send/receive
• Processes can communicate in two ways:
– Direct communication
– Indirect communication.
11 | P a g e
Advantages of process.
 Information sharing – such as shared files.
 Computation speed-up – to run a task faster, we must break it into subtasks, each of
which will be executing in parallel. This speed up can be achieved only if the
computer has multiple processing elements (such as CPUs or I/O channels).
 Modularity – construct a system in a modular function (i.e., dividing the system
functions into separate processes).
 Convenience – one user may have many tasks to work on at one time. For example, a
user may be editing, printing, and compiling in parallel.
Disadvantages of process.
 Not convenient for user and poor performance.
 Complexity in OS.
 Processes can misbehave
– By avoiding all traps and performing no I/O, can take over entire
machine.
– Only solution: Reboot!
 Difficult to setup process correctly and to express all possible options
– Process permissions, where to write I/O, environment variables.
– Example: WindowsNT has call with 10 arguments.
12 | P a g e
THREADS
INTRODUCTION
What is thread in operating system?
A thread is a flow of execution through the process code, with its own program
counter, system registers and stack. A thread is also called a light weight
process. Threads provide a way to improve application performance through
parallelism. Threads represent a software approach to improving performance of
operating system by reducing the overhead thread is equivalent to a classical
process.
A thread is a single sequence stream within in a process. Because threads have
some of the properties of processes, they are sometimes called lightweight
processes. In a process, threads allow multiple executions of streams. In many
respect, threads are popular way to improve application through parallelism.
The CPU switches rapidly back and forth among the threads giving illusion that
the threads are running in parallel. Like a traditional process i.e., process with
one thread, a thread can be in any of several states (Running, Blocked, Ready or
Terminated). Each thread has its own stack.
DESCRIPTION OF TOPIC
A thread is a flow of execution through the process code, with its own program
counter, system registers and stack. A thread is also called a light weight
process. Threads provide a way to improve application performance through
parallelism. Threads represent a software approach to improving performance of
operating system by reducing the overhead thread is equivalent to a classical
process.
13 | P a g e
Each thread belongs to exactly one process and no thread can exist outside a
process. Each thread represents a separate flow of control.Threads have been
successfully used in implementing network servers and web server. They also
provide a suitable foundation for parallel execution of applications on shared
memory multiprocessors. Folowing figure shows the working of the single and
multithreaded processes.
HOW IT WORK
Each process has its own memory space. When Process 1 accesses some given
memory location, say 0x8000, that address will be mapped to some physical
memory address1. But from Process 2, location 0x8000 will generally refer to a
completely different portion of physical memory. A thread is a subdivision that
shares the memory space of its parent process. So when either Thread 1 or
Thread 2 of Process 1 accesses "memory address 0x8000", they will be referring
to the same physical address. Threads belonging to a process usually share a few
other key resources as well, such as their working directory, environment
variables, file handles etc.
On the other hand, each thread has its own private stack and registers, including
program counter. These are essentially the things that threads need in order to be
independent. Depending on the OS, threads may have some other private
14 | P a g e
resources too, such as thread-local storage (effectively, a way of referring to
"variable number X", where each thread has its own private value of X). The OS
will generally attach a bit of "housekeeping" information to each thread, such as
its priority and state (running, waiting for I/O etc).
ADVANTAGES AND DISADVANTAGES
NO ADVANTAGES DISADVANTAGES
1.
Responsiveness - One thread may
provide rapid response while other
threads are blocked or slowed down
doing intensive calculations.
Global variables are shared
between threads.Inadvertent
modification of shared
variables can be disastrous.
2
Resource sharing - By default
threads share common code, data,
and other resources, which allows
multiple tasks to be performed
simultaneously in a single address
Many library functions are not
thread safe.
15 | P a g e
space.
3
Economy - Creating and managing
threads is much faster than
performing the same tasks for
processes.
If one thread crashes the whole
application crashes.
4
Scalability, i.e. Utilization of
multiprocessor architectures - A
single threaded process can only
run on one CPU, no matter how
many may be available, whereas
the execution of a multi-threaded
application may be split amongst
available processors.
Memory crash in one thread
kills other threads sharing the
same memory, unlike
processes.
5
User level threads are fast to create
and manage.
In a typical operating system,
most system calls are blocking.
6
User level thread can run on any
operating system.
Transfer of control from one
thread to another within same
process requires a mode switch
to the Kernel.
16 | P a g e
THREADING ISSUES
1- The Semantics of fork() and exec() system calls
It is system dependant. If the new process execs right away, there is no
need to copy all the other threads. If it doesn't, then the entire process
should be copied. Many versions of UNIX provide multiple versions of
the fork call for this purpose.
2- Signal Handling
i- When a multi-threaded process receives a signal, there are four
major options where that the thread will be delivered based on the
signal:-
 Deliver the signal to the thread to which the signal applies.
 Deliver the signal to every thread in the process.
 Deliver the signal to certain threads in the process.
 Assign a specific thread to receive all signals in a process.
ii- The best choice may depend on which specific signal is involved.
iii- Windows does not support signals, but they can be emulated using
Asynchronous Procedure Calls ( APCs ). APCs are delivered to
specific threads, not processes.
iv- Synchronous and asynchronous
17 | P a g e
3- Thread Cancellation of target thread
Threads that are no longer needed may be cancelled by another thread in
two ways:
 Asynchronous Cancellation cancels the thread immediately.
 Deferred Cancellation sets a flag indicating the thread should
cancel itself when it is convenient. It is then up to the cancelled
thread to check this flag periodically and exit nicely when it sees
the flag set.
4- Thread-Local Storage
i- Most data is shared among threads, and this is one of the major
benefits of using threads in the first place.
ii- Sometimes threads need thread-specific data also.
iii- Most major thread libraries ( pThreads, Win32, Java ) provide
support for thread-specific data, known as thread-local storage or
TLS.
iv- Note that this is more like static data than local variables, because it
does not cease to exist when the function ends.
5- Scheduler Activations
i- Many implementations of threads provide
 virtual processor (interface between the user thread),
 Kernel thread, particularly for the many-to-many or two-tier
models.
ii- This virtual processor is known as a "Lightweight Process", LWP.
18 | P a g e
iii- There is a one-to-one correspondence between LWPs and kernel
threads.
iv- The number of kernel threads available, and hence the number of
LWPs may change dynamically.
v- The application (user level thread library) maps user threads onto
available LWPs.
vi- Kernel threads are scheduled onto the real processors by the OS.
vii- The kernel communicates to the user-level thread library when
certain events occur (such as a thread about to block) via an upcall,
which is handled in the thread library by an upcall handler. The
upcall also provides a new LWP for the upcall handler to run on,
which it can then use to reschedule the user thread that is about to
become blocked. The OS will also issue upcalls when a thread
becomes unblocked, so the thread library can make appropriate
adjustments.
viii- If the kernel thread blocks, then the LWP blocks, which blocks the
user thread.
ix- Ideally there should be at least as many LWPs available as there
could be concurrently blocked kernel threads. Otherwise if all
LWPs are blocked, then user threads will have to wait for one to
become available.
19 | P a g e
TYPES OF THREAD
Threads are implemented in following two ways;
 User Level Threads
In this case, application manages thread management kernel is not aware
of the existence of threads. The thread library contains code for creating
and destroying threads, for passing message and data between threads, for
scheduling thread execution and for saving and restoring thread contexts.
The application begins with a single thread and begins running in that
thread.
 Kernel Level Threads
In this case, thread management done by the Kernel. There is no thread
management code in the application area. Kernel threads are supported
directly by the operating system. Any application can be programmed to
be multithreaded. All of the threads within an application are supported
within a single process.
The Kernel maintains context information for the process as a whole and
for individuals threads within the process. Scheduling by the Kernel is
20 | P a g e
done on a thread basis. The Kernel performs thread creation, scheduling
and management in Kernel space. Kernel threads are generally slower to
create and manage than the user threads.
 Advantages
 Kernel can simultaneously schedule multiple threads from the same
process on multiple processes.
 If one thread in a process is blocked, the Kernel can schedule
another thread of the same process.
 Kernel routines themselves can multithreaded.
 Disadvantages
 Kernel threads are generally slower to create and manage than the
user threads.
 Kernel can simultaneously schedule multiple threads from the same
process on multiple processes.
 If one thread in a process is blocked, the Kernel can schedule
another thread of the same process.
 Kernel routines themselves can multithreaded.
 Kernel threads are generally slower to create and manage than the
user threads.
21 | P a g e
Multithreading Models
Some operating system provide a combined user level thread and Kernel level
thread facility. Solaris is a good example of this combined approach. In a
combined system, multiple threads within the same application can run in
parallel on multiple processors and a blocking system call need not block the
entire process. Multithreading models are three types;
 Many to Many Model
Many user level threads multiplexes to the Kernel thread of smaller or equal
numbers. The number of Kernel threads may be specific to either a particular
application or a particular machine.
Following diagram shows the many to many model. In this model, developers
can create as many user threads as necessary and the corresponding Kernel
threads can run in parallels on a multiprocessor.
 Many to One Model
Many to one model maps many user level threads to one Kernel level thread.
Thread management is done in user space. When thread makes a blocking
22 | P a g e
system call, the entire process will be blocks. Only one thread can access the
Kernel at a time,so multiple threads are unable to run in parallel on
multiprocessors.
If the user level thread libraries are implemented in the operating system in such
a way that system does not support them then Kernel threads use the many to
one relationship modes.
 One to One Model
There is one to one relationship of user level thread to the kernel level
thread.This model provides more concurrency than the many to one model. It
also another thread to run when a thread makes a blocking system call. It
support multiple thread to execute in parallel on microprocessors.
Disadvantage of this model is that creating user thread requires the
corresponding Kernel thread. OS/2, windows NT and windows 2000 use one to
one relationship model.
23 | P a g e
Difference between User Level & Kernel Level Thread
S.N. User Level Threads Kernel Level Thread
1
User level threads are faster to
create and manage.
Kernel level threads are slower to
create and manage.
2
Implementation is by a thread
library at the user level.
Operating system supports creation of
Kernel threads.
3
User level thread is generic and
can run on any operating system.
Kernel level thread is specific to the
operating system.
4
Multi-threaded application cannot
take advantage of multiprocessing.
Kernel routines themselves can be
multithreaded.
24 | P a g e
SYMMETRIC MULTIPROCESSING
 SMP systems allow any processor to work on any task no matter where
the data for that task are located in memory, provided that each task in the
system is not in execution on two or more processors at the same time.
With proper operating system support, SMP systems can easily move
tasks between processors to balance the workload efficiently.
 SMP systems are tightly coupled multiprocessor systems with a pool of
homogeneous processors running independently, each processor
executing different programs and working on different data and with
capability of sharing common resources (memory, I/O device, interrupt
system and so on) and connected using a system bus or a crossbar.
 Uniprocessor and SMP systems require different programming methods to
achieve maximum performance. Programs running on SMP systems may
experience a performance increase even when they have been written for
uniprocessor systems. This is because hardware interrupts that usually
suspend program execution while the kernel handles them can execute on
an idle processor instead
25 | P a g e
Process of Symmetric Multiprocessor
26 | P a g e
Microkernel
Introduction of Microkernel
Early operating system kernels were rather small, partly because computer memory was
limited. As the capability of computers grew, the number of devices the kernel had to control
also grew. Through the early history of Unix, kernels were generally small, even though those
kernels contained device drivers and file system managers. When address spaces increased
from 16 to 32 bits, kernel design was no longer cramped by the hardware architecture, and
kernels began to grow.
The Berkeley Software Distribution (BSD) of Unix began the era of big kernels. In addition to
operating a basic system consisting of the CPU, disks and printers, BSD started adding
additional file systems, a complete TCP/IP networking system, and a number of "virtual"
devices that allowed the existing programs to work invisibly over the network. This growth
continued for many years, resulting in kernels with millions of lines of source code. As a
result of this growth, kernels were more prone to bugs and became increasingly difficult to
maintain.
The microkernel was designed to address the increasing growth of kernels and the difficulties
that came with them. In theory, the microkernel design allows for easier management of code
due to its division into user space services. This also allows for increased security and
stability resulting from the reduced amount of code running in kernel mode. For example, if a
networking service crashed due to buffer overflow, only the networking service's memory
would be corrupted, leaving the rest of the system still functional.
27 | P a g e
Descriptions of Microkernel
A Microkernel is a highly Spartan modular subsystem composed of OS-neutral abstractions,
providing only essential services such as process abstractions, threads, IPC, and memory
management primitives. All device drivers, etc., which are normally part of an OS kernel, run
on the microkernel as just another user process.
• Multiple operating systems can then be layered on top of these abstractions, and are thus
viewed assimply another application.
• Thisfocus on modularity allowsforscalability,extensibility and portability not found in
monolithic operating systems(Unix, Linux, DOS, etc.)
Features
• the microkernel provides only rudimentary core facilities, different OS personalities(such as
BSD Unix, Linux,NT, etc.) can be hosted on the microkernel.
• Because ofits highly modular nature,many of the services commonly found in“kernelspace”
are found in “userspace”on a microkernelFeatures
• Flexibility (can restart modules without rebooting the OS)
• Lower fixed memory demand: The L4 (Mach)Microkernel only takes up about 32 Kilobytes
of memory.
• However, a microkernel + regular OS will probably take up more memory than a simple OS
would take up, because of the additional memory required by the microkernel itself
• SMP delivery is easier
28 | P a g e
The advantages and disadvatages of Microkernel
Advantages
 Extensible: add a new server to add new OS functionality.
 Kernel does not determine operating system environment.
• Allows support for multiple OS personalities
• Need an emulation server for each system (e.g. Mac,Windows, Unix)
• All applications run on same microkernel
• Applications can use customized OS (e.g. for databases)
 Most hardware agnostic
Threads ,IPC, user-level servers don't need to worry abount udelying hardware.
 Strong protection
Even of the OS againts itself (i.e the part of the OS that are implemented as
servers)
 Esay extension to multiprocessor and distributed system.
 Microkernel are simplicity of the kernel (small)
 Flexibility
we can have a file server and a database server
Disadvantages
 Performance
System call can require a lot of protection mode changes
 Expensive to reimplement everything with a new model.
29 | P a g e
OS personalities are easir to port to new hardware after porting to microkernel,
but porting to microkernel may be hardder than porting to new hardware.
 More overhead
 Loss of the system call and context switches
E.g Mach, L4, AmigaOS, Minix , K42.
30 | P a g e
The diagram of Microkernel
31 | P a g e

Más contenido relacionado

La actualidad más candente

Process concept
Process conceptProcess concept
Process conceptjangezkhan
 
Process in operating system
Process in operating systemProcess in operating system
Process in operating systemChetan Mahawar
 
Process Control Block & Threads and Their Management
Process Control Block & Threads and Their ManagementProcess Control Block & Threads and Their Management
Process Control Block & Threads and Their ManagementUjjwal Kumar
 
My ppt @ bec doms on process management
My ppt @ bec doms on process managementMy ppt @ bec doms on process management
My ppt @ bec doms on process managementBabasab Patil
 
Unit 2 part 1(Process)
Unit 2 part 1(Process)Unit 2 part 1(Process)
Unit 2 part 1(Process)WajeehaBaig
 
CSI-503 - 2. Processor Management
CSI-503 - 2. Processor ManagementCSI-503 - 2. Processor Management
CSI-503 - 2. Processor Managementghayour abbas
 
Processes and operating systems
Processes and operating systemsProcesses and operating systems
Processes and operating systemsRAMPRAKASHT1
 
Process life cycle
Process life cycleProcess life cycle
Process life cycleGunjan Kumar
 
Operating system concepts
Operating system conceptsOperating system concepts
Operating system conceptsArnav Chowdhury
 
Process management
Process managementProcess management
Process managementBirju Tank
 
Operating System-Concepts of Process
Operating System-Concepts of ProcessOperating System-Concepts of Process
Operating System-Concepts of ProcessShipra Swati
 
Unit II - 1 - Operating System Process
Unit II - 1 - Operating System ProcessUnit II - 1 - Operating System Process
Unit II - 1 - Operating System Processcscarcas
 

La actualidad más candente (18)

Processes
ProcessesProcesses
Processes
 
Process concept
Process conceptProcess concept
Process concept
 
Mis unit iii by arnav
Mis unit iii by arnavMis unit iii by arnav
Mis unit iii by arnav
 
Process in operating system
Process in operating systemProcess in operating system
Process in operating system
 
Process Control Block & Threads and Their Management
Process Control Block & Threads and Their ManagementProcess Control Block & Threads and Their Management
Process Control Block & Threads and Their Management
 
My ppt @ bec doms on process management
My ppt @ bec doms on process managementMy ppt @ bec doms on process management
My ppt @ bec doms on process management
 
Unit 2 part 1(Process)
Unit 2 part 1(Process)Unit 2 part 1(Process)
Unit 2 part 1(Process)
 
CSI-503 - 2. Processor Management
CSI-503 - 2. Processor ManagementCSI-503 - 2. Processor Management
CSI-503 - 2. Processor Management
 
Os unit 2
Os unit 2Os unit 2
Os unit 2
 
Processes and operating systems
Processes and operating systemsProcesses and operating systems
Processes and operating systems
 
Process state in OS
Process state in OSProcess state in OS
Process state in OS
 
Process life cycle
Process life cycleProcess life cycle
Process life cycle
 
Ch3 processes
Ch3   processesCh3   processes
Ch3 processes
 
Operating system concepts
Operating system conceptsOperating system concepts
Operating system concepts
 
Process management
Process managementProcess management
Process management
 
OS Chapter03
OS Chapter03OS Chapter03
OS Chapter03
 
Operating System-Concepts of Process
Operating System-Concepts of ProcessOperating System-Concepts of Process
Operating System-Concepts of Process
 
Unit II - 1 - Operating System Process
Unit II - 1 - Operating System ProcessUnit II - 1 - Operating System Process
Unit II - 1 - Operating System Process
 

Destacado

Mp Os Survey
Mp Os SurveyMp Os Survey
Mp Os Surveyallankliu
 
Multiprocessor structures
Multiprocessor structuresMultiprocessor structures
Multiprocessor structuresShareb Ismaeel
 
Computer Architecture: A quantitative approach - Cap4 - Section 3
Computer Architecture: A quantitative approach - Cap4 - Section 3Computer Architecture: A quantitative approach - Cap4 - Section 3
Computer Architecture: A quantitative approach - Cap4 - Section 3Marcelo Arbore
 
Computer Architecture: A quantitative approach - Cap4 - Section 1
Computer Architecture: A quantitative approach - Cap4 - Section 1Computer Architecture: A quantitative approach - Cap4 - Section 1
Computer Architecture: A quantitative approach - Cap4 - Section 1Marcelo Arbore
 
Computer Architecture: A quantitative approach - Cap4 - Section 8
Computer Architecture: A quantitative approach - Cap4 - Section 8Computer Architecture: A quantitative approach - Cap4 - Section 8
Computer Architecture: A quantitative approach - Cap4 - Section 8Marcelo Arbore
 
Computer Architecture: A quantitative approach - Cap4 - Section 6
Computer Architecture: A quantitative approach - Cap4 - Section 6Computer Architecture: A quantitative approach - Cap4 - Section 6
Computer Architecture: A quantitative approach - Cap4 - Section 6Marcelo Arbore
 
Computer Architecture: A quantitative approach - Cap4 - Section 5
Computer Architecture: A quantitative approach - Cap4 - Section 5Computer Architecture: A quantitative approach - Cap4 - Section 5
Computer Architecture: A quantitative approach - Cap4 - Section 5Marcelo Arbore
 
Computer Architecture: A quantitative approach - Cap4 - Section 2
Computer Architecture: A quantitative approach - Cap4 - Section 2Computer Architecture: A quantitative approach - Cap4 - Section 2
Computer Architecture: A quantitative approach - Cap4 - Section 2Marcelo Arbore
 
Day 2 global_state_and_snapshot_algorithms
Day 2 global_state_and_snapshot_algorithmsDay 2 global_state_and_snapshot_algorithms
Day 2 global_state_and_snapshot_algorithmsVI Ni
 
Process, Threads, Symmetric Multiprocessing and Microkernels in Operating System
Process, Threads, Symmetric Multiprocessing and Microkernels in Operating SystemProcess, Threads, Symmetric Multiprocessing and Microkernels in Operating System
Process, Threads, Symmetric Multiprocessing and Microkernels in Operating SystemLieYah Daliah
 
Instruction Level Parallelism (ILP) Limitations
Instruction Level Parallelism (ILP) LimitationsInstruction Level Parallelism (ILP) Limitations
Instruction Level Parallelism (ILP) LimitationsJose Pinilla
 
Transactions (Distributed computing)
Transactions (Distributed computing)Transactions (Distributed computing)
Transactions (Distributed computing)Sri Prasanna
 
Advanced Operating System- Introduction
Advanced Operating System- IntroductionAdvanced Operating System- Introduction
Advanced Operating System- IntroductionDebasis Das
 
Pipelining and ILP (Instruction Level Parallelism)
Pipelining and ILP (Instruction Level Parallelism) Pipelining and ILP (Instruction Level Parallelism)
Pipelining and ILP (Instruction Level Parallelism) A B Shinde
 
Multiprocessor architecture
Multiprocessor architectureMultiprocessor architecture
Multiprocessor architectureArpan Baishya
 
Multiple processor (ppt 2010)
Multiple processor (ppt 2010)Multiple processor (ppt 2010)
Multiple processor (ppt 2010)Arth Ramada
 

Destacado (20)

14 thread
14 thread14 thread
14 thread
 
Process and thread
Process and threadProcess and thread
Process and thread
 
Mp Os Survey
Mp Os SurveyMp Os Survey
Mp Os Survey
 
Multiprocessor structures
Multiprocessor structuresMultiprocessor structures
Multiprocessor structures
 
Computer Architecture: A quantitative approach - Cap4 - Section 3
Computer Architecture: A quantitative approach - Cap4 - Section 3Computer Architecture: A quantitative approach - Cap4 - Section 3
Computer Architecture: A quantitative approach - Cap4 - Section 3
 
Computer Architecture: A quantitative approach - Cap4 - Section 1
Computer Architecture: A quantitative approach - Cap4 - Section 1Computer Architecture: A quantitative approach - Cap4 - Section 1
Computer Architecture: A quantitative approach - Cap4 - Section 1
 
Computer Architecture: A quantitative approach - Cap4 - Section 8
Computer Architecture: A quantitative approach - Cap4 - Section 8Computer Architecture: A quantitative approach - Cap4 - Section 8
Computer Architecture: A quantitative approach - Cap4 - Section 8
 
Computer Architecture: A quantitative approach - Cap4 - Section 6
Computer Architecture: A quantitative approach - Cap4 - Section 6Computer Architecture: A quantitative approach - Cap4 - Section 6
Computer Architecture: A quantitative approach - Cap4 - Section 6
 
Computer Architecture: A quantitative approach - Cap4 - Section 5
Computer Architecture: A quantitative approach - Cap4 - Section 5Computer Architecture: A quantitative approach - Cap4 - Section 5
Computer Architecture: A quantitative approach - Cap4 - Section 5
 
Computer Architecture: A quantitative approach - Cap4 - Section 2
Computer Architecture: A quantitative approach - Cap4 - Section 2Computer Architecture: A quantitative approach - Cap4 - Section 2
Computer Architecture: A quantitative approach - Cap4 - Section 2
 
Day 2 global_state_and_snapshot_algorithms
Day 2 global_state_and_snapshot_algorithmsDay 2 global_state_and_snapshot_algorithms
Day 2 global_state_and_snapshot_algorithms
 
Process, Threads, Symmetric Multiprocessing and Microkernels in Operating System
Process, Threads, Symmetric Multiprocessing and Microkernels in Operating SystemProcess, Threads, Symmetric Multiprocessing and Microkernels in Operating System
Process, Threads, Symmetric Multiprocessing and Microkernels in Operating System
 
Instruction Level Parallelism (ILP) Limitations
Instruction Level Parallelism (ILP) LimitationsInstruction Level Parallelism (ILP) Limitations
Instruction Level Parallelism (ILP) Limitations
 
13. multiprocessing
13. multiprocessing13. multiprocessing
13. multiprocessing
 
Transactions (Distributed computing)
Transactions (Distributed computing)Transactions (Distributed computing)
Transactions (Distributed computing)
 
Multi processing
Multi processingMulti processing
Multi processing
 
Advanced Operating System- Introduction
Advanced Operating System- IntroductionAdvanced Operating System- Introduction
Advanced Operating System- Introduction
 
Pipelining and ILP (Instruction Level Parallelism)
Pipelining and ILP (Instruction Level Parallelism) Pipelining and ILP (Instruction Level Parallelism)
Pipelining and ILP (Instruction Level Parallelism)
 
Multiprocessor architecture
Multiprocessor architectureMultiprocessor architecture
Multiprocessor architecture
 
Multiple processor (ppt 2010)
Multiple processor (ppt 2010)Multiple processor (ppt 2010)
Multiple processor (ppt 2010)
 

Similar a BITS 1213 - OPERATING SYSTEM (PROCESS,THREAD,SYMMETRIC MULTIPROCESSOR,MICROKERNEL)

OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process ConceptsMukesh Chinta
 
Ch2_Processes_and_process_management_1.ppt
Ch2_Processes_and_process_management_1.pptCh2_Processes_and_process_management_1.ppt
Ch2_Processes_and_process_management_1.pptMohammad Almuiet
 
Operating Systems Unit Two - Fourth Semester - Engineering
Operating Systems Unit Two - Fourth Semester - EngineeringOperating Systems Unit Two - Fourth Semester - Engineering
Operating Systems Unit Two - Fourth Semester - EngineeringYogesh Santhan
 
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncationLM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncationMani Deepak Choudhry
 
OperatingSystem02..(B.SC Part 2)
OperatingSystem02..(B.SC Part 2)OperatingSystem02..(B.SC Part 2)
OperatingSystem02..(B.SC Part 2)Muhammad Osama
 
Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...
Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...
Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...morganjohn3
 
CSI-503 - 3. Process Scheduling
CSI-503 - 3. Process SchedulingCSI-503 - 3. Process Scheduling
CSI-503 - 3. Process Schedulingghayour abbas
 
Operating system - Process and its concepts
Operating system - Process and its conceptsOperating system - Process and its concepts
Operating system - Process and its conceptsKaran Thakkar
 
Operating system Q/A
Operating system Q/AOperating system Q/A
Operating system Q/AAbdul Munam
 
Operating Systems chap 2_updated2 (1).pptx
Operating Systems chap 2_updated2 (1).pptxOperating Systems chap 2_updated2 (1).pptx
Operating Systems chap 2_updated2 (1).pptxAmanuelmergia
 

Similar a BITS 1213 - OPERATING SYSTEM (PROCESS,THREAD,SYMMETRIC MULTIPROCESSOR,MICROKERNEL) (20)

Ch03- PROCESSES.ppt
Ch03- PROCESSES.pptCh03- PROCESSES.ppt
Ch03- PROCESSES.ppt
 
unit-2.pdf
unit-2.pdfunit-2.pdf
unit-2.pdf
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process Concepts
 
Ch2_Processes_and_process_management_1.ppt
Ch2_Processes_and_process_management_1.pptCh2_Processes_and_process_management_1.ppt
Ch2_Processes_and_process_management_1.ppt
 
Chapter 3.pdf
Chapter 3.pdfChapter 3.pdf
Chapter 3.pdf
 
UNIT I-Processes.pptx
UNIT I-Processes.pptxUNIT I-Processes.pptx
UNIT I-Processes.pptx
 
UNIT - 3 PPT(Part- 1)_.pdf
UNIT - 3 PPT(Part- 1)_.pdfUNIT - 3 PPT(Part- 1)_.pdf
UNIT - 3 PPT(Part- 1)_.pdf
 
Operating Systems Unit Two - Fourth Semester - Engineering
Operating Systems Unit Two - Fourth Semester - EngineeringOperating Systems Unit Two - Fourth Semester - Engineering
Operating Systems Unit Two - Fourth Semester - Engineering
 
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncationLM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
 
OperatingSystem02..(B.SC Part 2)
OperatingSystem02..(B.SC Part 2)OperatingSystem02..(B.SC Part 2)
OperatingSystem02..(B.SC Part 2)
 
Process Management
Process ManagementProcess Management
Process Management
 
Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...
Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...
Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...
 
OS-Process.pdf
OS-Process.pdfOS-Process.pdf
OS-Process.pdf
 
CSI-503 - 3. Process Scheduling
CSI-503 - 3. Process SchedulingCSI-503 - 3. Process Scheduling
CSI-503 - 3. Process Scheduling
 
Bt0070
Bt0070Bt0070
Bt0070
 
Operating System.pptx
Operating System.pptxOperating System.pptx
Operating System.pptx
 
Operating system - Process and its concepts
Operating system - Process and its conceptsOperating system - Process and its concepts
Operating system - Process and its concepts
 
Cs8493 unit 2
Cs8493 unit 2Cs8493 unit 2
Cs8493 unit 2
 
Operating system Q/A
Operating system Q/AOperating system Q/A
Operating system Q/A
 
Operating Systems chap 2_updated2 (1).pptx
Operating Systems chap 2_updated2 (1).pptxOperating Systems chap 2_updated2 (1).pptx
Operating Systems chap 2_updated2 (1).pptx
 

Último

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 

Último (20)

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 

BITS 1213 - OPERATING SYSTEM (PROCESS,THREAD,SYMMETRIC MULTIPROCESSOR,MICROKERNEL)

  • 1. 0 | P a g e UNIVERSITI TEKNIKAL MALAYSIA MELAKA SEMESTER 1 YEAR 2 BITS 1213 - OPERATING SYSTEM LIST OF MEMBERS : NO NAME MATRIC NO. 1 NUR ATIQAH BT MOHD ROSLI B031210097 2 SU’AIDAH BT MOKHTAR B031210193 3 SITI NADIRAH BT MINHAT B0131210037 4 NOR HADHIRAH BT SHERIFF B031210041 5 NURUL NAJEEHA BT ANNUAR B031210270
  • 2. 1 | P a g e CONTENT PROCESS................................................................................................... 2-14 What is process............................................................................................ 2-3 Process state................................................................................................. 4-8 Process creation........................................................................................... 9-10 Process termination..................................................................................... 11-12 THREAD..................................................................................................... 12-23 Introduction................................................................................................. 12 How it work................................................................................................. 12-13 Advantages and disadvantages.................................................................... 14-15 Threading issues.......................................................................................... 16-18 Types of thread............................................................................................ 19-23 SYMMETRIC MULTIPROCESSING..................................................... 24-25 Description and process................................................................................ 24 How it works................................................................................................ 24 Diagram of multiprocessing......................................................................... 25 MICROKERNEL....................................................................................... 26-30 Introduction.................................................................................................. 26 Descriptions.................................................................................................. 26 Features........................................................................................................ 27 Advantages and disadvantages.................................................................... 28-29 Diagram of microkernel............................................................................... 30
  • 3. 2 | P a g e PROCESS IN OPERATING SYSTEM I. WHAT IS PROCESS?  Process – a program in execution; process execution must progress in sequential fashion  Task, execution of individual program.  A process includes: – program counter – specifying next instruction to be executed. – Stack – containing temporary data such as return address. – data section – containing global variables. Figure 3.1 Process memory is divided into four sections as shown in Figure 3.1.  Text - Comprises the compiled program code, read in from non-volatile storage when the program is launched.
  • 4. 3 | P a g e  Data -Stores global and static variables, allocated and initialized prior to executing main.  Heap - Dynamic memory allocation, and is managed via calls to new, delete, malloc, free, etc.  Stack - Local variables. Space on the stack is reserved for local variables when they are declared ( at function entrance or elsewhere, depending on the language ), and the space is freed up when the variables go out of scope. Note that the stack is also used for function return values, and the exact mechanisms of stack management may be language specific.  Note that the stack and the heap start at opposite ends of the process's free space and grow towards each other. If they should ever meet, then either a stack overflow error will occur, or else a call to new or malloc will fail due to insufficient memory available.  When processes are swapped out of memory and later restored, additional information must also be stored and restored. Key among them are the program counter and the value of all program registers.
  • 5. 4 | P a g e II. PROCESS STATE There is five states in process as shown in Figure 3.2 below (may have other states besides the ones listed):  New - The process is in the stage of being created.  Ready - The process has all the resources available that it needs to run, but the CPU is not currently working on this process's instructions.  Running - The CPU is working on this process's instructions.  Waiting - The process cannot run at the moment, because it is waiting for some resource to become available or for some event to occur. For example the process may be waiting for keyboard input, disk access request, inter-process messages, a timer to go off, or a child process to finish.  Terminated - The process has completed. Figure 3.2 Process Control Block (PCB)
  • 6. 5 | P a g e Figure 3.3 A PCB contains the following Information: – Process state: new, ready, … – Program counter: indicates the address of the next instruction to be executed for this program. – CPU registers: includes accumulators, stack pointers, … – CPU scheduling information: includes process priority, pointers to scheduling queues. – Memory-management information: includes the value of base and limit registers (protection) … – Accounting information: includes amount of CPU and real time used, account numbers, process numbers, … – I/O status information: includes list of I/O devices allocated to this process, a list of open files, … CPU Switch From Process to Process
  • 7. 6 | P a g e Figure 3.4 Process Scheduling Queue  The two main objectives of the process scheduling system are to keep the CPU busy at all times and to deliver "acceptable" response times for all programs, particularly for interactive ones.  The process scheduler must meet these objectives by implementing suitable policies for swapping processes in and out of the CPU.  ( Note that these objectives can be conflicting. In particular, every time the system steps in to swap processes it takes up time on the CPU to do so, which is thereby "lost" from doing any useful productive work. ).
  • 8. 7 | P a g e Figure 3.5 - Ready Queue And Various I/O Device Queues  All processes are stored in the job queue.  Processes in the Ready state are placed in the ready queue.  Processes waiting for a device to become available or to deliver data are placed in device queues. There is generally a separate device queue for each device. Schedulers  A long-term scheduler is typical of a batch system or a very heavily loaded system. It runs infrequently, ( such as when one process ends selecting one more to be loaded in from disk in its place ), and can afford to take the time to implement intelligent and advanced scheduling algorithms.
  • 9. 8 | P a g e  The short-term scheduler, or CPU Scheduler, runs very frequently, on the order of 100 milliseconds, and must very quickly swap one process out of the CPU and swap in another one.  Some systems also employ a medium-term scheduler. When system loads get high, this scheduler will swap one or more processes out of the ready queue system for a few seconds, in order to allow smaller faster jobs to finish up quickly and clear the system. See the differences in Figures 3.7 and 3.8 below.  An efficient scheduling system will select a good process mix of CPU-bound processes and I/O bound processes. Figure 3.6 - Queueing-diagram representation of process scheduling
  • 10. 9 | P a g e III. PROCESS CREATION • A process may create several new processes, via a create-process system call, during execution. • Parent process creates children processes, which, in turn create other processes, forming a tree of processes. • Resource sharing, such as CPU time, memory, files, I/O devices … – Parent and children share all resources. – Children share subset of parent’s resources. – Parent and child share no resources. • When a process creates a new process, two possibilities exist in terms of execution: – Parent and children execute concurrently. – Parent waits until children terminate. • There are also two possibilities in terms of the address space of the new process: – Child duplicate of parent. – Child has a program loaded into it. • UNIX examples: – fork system call creates new process – execve system call used after a fork to replace the process’ memory space with new program.
  • 11. 10 | P a g e IV. PROCESS TERMINATION • Process executes last statement and asks the operating system to delete it by using the exit system call. – Output data from child to parent via wait system call. – Process’ resources are deallocated by operating system. • Parent may terminate execution of children processes via abort system call for a variety of reasons, such as: – Child has exceeded allocated resources. – Task assigned to child is no longer required. – Parent is exiting, and the operating system does not allow a child to continue if its parent terminates. Interprocess Communications (IPC) Mechanism for processes to communicate and to synchronize their actions. • IPC is best provided by message-passing systems. • IPC facility provides two operations: – send (message) – message size fixed or variable – receive (message) • If P and Q wish to communicate, they need to: – establish a communication link between them – exchange messages via send/receive • Processes can communicate in two ways: – Direct communication – Indirect communication.
  • 12. 11 | P a g e Advantages of process.  Information sharing – such as shared files.  Computation speed-up – to run a task faster, we must break it into subtasks, each of which will be executing in parallel. This speed up can be achieved only if the computer has multiple processing elements (such as CPUs or I/O channels).  Modularity – construct a system in a modular function (i.e., dividing the system functions into separate processes).  Convenience – one user may have many tasks to work on at one time. For example, a user may be editing, printing, and compiling in parallel. Disadvantages of process.  Not convenient for user and poor performance.  Complexity in OS.  Processes can misbehave – By avoiding all traps and performing no I/O, can take over entire machine. – Only solution: Reboot!  Difficult to setup process correctly and to express all possible options – Process permissions, where to write I/O, environment variables. – Example: WindowsNT has call with 10 arguments.
  • 13. 12 | P a g e THREADS INTRODUCTION What is thread in operating system? A thread is a flow of execution through the process code, with its own program counter, system registers and stack. A thread is also called a light weight process. Threads provide a way to improve application performance through parallelism. Threads represent a software approach to improving performance of operating system by reducing the overhead thread is equivalent to a classical process. A thread is a single sequence stream within in a process. Because threads have some of the properties of processes, they are sometimes called lightweight processes. In a process, threads allow multiple executions of streams. In many respect, threads are popular way to improve application through parallelism. The CPU switches rapidly back and forth among the threads giving illusion that the threads are running in parallel. Like a traditional process i.e., process with one thread, a thread can be in any of several states (Running, Blocked, Ready or Terminated). Each thread has its own stack. DESCRIPTION OF TOPIC A thread is a flow of execution through the process code, with its own program counter, system registers and stack. A thread is also called a light weight process. Threads provide a way to improve application performance through parallelism. Threads represent a software approach to improving performance of operating system by reducing the overhead thread is equivalent to a classical process.
  • 14. 13 | P a g e Each thread belongs to exactly one process and no thread can exist outside a process. Each thread represents a separate flow of control.Threads have been successfully used in implementing network servers and web server. They also provide a suitable foundation for parallel execution of applications on shared memory multiprocessors. Folowing figure shows the working of the single and multithreaded processes. HOW IT WORK Each process has its own memory space. When Process 1 accesses some given memory location, say 0x8000, that address will be mapped to some physical memory address1. But from Process 2, location 0x8000 will generally refer to a completely different portion of physical memory. A thread is a subdivision that shares the memory space of its parent process. So when either Thread 1 or Thread 2 of Process 1 accesses "memory address 0x8000", they will be referring to the same physical address. Threads belonging to a process usually share a few other key resources as well, such as their working directory, environment variables, file handles etc. On the other hand, each thread has its own private stack and registers, including program counter. These are essentially the things that threads need in order to be independent. Depending on the OS, threads may have some other private
  • 15. 14 | P a g e resources too, such as thread-local storage (effectively, a way of referring to "variable number X", where each thread has its own private value of X). The OS will generally attach a bit of "housekeeping" information to each thread, such as its priority and state (running, waiting for I/O etc). ADVANTAGES AND DISADVANTAGES NO ADVANTAGES DISADVANTAGES 1. Responsiveness - One thread may provide rapid response while other threads are blocked or slowed down doing intensive calculations. Global variables are shared between threads.Inadvertent modification of shared variables can be disastrous. 2 Resource sharing - By default threads share common code, data, and other resources, which allows multiple tasks to be performed simultaneously in a single address Many library functions are not thread safe.
  • 16. 15 | P a g e space. 3 Economy - Creating and managing threads is much faster than performing the same tasks for processes. If one thread crashes the whole application crashes. 4 Scalability, i.e. Utilization of multiprocessor architectures - A single threaded process can only run on one CPU, no matter how many may be available, whereas the execution of a multi-threaded application may be split amongst available processors. Memory crash in one thread kills other threads sharing the same memory, unlike processes. 5 User level threads are fast to create and manage. In a typical operating system, most system calls are blocking. 6 User level thread can run on any operating system. Transfer of control from one thread to another within same process requires a mode switch to the Kernel.
  • 17. 16 | P a g e THREADING ISSUES 1- The Semantics of fork() and exec() system calls It is system dependant. If the new process execs right away, there is no need to copy all the other threads. If it doesn't, then the entire process should be copied. Many versions of UNIX provide multiple versions of the fork call for this purpose. 2- Signal Handling i- When a multi-threaded process receives a signal, there are four major options where that the thread will be delivered based on the signal:-  Deliver the signal to the thread to which the signal applies.  Deliver the signal to every thread in the process.  Deliver the signal to certain threads in the process.  Assign a specific thread to receive all signals in a process. ii- The best choice may depend on which specific signal is involved. iii- Windows does not support signals, but they can be emulated using Asynchronous Procedure Calls ( APCs ). APCs are delivered to specific threads, not processes. iv- Synchronous and asynchronous
  • 18. 17 | P a g e 3- Thread Cancellation of target thread Threads that are no longer needed may be cancelled by another thread in two ways:  Asynchronous Cancellation cancels the thread immediately.  Deferred Cancellation sets a flag indicating the thread should cancel itself when it is convenient. It is then up to the cancelled thread to check this flag periodically and exit nicely when it sees the flag set. 4- Thread-Local Storage i- Most data is shared among threads, and this is one of the major benefits of using threads in the first place. ii- Sometimes threads need thread-specific data also. iii- Most major thread libraries ( pThreads, Win32, Java ) provide support for thread-specific data, known as thread-local storage or TLS. iv- Note that this is more like static data than local variables, because it does not cease to exist when the function ends. 5- Scheduler Activations i- Many implementations of threads provide  virtual processor (interface between the user thread),  Kernel thread, particularly for the many-to-many or two-tier models. ii- This virtual processor is known as a "Lightweight Process", LWP.
  • 19. 18 | P a g e iii- There is a one-to-one correspondence between LWPs and kernel threads. iv- The number of kernel threads available, and hence the number of LWPs may change dynamically. v- The application (user level thread library) maps user threads onto available LWPs. vi- Kernel threads are scheduled onto the real processors by the OS. vii- The kernel communicates to the user-level thread library when certain events occur (such as a thread about to block) via an upcall, which is handled in the thread library by an upcall handler. The upcall also provides a new LWP for the upcall handler to run on, which it can then use to reschedule the user thread that is about to become blocked. The OS will also issue upcalls when a thread becomes unblocked, so the thread library can make appropriate adjustments. viii- If the kernel thread blocks, then the LWP blocks, which blocks the user thread. ix- Ideally there should be at least as many LWPs available as there could be concurrently blocked kernel threads. Otherwise if all LWPs are blocked, then user threads will have to wait for one to become available.
  • 20. 19 | P a g e TYPES OF THREAD Threads are implemented in following two ways;  User Level Threads In this case, application manages thread management kernel is not aware of the existence of threads. The thread library contains code for creating and destroying threads, for passing message and data between threads, for scheduling thread execution and for saving and restoring thread contexts. The application begins with a single thread and begins running in that thread.  Kernel Level Threads In this case, thread management done by the Kernel. There is no thread management code in the application area. Kernel threads are supported directly by the operating system. Any application can be programmed to be multithreaded. All of the threads within an application are supported within a single process. The Kernel maintains context information for the process as a whole and for individuals threads within the process. Scheduling by the Kernel is
  • 21. 20 | P a g e done on a thread basis. The Kernel performs thread creation, scheduling and management in Kernel space. Kernel threads are generally slower to create and manage than the user threads.  Advantages  Kernel can simultaneously schedule multiple threads from the same process on multiple processes.  If one thread in a process is blocked, the Kernel can schedule another thread of the same process.  Kernel routines themselves can multithreaded.  Disadvantages  Kernel threads are generally slower to create and manage than the user threads.  Kernel can simultaneously schedule multiple threads from the same process on multiple processes.  If one thread in a process is blocked, the Kernel can schedule another thread of the same process.  Kernel routines themselves can multithreaded.  Kernel threads are generally slower to create and manage than the user threads.
  • 22. 21 | P a g e Multithreading Models Some operating system provide a combined user level thread and Kernel level thread facility. Solaris is a good example of this combined approach. In a combined system, multiple threads within the same application can run in parallel on multiple processors and a blocking system call need not block the entire process. Multithreading models are three types;  Many to Many Model Many user level threads multiplexes to the Kernel thread of smaller or equal numbers. The number of Kernel threads may be specific to either a particular application or a particular machine. Following diagram shows the many to many model. In this model, developers can create as many user threads as necessary and the corresponding Kernel threads can run in parallels on a multiprocessor.  Many to One Model Many to one model maps many user level threads to one Kernel level thread. Thread management is done in user space. When thread makes a blocking
  • 23. 22 | P a g e system call, the entire process will be blocks. Only one thread can access the Kernel at a time,so multiple threads are unable to run in parallel on multiprocessors. If the user level thread libraries are implemented in the operating system in such a way that system does not support them then Kernel threads use the many to one relationship modes.  One to One Model There is one to one relationship of user level thread to the kernel level thread.This model provides more concurrency than the many to one model. It also another thread to run when a thread makes a blocking system call. It support multiple thread to execute in parallel on microprocessors. Disadvantage of this model is that creating user thread requires the corresponding Kernel thread. OS/2, windows NT and windows 2000 use one to one relationship model.
  • 24. 23 | P a g e Difference between User Level & Kernel Level Thread S.N. User Level Threads Kernel Level Thread 1 User level threads are faster to create and manage. Kernel level threads are slower to create and manage. 2 Implementation is by a thread library at the user level. Operating system supports creation of Kernel threads. 3 User level thread is generic and can run on any operating system. Kernel level thread is specific to the operating system. 4 Multi-threaded application cannot take advantage of multiprocessing. Kernel routines themselves can be multithreaded.
  • 25. 24 | P a g e SYMMETRIC MULTIPROCESSING  SMP systems allow any processor to work on any task no matter where the data for that task are located in memory, provided that each task in the system is not in execution on two or more processors at the same time. With proper operating system support, SMP systems can easily move tasks between processors to balance the workload efficiently.  SMP systems are tightly coupled multiprocessor systems with a pool of homogeneous processors running independently, each processor executing different programs and working on different data and with capability of sharing common resources (memory, I/O device, interrupt system and so on) and connected using a system bus or a crossbar.  Uniprocessor and SMP systems require different programming methods to achieve maximum performance. Programs running on SMP systems may experience a performance increase even when they have been written for uniprocessor systems. This is because hardware interrupts that usually suspend program execution while the kernel handles them can execute on an idle processor instead
  • 26. 25 | P a g e Process of Symmetric Multiprocessor
  • 27. 26 | P a g e Microkernel Introduction of Microkernel Early operating system kernels were rather small, partly because computer memory was limited. As the capability of computers grew, the number of devices the kernel had to control also grew. Through the early history of Unix, kernels were generally small, even though those kernels contained device drivers and file system managers. When address spaces increased from 16 to 32 bits, kernel design was no longer cramped by the hardware architecture, and kernels began to grow. The Berkeley Software Distribution (BSD) of Unix began the era of big kernels. In addition to operating a basic system consisting of the CPU, disks and printers, BSD started adding additional file systems, a complete TCP/IP networking system, and a number of "virtual" devices that allowed the existing programs to work invisibly over the network. This growth continued for many years, resulting in kernels with millions of lines of source code. As a result of this growth, kernels were more prone to bugs and became increasingly difficult to maintain. The microkernel was designed to address the increasing growth of kernels and the difficulties that came with them. In theory, the microkernel design allows for easier management of code due to its division into user space services. This also allows for increased security and stability resulting from the reduced amount of code running in kernel mode. For example, if a networking service crashed due to buffer overflow, only the networking service's memory would be corrupted, leaving the rest of the system still functional.
  • 28. 27 | P a g e Descriptions of Microkernel A Microkernel is a highly Spartan modular subsystem composed of OS-neutral abstractions, providing only essential services such as process abstractions, threads, IPC, and memory management primitives. All device drivers, etc., which are normally part of an OS kernel, run on the microkernel as just another user process. • Multiple operating systems can then be layered on top of these abstractions, and are thus viewed assimply another application. • Thisfocus on modularity allowsforscalability,extensibility and portability not found in monolithic operating systems(Unix, Linux, DOS, etc.) Features • the microkernel provides only rudimentary core facilities, different OS personalities(such as BSD Unix, Linux,NT, etc.) can be hosted on the microkernel. • Because ofits highly modular nature,many of the services commonly found in“kernelspace” are found in “userspace”on a microkernelFeatures • Flexibility (can restart modules without rebooting the OS) • Lower fixed memory demand: The L4 (Mach)Microkernel only takes up about 32 Kilobytes of memory. • However, a microkernel + regular OS will probably take up more memory than a simple OS would take up, because of the additional memory required by the microkernel itself • SMP delivery is easier
  • 29. 28 | P a g e The advantages and disadvatages of Microkernel Advantages  Extensible: add a new server to add new OS functionality.  Kernel does not determine operating system environment. • Allows support for multiple OS personalities • Need an emulation server for each system (e.g. Mac,Windows, Unix) • All applications run on same microkernel • Applications can use customized OS (e.g. for databases)  Most hardware agnostic Threads ,IPC, user-level servers don't need to worry abount udelying hardware.  Strong protection Even of the OS againts itself (i.e the part of the OS that are implemented as servers)  Esay extension to multiprocessor and distributed system.  Microkernel are simplicity of the kernel (small)  Flexibility we can have a file server and a database server Disadvantages  Performance System call can require a lot of protection mode changes  Expensive to reimplement everything with a new model.
  • 30. 29 | P a g e OS personalities are easir to port to new hardware after porting to microkernel, but porting to microkernel may be hardder than porting to new hardware.  More overhead  Loss of the system call and context switches E.g Mach, L4, AmigaOS, Minix , K42.
  • 31. 30 | P a g e The diagram of Microkernel
  • 32. 31 | P a g e