example for serial programming

20
Example for serial programming Loader Editor Translator Debugger

Upload: lucy-cabrera

Post on 30-Dec-2015

38 views

Category:

Documents


4 download

DESCRIPTION

Example for serial programming. Loader Editor Translator Debugger. Process Or Task. Multiprogramming Multitasking, Single task os Multi processing Multi user system Multi accessing os Distributed Os. Structure of OS. Kernel – process – create,destroy,suspend - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Example for serial programming

Example for serial programming Loader Editor Translator Debugger

Page 2: Example for serial programming

Process Or Task Multiprogramming Multitasking, Single task os Multi processing Multi user system Multi accessing os Distributed Os

Page 3: Example for serial programming

Structure of OS Kernel – process – create,destroy,suspend Basic I/O – data blocks – read,write

allocate,free. Memory mgt – segments,pages – read ,

write , fetch. File system – Files , devices – create,

destroy, open , close , read ,write. Command language interpreter –

Environment data – statements in command language.

Page 4: Example for serial programming

Types of process Implicit task Explicit task Process relationship Competition – All process compete

with each other for allocation resource needed.

Cooperation – It is exchange data to get the result of explicit tasking.

Page 5: Example for serial programming

Os view of process Process descriptor Process states – scheduled – preempted Process switch – A transition between two

memory resident processes in a multiprogramming is called task switch.

Mode switch Thread Scheduling- refers to a set policies and

mechanisms built into the os that govern the order in which the work to be done by computer system is completed.

Page 6: Example for serial programming

OS services for process mgmt Create (process id ,attributes) Delete (process id) Abort(process id) Fork/join Suspend(process id) Resume(process id) Delay(process id, time)

Page 7: Example for serial programming

performance criteria Processor utilization Throughput Turnaround time Waiting time Response time Swapping

Page 8: Example for serial programming

OS concept System calls Process table Fragmentation – refers to the in ability of the os

to allocate portion of unused memory. Partition Description table – current partition

status and attributes are st in DS. Partition allocation strategy – first fit ,best fit

worst fit , next fit. Internal fragmentation-Holes with in the

segment.

Page 9: Example for serial programming

Memory mgmt External fragmentation(checker boarding)-

Holes between the segment. Coalescing – The process of merging

adjacent holes to form a single larger hole. Compaction or burping the storage or

garbage collection Logical address –The address generated

by cpu or pgm . Physical address – An address seen by the

memory unit commonly referred PA.

Page 10: Example for serial programming

Memory mgmt Virtual memory – is memory mgt

scheme which allows execution of process when only portion of their address spaces are resident in primary memory.

Paging Page frame Segmentation

Page 11: Example for serial programming

Memory mgt Artificial contiguity – The address

contiguous in a process’s virtual address space need not be contiguous in real storage. This is called AC.

Memory map table –The OS keeps track of the status of each page frame by means of a physical memory map that may be structured as a static table.For convenience we refer to this data structure as a memory map table.

Page 12: Example for serial programming

Memory mgt Page map table – In paging system address

translation is performed with aid of a map table called PMT.

Page fragmentation or page breakage – OS allocates memory in terms of an integral number of page frames .If the size of a given process is not a multiple of the page size , the last page frame may be partially unused . This phenomenon is known as PF.

Pre paging – loading the pages before letting processes run is also called pre paging.

Page 13: Example for serial programming

Memory mgt File map table – It is data structure which

contains the secondary address of all pages .It mainly used for load missing pages into main memory.

Working set – The set of pages that a process is currently using is called its WS.

Thrashing – A pgm causing page faults every few instruction is said to be thrashing .

Working set model – Many paging system try to keep track of each process working set and make sure that it is in memory before letting the process run . This approach is called WSM.

Page 14: Example for serial programming

Inter process interaction Inter process synchronization – a set of

protocols and mechanisms used to preserve system integrity and consistency when concurrent processes share resources that are serially reusable.

Inter process signaling – The exchange of timing signals among concurrent process or threads used to coordinate their collective progress.

Page 15: Example for serial programming

Mutual exclusion Inter process communication –

concurrent cooperating processes must communicate for such purpose as exchanging data , reporting progress and accumulating collective results.

Critical section – is a sequence of instruction with clearly marked beginning and end.

Page 16: Example for serial programming

Mutual exclusion Definition: In parallel process a single process

temporarily excludes all others from using a shared recourse in order to ensure the system ‘s integrity.

A semaphore - is a protected variable whose value can be accessed and altered only by the two primitive operations ( wait) P and (signal) V.

Binary semaphore – A semaphore whose variable is allowed to take on only the values of 0 (busy) and 1 (free) is called a BS.

Page 17: Example for serial programming

Mutual exclusion Counting semaphore – The general

semaphore may take any non negative integer value also called CS.

Conditional critical region – allows a process to wait on a condition within a critical section without preventing other eligible processes from accessing the shared resource.

Monitors – are an os structuring mechanism that address this issue in a rigorous and systematic manner.

Page 18: Example for serial programming

Deadlock Definition: A process in a

multiprogramming system said to be in a state of dead lock if it is waiting for a particular event that will never occur.

Necessary condition: Mutual exclusion, Hold and wait condition, No preemption condition, Circular wait condition

Page 19: Example for serial programming

Files Special file: An Os provide an abstraction to

allow users to perform I/O without getting buried in all the details of H/W .The abstraction represents each I/O devices as a special file.

Block SF: are used to model devices that consists of a collection of randomly addressable blocks such as disk.

Character SF: consist of character streams, rather than fixed size randomly addressable block. Ex.Terminal, line printer ,network interface.

Page 20: Example for serial programming

Files File extension

- .bak , .bas , .bin , .ftn , .hlp , .lib , .man , .tex