Understanding Process Creation and Concurrent Execution in Operating Systems, Exams of Abnormal Psychology

An introduction to the concepts of processes, process creation, and concurrent execution in operating systems. It covers the programmer's and operating system's perspectives of a program, process creation steps, process description, and address space allocation. Additionally, it discusses process scheduling sub-models, thread creation, and concurrent and parallel programming languages.

Typology: Exams

2014/2015

Uploaded on 05/09/2015

kalir1
kalir1 🇵🇰

7 documents

1 / 32

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Introduction to Parallel
Processing
Chapter No.3
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20

Partial preview of the text

Download Understanding Process Creation and Concurrent Execution in Operating Systems and more Exams Abnormal Psychology in PDF only on Docsity!

Introduction to Parallel

Processing

Chapter No.

Program

Programmer’s Perspective

an ordered set of instructions

O.S perspective

an executable file stored in secondary

memory, typically on a disk.

Process

From OS view, process relates to

execution

Process creation involves 4 major steps:

setting up the process description

allocating an address space

loading the program into the allocated

address space, and

passing the process description to the

scheduler

Process Description

 O.S describe a process by means of a description

table known as process control block (PCB)

 PCB contains all the information related to to the

whole life cycle of a process like process

identification, owner, process status, description of

the allocated address space and so on.

 Different O.S uses different names for process

description table like process table in UNIX,

Process Information Block in OS/2, and Task control

block in IBM mainframe operating systems.

Loading the Program Into Allocated

Address Space

The executable program file is loaded into

the allocated address space and this is

done using the different memory

management schemes adopted by the

O.S.

Passing the Process Description to

the Scheduler

The created process is passed to

scheduler which allocates the processor to

the competing processes.

This is managed by setting up and

manipulating queues of PCBs.

Process Creation Sub-models

Simpler model used by IBM/PCP,

IBM/360/DOS did not allow process to further

breakdown into sub-processes.

 Process Spawning

 a process may create a new process called a

child process.

Child process can be created by the programmer

by using standard process creation mechanisms.

Spawned processes form a process hierarchy

known as process tree.

Process Spawning

(Independent Processes)

A

B C

D E

Thread

Thread, like a process is a sequence of

instructions.

smaller chunks of code (lightweight)

threads are created within and belong to

process and share the resource of the process.

for parallel thread processing, scheduling is

performed on a per-thread basis

finer-grain, less overhead on switching from

thread to thread.

Thread

Most of the O.S released in the

1980’s and 1990’s are based on

process thread model such as OS/2,

Windows NT or SunOS 5.0.

Threads have similar life cycle to the

processes and are mainly managed

in the same way.

The Concepts of Concurrent

Execution (N-client 1-server)

t

Simultaneous nature

Server

Clients

Clients

Server

t

Sequential nature

Concurrent execution is the temporal behavior of N-client 1

server model where one client is served at any given moment.

The concepts of concurrent

execution (N-client 1-server)

Non pre-emptive

Pre-

emptive

Time-shared

Priotized

Priority Client

Server

t

Server

Client

Preemption rule

Non preemptive

Time shared

preemptive

Prioritized

Concurrent and Parallel

Programming Languages

Sequential languages

languages that do not support N-client model

(C, Pascal, Fortran, PROLOG, LISP)

Concurrent languages

employ constructs to implement the N-client 1

server model by specifying concurrent threads

and processes but lack language constructs to

describe N-server model (Ada, Concurrent

Pascal, Modula-2, concurrent PROLOG).

Concurrent and Parallel

Programming Languages

 Data parallel language

 introduces special data structures that are

processed in parallel, element by element (high

performance Fortran, DAP Fortran, DAP

PROLOG,Connection Machine LISP)

 Parallel languages

 extends the specifications of N-client model of

concurrent languages with processor allocation

language constructs that enable use of N-server

model (Occam-2, 3L Parallel C, Strand-88)