1 / 20

Example for serial programming

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

Download Presentation

Example for serial programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Example for serial programming • Loader • Editor • Translator • Debugger

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

  3. 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.

  4. 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.

  5. 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.

  6. 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)

  7. performance criteria • Processor utilization • Throughput • Turnaround time • Waiting time • Response time • Swapping

  8. 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.

  9. 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.

  10. 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

  11. 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.

  12. 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.

  13. 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.

  14. 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.

  15. 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.

  16. 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.

  17. 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.

  18. 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

  19. 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.

  20. Files • File extension - .bak , .bas , .bin , .ftn , • .hlp , .lib , .man , .tex

More Related