meljun cortes manual operating system csci10

Upload: meljun-cortes-mbampa

Post on 04-Jun-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    1/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTES

    Course Title: PRINCIPLES OF OPERATING SYSTEMS

    Course Description:The course examines process synchronization;input/output, buffering, file systems; processor and

    memory management; virtual memory; job scheduling;resource allocation; systems modeling; performancemeasurement and evaluation.

    Course Objecties: At the end of the term, the students should be able to:

    . !efine an operating system and describe its general functions;". !etermine the types of operating systems;#. $nderstand the different types of memory partitioning techni%ues;&. !escribe the functions and the types of processor scheduling;'. !iscuss the functions of device and information management.

    Course Outline. (asic )perating *ystem. !efinition of an )*.. +unction of an )*.." easure of -ffectiveness..# Types of )*..#. *ize of the $nderlying ardare..#." 0onfiguration..#.# 1evel of 2esource *haring..#.& Type of 3nteraction 4ermitted

    ." istorical 4erspective.". -volution of )*.".. *ingle 5ob *tream.".." ultiprogramming."..#Time *haring."..& 6irtual emory."..' 4ersonal 0omputer )*."..7 8etor9s.".. 0lient *erver."." -arly *ystem.".# *et $p Time / Automatic 5*.".& 4erformance of 04$ $tilization

    Prepared by: ELJUN P. CORTESCCS Faculty

    1

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    2/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTES

    $3< 8).

    .# *tructure of )*.#. onolithic *tructure.#." The =ernel Approach

    .#.# )bject>)riented *tructure.#.& 0lient *erver odel.& ardare Types.&. 1imitation of ? 2esources.&." The +ront -nd: 3nput / )utput.&.# 3nterfaces, 0ontrol $nits and 0hannels

    $3< 8). "42-1338A2@ -A38AT3)8

    ". *oftare". *oftare Types

    ".. *? and !ata: 1ogical vs. 4hysical".." The *ource !ata"..# !ata anagement"..& +ile )rganization"..&. *e%uential +ile"..&." !irect Access +ile"..#.& 3ndexed>*e%uential +ile"..' 0ategories of *?"..'. Application *? 4ac9age"..'." &th B1Cs"..'.# uery 1anguage"..'.& 2eport Beneration

    "..'.' Application Beneration"..'.7 !ecision *upport *ystem

    $3< 8). #

    #. *torage anagement#. *torage ierarchy#." *torage anagement *trategies#.# *imple emory anagement#.& *trategies#.& 6irtual emory#.&. 4aging

    #.&." *egmentation#.&.# 4age 2eplacement#.&.#. +3+) 2eplacement#.&.#." 12$ 4age 2eplacement

    Prepared by: ELJUN P. CORTESCCS Faculty

    2

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    3/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTES

    $3< 8). &3!T-2 -A38AT3)8

    &. 4rocessor anagement

    &. 4rocess *tate and *tate Transition&." The )* =ernel&.# (asic )peration on 4rocess and 2esources&.#. 4rocess 0ontrol&.#." 2esource 4rimitive&.& 3nterprocess 0ommunication&.&. utual -xclusion / (usy ?aiting&.&." *leep and ?a9e>up&.&.# 2emaphores&.&.& -vent 0ounter&.&.' essage 4assing&.' *cheduling ethods

    &.'. Time (ased *cheduling Algorithm&.'.. +3+) *cheduling&.'.." 1ast 3n / 1ast )ut&.'..# *hortest 5ob 8ext&.'..& *2T+ *cheduling&.'..' ulti>1evel +eedbac9'. !evice anagement'. !evice 0haracteristic, ardare 0onsideration'." 4rinciples of 3/) *oftare'.". Boals / the 3/) *?'."." nterrupt andlers'.".# !evice andlers

    '.".& !evice 3ndependent 3/) *?'.".' $ser *pace 3/) *?'.# 3/) Traffic 0ontroller, 3/) *chedules, 3/) andlers'.& !eadloc9s'.&. 2esources'.&." !eadloc9 odeling'.&.# The )strich Algorithm'.&.& !etection of 2ecovery'.&.' !eadloc9 4revention'.&.7 !eadloc9 Avoidance

    Prepared by: ELJUN P. CORTESCCS Faculty

    3

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    4/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTES

    $3< 8). '

    7. The +ile *ystem and its +unction7. A ierarchical odel of the +ile 7." and 3/) *ystem

    7.# +ile *ystem !esign7.#. !is9 *pace anagement7.#." +ile *torage7.#.# !irectory *tructure7.#.& *hared +iles7.#.' +ile *ystems 2eliability7.& 4hysical )rganization ethods7.&. 1ogical +ile )rganization7.&." 4hysical +ile )rganization7.&.# anagement of Auxiliary *torage *pace7.' +ile *ervers

    . )* +acilities. 4rocessor." emory anagement.# +ile *ystems.& 3nput / )utput.' )ther +acilities.'. $ser Activity.'." 1ogging.7 $ser 3nterface. $tility *?

    $3< 8). 7

    +38A1 -A38AT3)8

    PRELIM PERIOD

    !"#t is Oper#tin$ S%ste&'

    Operating System it is a program that acts as an intermediary beteenthe user of computer and the computer hardare.

    Operating System is a set of softare routines that sits beteen theapplication program and hardare.

    Droutines: perform 9ey support functions such as. communicating ith peripheral devices". accepting and carrying out user commands

    a. load a programb. copy a filec. create a directory

    Prepared by: ELJUN P. CORTESCCS Faculty

    4

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    5/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTESOperating Systemacts li9e an interface beteen the user and computer

    hardare.

    FO(R COMPONENTS OF COMP(TER SYSTEM. HardwareE provides the basic computing resources

    F04$, emory, 3/) !evicesG". Application ProgramE define the ays in hich these resources are used tosolve the computing problems of the users.

    Fcompilers, database system, games H businessprog.G#. UsersE the one ho solve problems in many different application programs. Fpeople and machinesG

    &. Operating SystemE control coordinates the use of hardare among the6arious application programs for various users.

    > provides environment ith other programs to do useful

    or9.

    - allocates resources re%uested by specific programsusers to operate computer system fairly and efficiently.

    -P(RPOSE OF OPERATING SYSTEM

    To provide environment in hich a user can execute program.GOAL OF OPERATING SYSTEM. To ma9e computer system convenient to use". To use the computer hardare efficient to use.F(NCTIONS OF OPERATING SYSTEM

    . As a *ervice 4rovider". As a 2esource anager

    O.S,as a Service Provider. 2esource anager

    D 4rogram executionThe operating system is responsible for the folloing activities in

    connection ith process management:

    the creation and deletion of both user and system processes

    the suspension and resumption of processes

    The provision of mechanisms for processes synchronization

    The provision of mechanisms for process communication The provision of mechanisms for deadloc9 handling". 3/) anager

    D involve a file and 3/) devices

    Prepared by: ELJUN P. CORTESCCS Faculty

    5

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    6/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTES

    #. +ile anagera. anipulation of !atab. -xecution of !ata

    c. 2ecovery H Archiving&. 4rotection H *ecurityDprotectioninvolves ensuring that all access to system resources is

    controlled,security eventually a passord hich every user having to authenticate himself to the system.'. Accounting

    D to 9eep trac9 the resources and hat 9ind of computer resources.7. -rror !etection H andling

    Doperating system needs constantly be aare of possible errors.

    O.S. as a Resource Manager

    . =eeps trac9 the status of its resources". -nforce a schedule among programs re%uesting resources#. Allocate H !e>allocate resources

    )ISTORY OF OPERATING SYSTEM*t"Gener#tionE 8o ).* at all, machines is controlled hard>ired

    F4unch>cardG.- 8o existence of ).* only encoding

    DEnco+in$E programming techni%ues that binary bit is presented through voltages.

    ,stGener#tionE !uring I'JKs, simple operating system ere developed thatalloed programs to be submitted in se%uence and stored.

    > Batch Processing / Batch Oriented Processing.

    -n+Gener#tionE !uring I7JKs ulti>using as developed DMulti.usin$:

    . To store several programs in memory simultaneously". *hare computer resources

    /r+Gener#tionE id I7J, Multiprocessing, Multiprogramming, ime!Sharing, Real!time processing " #irtual memoryere introduced.

    D0irtu#l Me&or%E the ability of )* to expand the memory of computer sys.

    1t"Gener#tionE the period of $etwor%ing System " &istri'uted O.Sthat provide netor9ing H communication function.

    > Open systemere introduced> 3nteroperability H other netor9 standard

    Prepared by: ELJUN P. CORTESCCS Faculty

    6

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    7/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTES> assive memory as develop FexpansionG

    2t"Gener#tionE Multimode system FILJKsG- 4rovide higher resolution- *peech synthesizers H 2ecognition

    - 0omputer 6ision- Allo intelligent machines H )pen *ystem

    DMulti&o+e S%ste&E connotes multi>processing H multiprogramming DOpen S%ste&

    . 4ortability E a system that can be applied in any 9ind of0omputer environment

    ". Availability E source>code licenses in short notice#. *calability E the code can be transferable and resizable&. 3nteroperability E a system that allo sharing of files and

    applications.

    TYPES OF OPERATING SYSTEMS. *ingle 4rogrammed )* / *ingle 5ob *tream

    - allos execution of program one at a time.- )ne program active

    ". (atched )*- alloed automatic job se%uencing by a resident operating system and improved the overall utilization of the computer.- the common input devices ere card readers H tape drivers.- The common output devices ere line printers H card

    punches.

    - 0onsole: a terminal that consists of sitches#. ulti>programmed )*- jobs are 9ept in memory at one time- having several programs running concurrently in the

    computer.&. Time>sharing/ulti>tas9ing/ulti>using

    - logical extension of multi>programming.- Time shared )*: allos many users to share the computer

    simultaneously. $ses 04$ scheduling.- aving several users running in the computer system.

    '. 2eal>time )*- Type of )* that is designed for a particular tas9 through the

    use of sensors.- *ensors brings data to the computer.- 2eal system is defined, fixed and time constraint.

    Prepared by: ELJUN P. CORTESCCS Faculty

    7

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    8/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTES

    - FLA0ORS OF REAL TIME SYSTEM:. ard real>time system E guarantees that critical tas9 is completed on

    time.

    ". *oft real>time system E a critical real>time tas9 get s priority over othertas9, and retains that priority until it completes.

    APPLICATION OF REAL.TIME SYSTEM. *atellite 0ommunication". 2obotics#. ome Appliances 0ontrollers&. 8uclear eapon system'. *cientific -xperiment *ystem

    7. 3ndustrial 0ontrol *ystem. Automatic>+uel>-ngine>3njection *ystemL. 3maging/>rays

    7. !istributed )* / 8etor9 )*- 8etor9 )perating *ystem is an )* that provide features

    such as file sharing F?38 8TG across the netor9, thatincludes a communication scheme that allos differentprocesses on different computers to exchange messages.

    - !istributed )* is a less autonomous environment.

    CRITERIA TO MEAS(RE T)E EFFECTI0ENESS OF T)E COMP3SYS. Throughput > the amount of or9 going on a computer system >measure of or9 is the number of processes that are

    completed per unit time.". Turnaround Time E is the sum of the periods spent aiting to get into memory aiting in the ready %ueue, executing on the

    04$,and doing 3/).> elapsed time from the job submission up to job completion.

    #. ?aiting Time > is the sum of the periods spent aiting in the ready %ueue.&. 2esponse Time > the amount of time it ta9es to start responding, but not the

    the time that it ta9es to output that response.'. Availability > the measures of system accessibility7. 0ost. -ase of $seL. 2eliabilityI. *ecurity

    Prepared by: ELJUN P. CORTESCCS Faculty

    8

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    9/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTES

    4(I5 6,

    . 3t control and coordinates the use of hardare among the various

    application program for various users.". 3t provides manipulation of data, execution, archiving and recovery.#. 3t is the ability of )perating *ystem to expand the memory of computer

    system.&. A system that can be applied in any 9ing of computer environment.'. Allos execution of programmed one at a time.7. 3t provides higher resolution and speech recognition.. Buarantees that the critical tas9 is complete on time.L. +ixed and Time constraint.I. A type of )perating *ystem having several programs running concurrently

    in the computer.

    J.A terminal that composed of sitches

    CP( (TILI5ATION3t determines ho e77icientand reli#blea computer system. To determine

    the efficiency of the 04$, it must be e%ual to 'JM, the card reader must be e%ualto "'M and line printer must be e%ual to "'M . 3f the result of the computation illnot meet the re%uired percentage then, it is less efficient and reliable.

    FORMULAS:

    CR Ti&e N card here: 02 speed 02 *peed N O of cards

    TimeLP Ti&e N line 14 *peed N O of lines

    14 speed Time

    CP( Ti&e N number of instruction D 04$ speedTOTAL Ti&eN 04$ Time P 02 Time P 14 Time

    o get the e((iciency used the (ollowing (ormula:

    8 E77icienc% o7 C#r+ Re#+er N F02 Time / Total TimeG D JJ8 E77icienc% o7 Line Printer N F14 Time / Total TimeG D JJ8 E77icienc% o7 CP( N F04$ Time / Total TimeG D JJ

    QQQQQQQQQQQQQQQQQQQQQQQ ,** 8

    Prepared by: ELJUN P. CORTESCCS Faculty

    9

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    10/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTES

    -xample:

    Biven the folloing characteristics:. M -ff. )f 02 N &L.LM TT N J.& sec 04$ Time N J ms 8o. of instructions N J,JJJ

    Re9uire+:a. 04$ speed in Rs c. M-ff.of 14 e. M-ff. )f TTb. 02 Time d. M -ff. )f 04$

    ". M -ff. )f 04$ N I.L'M TT N .JJ'"' hr 14 *peed N #J lines / min

    Re9uire+:a. 14 Time d. M-ff. )f 14b. 04$ Time e. M-ff.of 02c. 02 Time

    SOL(TIONS TO PROLEM GI0EN AO0E:

    . A. 04$ speed N no. of instruction 04$ Time

    04$ speed N J,JJJ instruction J ms

    N J,JJJ instructionJms D x J>#

    msN J,JJJ instruction J,JJJ secondsN instruction/sec Fconvert in RsGN Rs

    (. 02 Time N Total Time D M-ff.of 02 JJ

    N .& D &L.L JJ

    02 Time N .II sec or ."sec

    Prepared by: ELJUN P. CORTESCCS Faculty

    10

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    11/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTES0. M-ff. )f 14 N ."sec / .&sec D JJ

    N &L.LM

    !. M-ff. )f 04$ N JJM > &L.LM P &L.LM

    N JJM > I.'7M

    N ".'&M

    -. M-ff. )f TT N JJM

    ".A. 14 speed N #J lines D min

    in 7J secN / .'N " sec

    14 Time N " seconds

    (. 04$ Time N FI.L' D '.&LGJJ

    N .JI sec

    M-ff. )f 04$ NF.JI sec / '.&L secG D JJ

    N I.L'M

    0. 02 Time N F'.&L D .7"GJJ

    N ".#I sec

    N ".& sec

    !. M-ff.of 14 N F" sec / '.&LG D JJ

    N #7.&IM

    -. M-ff. )f 04$ N F.JI sec / '.&L G L JJ N I.LIM

    M-ff. )f TT N I.LIM P #7.&IM P M02T M-ff. )f 02 N JJ E I.LI E #7.#I

    N .7"M

    E;ercise:

    Prepared by: ELJUN P. CORTESCCS Faculty

    11

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    12/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTESAssuming that the computer system has the folloing characteristics:

    TT N & sec

    02 speed N JJ c/ min

    3f 04$ ta9es "JJms to assemble 'JJ instructions, determine the folloing.

    a. M -fficiency of 04$

    b. M -fficiency of 02

    4(I5 6-

    Assuming the computer system has the folloing set>up.

    TT N "JJJ ms04$ N I"Rs/ instruction

    3f there are IJJ instructions, determine the folloing:a. M -ff. )f 04$ c. 02 Timeb. M -ff. )f 14 d. 14 Time

    PRELIM EXAMIA!IO

    MIDTERM PERIOD

    )ARD!ARE. any physical device that are used to build/run a computer for youto able to solve a computing problems.

    T@4-* )+ A2!?A2-

    . 3nput

    ". )utput

    SOFT!ARE . is a general form for the various 9inds of programs used tooperate computers and related devices.

    Prepared by: ELJUN P. CORTESCCS Faculty

    12

    CR34% Eff

    CPULP

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    13/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTESTYPES OF SOFT!AREApplic#tions so7ttop>publishing, database andgraphics. They are called general purpose because they can be customized in avariety of ays to perform extremely specialized tas9s. A database can be usedto create an application li9e a personnel or stoc9 control system.

    S%ste&s so7tday tas9s in maintaining a computersystem and its data files. *ome common utilities are screensaver, virus chec9er,and system tools li9e dis9 defragmenter. 0ertain utility programs are usuallybundled along ith the operating system and are thought of as a type of systemssoftare. ?indos comes ith a variety of screen savers, and various utilitiesincluding !rive*pace that displays the percentage of drive space used andunused.

    File > # uni7or& lo$ic#l o7 +#t#?in7ortion is one o7 t"e &ost isible serice #n+ 7e#ture o7 oper#tin$s%ste&3

    File Or$#ni@#tion Tec"ni9ues

    . *e%uential N records in this 9ind of techni%ue may only be retrievedse%uentially.

    ". !irect/2elative N random access of record/file by means of 9ey field

    #. 3ndexed N includes a table that relates 9ey values to storage location of thecorresponding file.

    &. ultiple =ey N it allos access to the data/file by fields other than theprimary 9ey.

    T%pes o7 File:aster 2eportTransaction Text4rogram *ecurity?or9 Audit

    Prepared by: ELJUN P. CORTESCCS Faculty

    13

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    14/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTESFile Oper#tions a file can be accessed by a program that executes in batchmode or by a program that executes interactively.

    4(I5 6/3. !efinition of terms FJ ptsG

    . *oftare". ardare#. +ile&. +ile *ystem'. ultiple =ey

    33. -numeration FJ ptsG>&. +ile )rganization techni%ue

    '>L. Types of *oftareI>J. +ile )perations

    MEMORY MANAGEMENT is one of the concerns of operating system since it isthe main memory that the 04$ directly accesses for instructions and data.

    MAIN > MEMORY is central to the operation of a modern computer system.Main Memoryis a large array of ords or bytes, ranging in size from hundreds ofthousands to hundreds of millions. -ach ord or byte has its on address. ainemory is a repository of %uic9ly accessible data shared by the 04$ and 3/)devices. The operating system is responsible for the folloing activities in

    connection ith memory management. =eep trac9 of hich parts of memory are currently being used and by

    hom

    !ecide hich processes are to be loaded into memory hen memoryspace becomes available

    Allocate and deallocate memory space as needed

    The &e&or%is usually divided into to partitions, one for the resident operatingsystem, and one for the user processes. There are to types of memoryallocation techni%ues. +irst,The Sin$le Conti$uous Alloc#tion, *econdly, the P#rtitione+ #lloc#tion

    &et"o+.Sin$le conti$uous #lloc#tionre%uires no special hardare and usually

    associated ith small stand Ealone co&puters

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    15/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTES

    PARTITIONED ALLOCATIONmain memory partitioned into separate memoryportions and such portion of the memory holds a separate job address space.

    Tfit and orst fit are the most common strategies used to select a freehole from the set of available holes.

    First.7it:Allocate the first hole that is big enough. *earching canstart either at the beginning of the set of holes or here theprevious first>fit search ended. ?e can stop searching as soon ase find a free hole that is large enough.

    est.7it:Allocate the smallest hole that is big enough. ?e mustsearch the entire list, unless the list is 9ept ordered by size. This

    strategy produces the smallest leftover hole. !orst 7it: Allocate the largest hole. Again, e must search the

    entire list, unless it is sorted by size. This strategy produces thelargest leftover hole, hich may be more useful than the smallerleftover hole from a best>fit approach.

    These algorithms suffer from external fragmentation. As process areloaded and removed from memory, the free memory space is bro9en into littlepieces. E;tern#l 7r#$&ent#tion exists hen enough total memory space existsto satisfy a re%uest, but it is not contiguous; storage is fragmented unto a largenumber of small holes. Another problem arises ith multiple partition allocationscheme is the internal fragmentation. Intern#l 7r#$&ent#tionB internal to a

    partition but it is not being used.)ne solution to the problem of external fragmentation is co&p#ction3 The

    goal is to shuffle the memory contents to place all free memory together in onelarge bloc9. The simplest compaction algorithm is simply to move all processestoard one end of memory; all holes move in the other direction, producing onelarge hole of available memory.

    Prepared by: ELJUN P. CORTESCCS Faculty

    15

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    16/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTES

    E;#&ple: 0omplete the process table belo:

    Total emory 0apacity N 'JJ2esidence )* N "IJ

    Process C#p#cit% Me&or% (se+ !#ste+ #se+ A++ressA 'J #L " "IJ( &' #J ' #&J0 7' &' "J #L'

    ! "JJ J #J &'J- ""J 7J 7J 7'J

    Ans

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    17/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTESThe

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    18/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTES

    "JJJ

    "J&L

    T#s= 3J

    &JJ

    IJJ

    7JJ

    "JJJ

    "J&L

    T#s= C3J

    &JJ

    IJJ

    #J

    7JJ

    "JJJ

    "J&L

    The sets of instruction or tas9s to be done are the instructions to beperformed by the operating system in managing the memory hat job is to beallocated or deallocated. !eallocated jobs are that are already finished orterminated by the user or those jobs that are deleted in the memory.

    Prepared by: ELJUN P. CORTESCCS Faculty

    18

    OS

    P1 (500 KB)

    +ree ,pae '700 ()*

    P3 (400 KB)

    +ree ,pae '48 ()*

    OS

    P1 (500 KB)

    P4 (410 KB)

    +ree ,pae '290 ()*

    P3 (400 KB)

    +ree ,pae '48 ()*

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    19/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTES3n dynamic 4artition allocation, the main memory suffers external

    fragments. -xternal +ragments occur hen the memory is not contiguous suchthat even if the memory space available is lesser than the job to be allocated, itmay not be possible to load such process.

    )ne solution of external fragmentation is 9non as compaction. The goal is toshuffle the memory contents to place all free memory together in one large bloc9.0ompaction method, 0ompressing all jobs upard hile all the spaces ill becombined at the loer part of the memory.

    COMPACTIONJ

    &JJ

    IJJ

    #J

    J

    "J&L

    S!APPINGA process needs to be in memory to be executed. A process, hoever,

    can be s$apped temporarily out pf memory to a 'ac%ing store, and then broughtbac9 into memory for continued execution. 3deally, the memory manager cansap processes fast enough that there are alays processes in memory, readyto execute, hen the 04$ scheduler ants to reschedule the 04$. The %uantummust also be sufficiently large that reasonable amounts of computing are donebeteen saps

    A variant of this sapping policy used for priority based schedulingalgorithms. 3f a higher priority process arrives and ants service, the memorymanager can sap out the loer>priority process so that it can load and execute

    the higher priority process. ?hen the higher priority process finishes, the loerpriority process can be sapped bac9 in and continued. This variant of sappingis sometimes called ro"" o%t, ro"" in.

    *apping re%uires a &ac'ing store. The bac9ing store is commonly afast dis9. 3t must be large enough to accommodate copies of all memory imagesfor all users, and must provide direct access to these memory images. The

    Prepared by: ELJUN P. CORTESCCS Faculty

    19

    OS

    P1 (500 KB)

    P4 (410 KB)

    P3 (400 KB)

    +ree ,pae '338 ()*

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    20/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTESsystem maintains a ready %ueue consisting of all processes hose memoryimages are on the bac9ing store or in memory and are ready to run.

    Illustr#tion:

    MAI MEMOR( )A*+I S!ORE

    P,

    P-

    Per7ornce:

    Time for each interaction N sap>in time P sap>out time P 04$ time

    N " D sap time P 04$ time

    E77icienc%:

    M-fficiency of sapping N F04$ time / time for each interactionG D JJ

    PAGING3t is a scheme that possibly solves the external fragmentation that permits

    the logical address space of a process to be noncontiguous.ASIC MET)OD

    4hysical memory is bro9en into fixed>sized bloc9s called #rames. 1ogicalmemory is also bro9en into bloc9s of the same size called pages. ?hen aprocess is to be executed, its pages are loaded into any available memoryframes from the bac9ing store.

    The b#c=in$ storeis divided into fixed>sized bloc9s that are of the samesize as the memory frames.

    -very address generated by the 04$ is divided into to parts: a page

    number FpG and a page offset FdG. Thepage num'er is used as an inde+ into apage ta'le. Thepage ta'le contains the 'ase address o( each page in physicalmemory. The base address is combined ith the page o((set to de(ine the

    physical address that is sent to the memory unit. The hardare registers definethe page size Fli9e the frame sizeG.

    Prepared by: ELJUN P. CORTESCCS Faculty

    20

    OS MEMORY

    USER

    PROCESSES

    CORE

    IMAGES

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    21/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTES

    Illustr#tion:

    4hysical Address

    STR(CT(RE OF T)E PAGE TALE

    -ach )perating system has its on methods for storing page tables. Thehardare implementation of the page table can be done in a number of differentays. The simplest case, the page table is implemented as a set of dedicatedregisters. These registers should be built ith very high speed logic to ma9e thepaging address translation efficient.

    T"e p#$e t#ble is =ept in in &e&or% #n+ # p#$e t#ble b#sere$ister PTR points to t"e p#$e t#ble. The 4T(2 provides the framenumber FG hich is combined ith the page offset to produce the actualaddress.

    3n the user point of vie of memory, physical address can be mappedusing the formula.

    ADDRESS N Fframe number D size of the pageG P offset number

    FRAME N(MER N Address E offset number

    *ize of page

    Prepared by: ELJUN P. CORTESCCS Faculty

    21

    CPU p d

    f

    f d

    Physa$

    .e/!ry

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    22/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTES

    E;#&ple:TOTAL MEMORY CAPACITY -*

    Prepared by: ELJUN P. CORTESCCS Faculty

    J"#

    &'7LI

    J"#&'

    7LI

    "J

    22

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    23/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTES1ogical

    emory )ffset

    J

    " 4J#J

    " 4#J

    " 4"#

    Prepared by: ELJUN P. CORTESCCS Faculty

    4'

    474

    4L

    4I

    4J4

    4"

    4

    4"4#

    4&

    4

    4"

    4#4&

    4'

    47

    44L

    4I

    4J

    44"

    23

    0

    12

    4

    02

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    24/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTESE;ercises:

    . Total capacity of memory N ' 9b4age number N J, , "+rame number N #, J, J

    0ontent of page J N p, p", p#, p&0ontent of page N p', p7, p, pL0ontent of page " N pI, pJ, p, p"

    2e%uired:a. addressb. page table

    ". Total capacity of memory N "J 9b4age number N J, , "+rame number N #,",0ontent of page J N p,p",p#,p&,p'0ontent of page N p7,p,pL,pI,pJ0ontent of page " N p,p",p#,p&,p'

    2e%uired:a. addressb. page tablec.

    Se#t

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    25/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTESPAGE REPLACEMENT

    3n generating the frame number, the 4T(2 uses an algorithm. +ramenumbers came from generated reference string.

    P#$e repl#ce&entis needed to determine the number page fault,page fault rate and default pages. P#$e 7#ultsare frame numbers that are

    currently used hile the +e7#ult p#$esare pages that occur hen there is anexisting page used as a frame number.Al$orit"&:

    . +0+*/+3+) E +irst come first serve/ first in first out basis". )ptimal E a reference string that ill needed for longer

    time ill be replaced#. 12$ or 1east 2ecently $sed E a reference string ill be

    replaced that is recently used by the frame.

    Gien t"e re7erence strin$: " # ' " # "

    +0+*

    " # ' " # "

    " " " ' ' ' # # # " " #)4T3A1

    " # ' " # "

    " " " "# # #

    '12$

    " # ' " # "

    " " " "# # #

    Prepared by: ELJUN P. CORTESCCS Faculty

    25

    4age fault rateN7/DJJN L'.M4age +ault N 7!efault N

    4age fault rateNF&/GDJJN'.&M4age +ault N &!efault N #

    4age fault rateNF&/GDJJN'.&M4age +ault N &!efault N #

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    26/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTES '

    4(I5 61$sing +0+*, )4T3A1 and 12$ algorithm determine the job

    se%uence of the given reference string: " # & ' 7 L I ' #

    MI-!ERM EXAMIA!IO

    FINAL PERIOD

    PROCCES MANAGEMENTallos time sharing of 04$ in allocating differentprocesses to the processor.

    PROCESSThe designer of ultics system as the first ho introduced the ordor term Sprocess in the mid 7JKs. *ince that time, process used somehatinterchangeably ith tas9 or job, has been given a lot of definitions. *ome ofthese are:

    A program in execution.

    An asynchronous activity

    The Sanimated spirit of a procedure in execution.

    The Slocus of control of a procedure in execution.

    That hich is manifested by the existence of a Sprocess controlbloc9 in the operating system.

    That entity to hich processors are assigned.

    The Sdispatch able unit.A processis more than a program code Fsometimes 9non as text sectionG. 3talso includes the current activity, as represented by the value of the programcounter and the contents of the processorKs registers. A process generallyincludes the process stac9, containing temporary data such as subroutines,parameters, return address, and temporary variables and data section containingglobal variables.

    Prepared by: ELJUN P. CORTESCCS Faculty

    26

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    27/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTESA resource of 4rocess includes 04$ Time, memory, files, and 3/) devices

    to complete the tas9. These resources are either given to the process hen it iscreated, or allocated to it hile it is running.

    PCis a data structure, hich contains important information about certain

    process. 3t is also called a tas9 control bloc9. he in(ormation or content o(PB are process state, program counter, PU Registers, PU Schedulingin(ormation, Memory!management -n(ormation, Accounting -n(ormation and -/Oin(ormation.

    ILL(STRATION o7 PC

    Process St#te3 The state may be ne, ready, running, and aiting,halted and so on.

    Pro$r#& Counter3Thecounter indicates the address of the nextinstruction to be executed for this process.

    CP( Re$isters3The registers vary in number and type, dependingon the computer architecture. They include accumulators, indexregisters, stac9 pointers, and general>purpose registers, plus anycondition>code information. Along ith the program counter, this

    Prepared by: ELJUN P. CORTESCCS Faculty

    27

    P!"ter Pr!ess

    ,tate

    Pr!ess "#/ber

    Pr!ra/ C!#"ter

    Resters

    .e/!ry $/ts

    Lst !f pe" +$es

    :

    :

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    28/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTESstate information must be saved hen an interrupt occurs, to allothe process to be continued correctly afterard.

    CP( Sc"e+ulin$ In7ortion. This information includes a processpriority, pointers to scheduling %ueues, and any other schedulingparameters.

    Me&or%.M#n#$e&ent in7ortion. This information may includesuch information as the value of the base and limit registers, thepage tables or the segment tables depending on the memorysystem used by the operating system.

    Accountin$ in7ortion. This information includes the amount of04$ and real time used, time limits, account numbers, job orprocess numbers and so on.

    I?O st#tus in7ortion. The information includes the list of 3/)devices Fsuch as tape drivesG allocated to this process, a list ofopen files, and so on.

    PROCESS TRANSITION DIAGRAM

    A process goes through a series of discrete process states. 6ariousevents can cause a process to change states.

    Sub&it st#te, a state here a process is being submitted to the system,and the system ill respond to the re%uest.

    -ventually, hen a job is submitted to the system or 04$, acorresponding process is created and normally inserted at the bac9 of the readylist. The assignment of the 04$ to the first process on the ready list is calleddispatching,and is performed by a system hardare called dispatcher.

    Prepared by: ELJUN P. CORTESCCS Faculty

    28

    R#"

    C!/p$et

    e

    ,#b/t !$d Ready

    &at

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    29/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTES)ol+ st#te, a state here a process is being transformed into a machine

    readable form.Re#+% st#tea state here a process submitted is ready for execution, but

    there are more processes running than the processor available.To prevent any process from monopolizing the system, the operating

    system sets a hardare interrupting cloc9 or interval timer FidleG to alloparticular user to run for a specific time interval called 0uantum time. Theinterrupting cloc9 generates an interrupt, causing the operating system to regaincontrol. The operating system then ma9es the previously running process ready,and ma9es the first process on the ready list running.

    A runnin$ st#tea currently procedure of processing ta9es place erefrom the ready list provided that the english li9e language used by a specificusers the operating system handles the operation to transformed the english li9elanguage into a machine readable form. After a thorough procedure oftransformation of language and hen it is successfully done it is immediatelyscheduled to the processor for processing.

    A process is said to be running if it is currently has the 04$. A process issaid to be ready if it is used a 04$ if one ere available. A process is said to bebloc9ed if it is aiting for some event to happen before it can proceed.

    A

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    30/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTESpurposes, processes from these %ueues in some fashion. The selection processis carried out by the appropriate scheduler.

    . O SC)ED(LERalso 9non as 1ong Term *cheduler. 3t ill select jobsbeing submitted to the system and ill put all the jobs selected in thephysical memory of the system.

    There are several criteria for job selection:a. capacity of the jobb. priority of processc. expected runtimed. amount of input and outpute. special resources re%uired

    ". CP( SC)ED(LER or also 9non as *hort Term *cheduler. Thisscheduler ill select process in the memory and put it on time of the%ueue.

    There are types of %ueue.a. Ready %e%eill hold processes that are ready to be dispatchedor ready for execution. The process that resides in main memoryand are ready and aiting to execute are 9ept on a list are calledready %ueue.

    b. -evice %e%eill hold processes that are listed for a particularinput output deices.

    3n 04$ scheduler, there are different algorithms used for handling

    processes, hich are categorized into to:". 8on !eterministic *cheduling Algorithms#. !eterministic *cheduling Algorithms

    Deter&inistic Sc"e+ulin$ Al$orit"&sis an algorithm herein allcharacteristics of a process are 9non in advance or before execution. Thesecharacteristics are:

    a. execution time FtiGb. priority time FiGc. deadline time FdiGd. finishing time

    T"ere #re t"ree #l$orit"&s un+er t"is cl#ss3. Minim%m Mean Response !ime F2TG all processes are arranged

    according to increasing execution time. -xecution time is denoted as ti. 3ncase of the same execution time, first come first serve is supplied.

    ". Minim%m /eig0ted Response !ime F?2TG all processes arearranged according to increasing execution time divided by the priority.4riority is denoted as i.

    Prepared by: ELJUN P. CORTESCCS Faculty

    30

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    31/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTES#. Ma1im%m2Minim%m LatenessF1G all processes are arranged

    according to increasing deadlines. !eadline time is denoted as di. 3n caseof the same deadlines, the process having the loer or smallest executiontime ill be loaded first.

    E;#&ple:0onsidering the folloing execution time, deadline and priority time.*chedule the given process and arranged them according to 2T, ?2T and1 algorithm.

    PROCESS E;ecution Ti&e Priorit% Ti&e De#+line Ti&e

    4 J ms " "

    4" 'ms 7

    4# ' ms # 7

    *)1$T3)8:

    2T ti

    ' ms J ms ' ms?2T ti / i

    4 J / " N '4" ' / ' N 4# ' / # N '

    ms ' ms ' ms1 di

    7 ms " ms 7 ms

    Prepared by: ELJUN P. CORTESCCS Faculty

    31

    CPU P2 P1 P3

    CPU P2 P1 P3

    CPU P2 P1 P3

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    32/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTES

    E;ercise:

    *chedule the folloing jobs using 2T, ?2T and 1 here:A N ', (N # 0 N ".

    Se#t

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    33/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTESurst ti&e is the time here the processor detects the existence of a particularprocess before execution.

    There are four scheduling algorithms in non>deterministic schedulingalgorithms.

    . First Co&e First Sere*cheduling Algorithm F+0+*G the first process

    that arrives first ill be the process to be loaded in the processor.+0+* is nonpreemptive. )nce the 04$ has been allocated to aprocess, that process 9eeps the 04$ until it releases the 04$, eitherby terminating or by re%uesting 3/). The problem of this algorithmencountered is all processes suffer convoy effect. This effect results inloer 04$ and device utilization than might be possible if the shorterprocesses ere alloed to go first.

    ". S"ortest ob First*cheduling Algorithm F*5+G the process ith asmallest the processes burst time ill be loaded first. This algorithmassociates ith each process the length of the latterKs next 04$ burst.$sing this algorithm, the processes are suffering starvation effect.

    #. Priorit% *cheduling Algorithm. A process ith a higher priority ill beloaded into the processor. 4riority scheduling can be either preemptiveor non preemptive. ?hen a process arrives at the ready %ueue, itspriority is compared ith the priority of the currently running process. A

    preempti)e priority scheduling algorithmill preempt the 04$ if thepriority of the nely arrived process is higher than the priority of thecurrently running process. A nonpreempti)e priority schedulingalgorithmill simply put the ne process at the head of the ready%ueue. A major problem ith priority scheduling algorithm is indefinitebloc9ing or starvation. A solution to the problem of indefinite bloc9ageof lo priority processes is aging. Aging is a techni%ue of gradually

    increasing the priority of processes that ait in the system for a longtime. To solve the convoy effect and starvation effect, 2ound 2obin isconceptualized.

    &. Roun+ Robin*cheduling Algorithm iLs designed especially for timesharing systems. A %uantum time is given. A %uantum time is generallyfrom J to JJ milliseconds. The ready %ueue is treated a s a circular%ueue. The 0$ scheduler goes around the ready %ueue, allocating the04$ to each process for a time interval of up to time %uamtum. 3t is atime defined for the processes that ill be executed in order to preventmonopoly of the processor:

    To simulate ho these processes or9B G#ntt c"#rtis used to determinethe average aiting time and the average turn around time.

    !#itin$ ti&eis the time here a particular process is aiting in the ready %ueuehile theTurn.#roun+ ti&eis the elapse time form job submission up to job completion.

    Prepared by: ELJUN P. CORTESCCS Faculty

    33

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    34/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTESFORM(LA:

    ,3 To co&pute t"e #er#$e

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    35/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTES

    To co&pute t"e Aer#$e Turn > Aroun+ Ti&eActu#l Turn . #roun+ Ti&eN 1ast Turn Around Time E Arrival Time

    Aer#$e Turn . Aroun+ Ti&e UActual Turn > Around TimeTotal number of 5obs

    -xample: SINGLE 4(E(ING*imulate the Bantt chart and compute for the average aiting time and

    turn>around time using +0+*, *5+, 423)23T@ and 2)$8!>2)(38 *chedul3ngAlgo(ithm.

    PROCESS T AT !I 4T

    + J 'ms " 'ms

    1 ' "

    A "J

    ? L #

    * J &

    *)1$T3)8: SINGLE 4(E(ING

    FCFS

    ' #' ' #J 'J 'L 7L1O$2 M3HO&4

    Prepared by: ELJUN P. CORTESCCS Faculty

    35

    CPU

    F10

    15

    A20

    !8 S

    10

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    36/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTES!o compute the Average ?aiting Time

    ?T N F' >'G P F' > 'G P #J E 'G P F'J E 'G P F'L >'G #7 #7 '

    A?T N J P J P "' P &' P '#

    '

    A?T N ###7 #7 '

    A!T -3 &s

    To compute the Average Turn E Arou8d time

    TATN F' E 'G P F#J E 'G P F'J > 'G P F'L E G P F7L E 'G'

    ATAT N J P "' P &' P '# P 7#

    '

    ATAT N#7I7 'ATAT /H3- &s

    SHOR M3HO&4

    A!TN '' P #J P 'J P 'L > ' N -3 &s

    '

    ATATN ' P J P 'J'L P 7L > ' N /H3- &s

    'SF

    A!TN ' P # #7 P "# P # P &L > ' N ,H31 &s'

    ATATN # P "# P ## P &L P L > '/- &s

    '

    PRIORITY

    Prepared by: ELJUN P. CORTESCCS Faculty

    36

    CPU

    !8

    F10

    S10

    15

    A20

    CPU

    A20

    F10

    15

    !8 S

    10

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    37/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTES

    A!TN ' P "' P #' P 'J P L > '-H3 &s

    '

    ATATN "' P #' P 'J P 'L P 7L > ' N 1-3 &s'

    RO(ND. ROIN

    2 2 2 2 2 2 2 2 / 2 2 2 2

    2 ,* ,2 -* -2 /* /2 1* 12 1 2/ 2 /

    F J E ' N ' E ' N JL ' E ' N J E ' N ' E ' N JA "J E ' N ' E ' N J E ' N ' E ' N J! L E ' N # E # N JS J E ' N ' E ' N J

    !T: F ' P #J E J E ' N "JL J P #' E ' P '# E &J E ' N #LA ' P &J E "J P 'L E &' P 7# E 7# E ' N ! "J P &' E "' E ' N #'

    S "' P &L E #J E ' N #L

    A!T "J P #L P P #' P #L /13&s'

    TAT: F #' E ' N #JL 'L E ' N '#A 7L E ' N 7#! &L E ' N S '# E ' N &L

    ATATN #J P '# P 7# P P &L N 1J31&s'

    -A41-: M(LTIPLE 4(E(ING

    Process urst ti&e Arri#l ti&e Priorit% 4u#ntu&

    Prepared by: ELJUN P. CORTESCCS Faculty

    37

    CPU + L & , + L & , L

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    38/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTES

    Ti&e

    4 J &ms & 7ms

    4" ' ms #

    4# ' Jms

    4& J "ms "

    FCFS:arrangement based on smaller Arrival time

    - ,- -- -J 1-

    !T, " E & N L- "" E N '/ " E J N 1 " E " N J

    A!T L P ' P P J ,*&s &

    TAT5 N "" E & N L5" N " E N "J5# N &" E J N #"

    5& N " E " N J

    ATAT L P "J P #" P J -*&s&

    SF

    - 1 J ,- -* -J 1-

    !T

    5 N & P "J E E & N #5" N E N J5# N " E J N 5& N " P " E & E " N L

    A!T # P J P P L H32&s&

    TAT

    Prepared by: ELJUN P. CORTESCCS Faculty

    38

    CPU 410

    110

    25

    315

    CPU 410

    110

    25

    48

    17

    315

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    39/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTES5 N " E & N "#5" N " E N '5# N &" E J N #"5& N & E " N "

    ATAT "# P ' P #" P " ,232&s

    &

    PRIORITY "

    - ,* -2 -J /- 1-

    !T5 N #" E & N "L

    5" N " E N "J5# N J E J N J5& N " P "' E J E " N '

    A!T "L P "J P J P ' ,23J2&s&

    TAT5 N &" E & N #L5" N #" E N "'5# N "' E J N'5& N " E " N "'

    ATAT #L P "' P ' P "' N -23J2&s &

    RO(ND . ROIN 7 7 ' 7 & & 7 #

    - ,1 ,H -2 -H // /H 1-

    5 N J E 7 N & E & N J5" N ' E ' N J5# N ' E 7 N I E 7 N #5& N J E 7 N & E & N J

    !T5 N L P "I E & E & N I5" N & E N 5# N I P ## E "' P #I E #I E J N

    Prepared by: ELJUN P. CORTESCCS Faculty

    39

    CPU 410

    315

    42

    25

    110

    CPU 4 1 2 3 4 1 3 3

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    40/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTES5& N " P "' E L E " N

    A!T I P P P ,2&s&

    TAT5 N ## E & N "I

    5" N I E N"5# N &" E J N #"5& N "I E " N "

    ATAT "I P " P #" P " -2&s

    4(I5 6:

    *chedule the folloing jobs using +0+*, *5+, 4riority and 2ound>2obin

    Process t AT !i 4T

    4 "J 7ms # ms

    4" " &ms

    4# J Jms "

    4& ' "Jms &

    4' L "ms

    FIAL EXAMIA!IO

    Re7erences:. *ilberchatz, Abraham, et. Al. )perating *ystems 0oncepts, 7th

    edition, ?iley Textboo9s, "JJ"

    Prepared by: ELJUN P. CORTESCCS Faculty

    40

  • 8/13/2019 MELJUN CORTES MANUAL Operating System CSCI10

    41/41

    COLLEGE OF COMPUTER STUDIES CSCI10

    Prepared by: ELJUN P. CORTES". (ic, 1ubomir +., *ha, Alan 0. )perating *ystem 4rinciples, st

    edition, 4rentice all, "JJ"#. *talling, ?illiam. )perating *ystems: 3nternals and !esign

    4rinciples, &th -dition, 4rentice all, &th edition, 4rentice all,"JJJ

    &. Tanenbaum, Andre, odern )perating *ystems, "nd edition,4rentice all, "JJ'. 0houdhury, 4.). )perating *ystem 4rinciples and !esign, st

    edition. 020 4ress, "JJ"

    41