460 likes | 704 Views
Sistem. Terdistribusi. Sistem Operasi Terdistribusi. Peran. sistem. operasi. •. Menyediakan abstraksi kontrol sumber. • kontrol sumber. daya fisik bagi user • Manajemen resource • M enyediaka n sistem call terhadap sumber • Dalam bentuk API
E N D
Sistem Terdistribusi SistemOperasiTerdistribusi
Peran sistem operasi • Menyediakanabstraksikontrolsumber • kontrolsumber dayafisik bagiuser •Manajemen resource •Menyediakansistemcall terhadapsumber • DalambentukAPI • Win32 api, POSIXapi, Java api, .NET api •JenisOS: –DesktopOS –NetworkOS –MobileOS –DistributedOS daya baik fisik /non fisik OS
OS Tasks i th f • Raise the programming interfacefor resourcestoa moreusefullevel: – Byprovidingabstractions/encapsulationofthebasic resourcessuchas: processes,virtualmemory,files,communicationchannels – Protection oftheresourcesusedbyapplications – Concurrentprocessingtoenableapplicationstocompletetheir workwithminimuminterferencefromotherapplications • Providethe resourcesneededfor (distributed)services andapplicationsto completetheirtask: – Communication-networkaccessprovided – Scheduling-processorsscheduledattherelevantcomputers id
CoreOS functionality Process manager Creation& operationuponprocesses/ programs Communication Communication manager Communicationbetweenthreads / programson same computer Thread manager Memory manager Supervisor Dispatchinginterrupts, system call, trapping
Process address space • Memory’s regions can be shared – kernelcode –libraries – shareddata& shareddata& communication – stack /heap –copy-on-write system Files can be mappedto • Files can be mappedto memory • Virtualmemory system
Copy on Write • Region RA dan RB merupakansharing memori denganteknik copy-onwriteantaraduaproses A dan B Ketika proses B hendak menulis ke share memory, maka akan terjadimemory protection page fault, sehinggaakanmengalokasikan frame baru dari hasil duplikasi frame asli sehingga akan terdapat 2 page frame Data bisa dishare tanpa “merusak” data masing- masing jika ada penulisan/ pengupdate-an • •
Thread Thread=LightweightProcess Thread=satuandasarpenggunaan • • CPU •PembuatanThreaddilakukanoleh: –Kernel Thread– lebihlambat –User Thread – lebihcepat, berbasis API •KerneljugadigunakandalamDistributed OS –Menggunakankonsep multithreading
SingleandMultithreaded Processes
Thread Life Cycles
Client and server with threads
Arsitektur Model Prosesor
Uniprocessor vs Multiprocessors • Uniprocessorhasonly one processorfor OS • Multiprocessor – Memory:couldbesharedorbeprivatetoeachCPU Data is sent by bus-basedmultiprocessor. •
Uniprocessor Operating Systems • An OSacts as a resourcemanager –ManagesCPU, I/Odevices,memory • OSprovidesa virtual interfacethat is easier to use thanhardware OSprovides a that is easier • Structure modelof uniprocessor operating systems,can be: –Monolithic(e.g., MS-DOS, early UNIX) •Onelargekernelthathandleseverything –Micro Kernel •Onlyessentialkernelfunction,otherwiseinuserspace
Microkernelarchitecture •Small kernel:interprocesscoomunication,lowlevel I/O,memory,processmanagement& scheduling •user-levelimplementadditionalfunctionality
Monolithic vs Microkernel
Network OS • Setiaphost menjalankan SistemOperasi untuk mengatur sumber daya yang dimiliki nyatermasukmengaksessumber daya di jaringan • It provides an environment where users areaware ofthe • Userscan accessremoteresources by – loggingintotheremotemachineOR multiplicityofmachines. transferringdatafromtheremotemachinetotheirownmachine – Usersshouldknowwherethe requiredfilesanddirectories are andmountthem. • • Eachmachine could act likea server and a clientat the same • ContohOS:Windows2000danWindowsNT • Contohimplementasi: – NFS(NetworkFileSystem) time. C thOSWid 2000d Wid NT – Samba–implementasiprotokolSMBdiWin&Linux
Network Operating System 1-19
supports NOS middleware Middleware Language support subsystem Language support subsystem OSemulation .... subsystem Microkernel Hardware Hardware Themicrokernelsupportsmiddlewareviasubsystems flexibilityandextensibility •servicescanbeadded,modifiedanddebugged smallkernel •smallkernel->fewerbugs •protectionofservicesandresourcesisstillmaintained
Distributed Operating System D t j k t • Dapat memanajemenkomputer-komputerdanmembuat “mereka”tampaksebagaisinglekomputer • Dapat menjalankanprosesdikomputerlaintanpa mengetahuisiapayangmeresponnya • Managesresourcesina distributedsystem – transparentlytotheuser Looks to the user like a centralizedOS – ButoperatesonmultipleindependentCPUs Providestransparency – Location,migration,concurence,replication,… • • • Presents users with a virtual uniprocessor
DOS infrastructure
Keterangan DOS t k k i •WorkstationatauPC mengeksekusi prosesyangmemerlukaninteraksidari usersepertitext editoratauwindow manager –Spesifictask Processorpool:kumpulanprosesor, tiap • unitnyabiasanyaterdiridariprosesor, memorilokal,dankoneksijaringan. –Tiap prosesor mengerjakan satu buah proses
Distributed OS • Presentsusers (andapplications) with an integrated computing platform that hides the individualcomputers. individual computers • Has control over allof the nodes(computers) in the networkand allocates theirresources to taskswithout user involvement. –Ina distributedOS,the userdoesn't know (orcare) wherehisprogramsarerunning. • Examples: –Amoeba(http://amoebaos.org) –EyeOS(www.eyeos.org) in the network and allocates their resources to
More examples ICloud
More Examples j lil d jolicloud G.HO.ST Glideos
Daftar web OS
DOS: Transparency •LocationTransparency –Users are not the resources aware of the positioning in the system. of T •MigrationTransparency –Resources can move without changing •ReplicationTransparency names / URL / URL –Users should not beawareof the presence of multiple copies of a resource Failure •FailureTransparency –Masking the partial failures in the system
Transparency d... ’d Cont • Performance Transparency –Reconfiguringtheresourcestoimprovethe • ConcurrencyTransparency –Resourcesharingisautomatic • Parallelismtransparency –Activitiescanhappeninparallelwithoutthe • ScalingTransparency Performance performanceofthesystem knowledgeoftheuser.Users seesonlyspeedup. –Allowingthesystemtoexpandinscalewithout disruptingtheactivitiesoftheusers
Distributed Operating Systems 1.14
The differences NOS DOS
What is Amoeba? A b i •Amoebaisadistributedoperating system • • Runsonasimple micro-kernel DevelopedbyAndrew Tanenbaum •Hasusertransparency –The user logs into the systemnot a specific machine –When a programis initiated, the system decides what machine will run it. Th l i h Wh i i i i d h
The History of Amoeba • DevelopedbyAndrewTanenbaumat VrijeUniversiteitinconjunctionwith the CentrumvoorWiskundeenInformatica •Firstprototypewasreleasedin1983 •Thelast official updatewasin1996 • • Othershavedevelopedtheirownversions –FireballAmoebaby FireballSoftware FireballAmoeba Distribution
Goals of Amoeba Th f i l •Therearefourmaingoals –Distribution •Connectingtogethermany machines Parallelism •Allowingindividualjobstousemultiple easily Transparency – CPUs – •Havingthecollectionofcomputeractlikeasingle system Performance –
Key Concepts Micro-kernel • – – – Asimplemicro-kernelis thebasisfor Amoeba Allcomputersinthenetworkrunthiskernel Ithandlesthememorymanagement,I/O, communication,objectprimitive,andbasicprocesses • Remote Procedure Calls (RPC) –Usedfor communicationbetweenclientandserver –Accessed bystubswhicharecreatedby Amoeba InterfaceLanguage
Key Concepts • Threads – Eachprocesshasits ownaddressspaceand containsmultiplethreads – Thesethreadshavetheir ownstack and program t bt h th lbld t d d f th counter, but sharethe globaldataandcodeof the process • FLIP(the protocol) –Fast LocalInternetProtocol FLIP – Developedby AndrewTanenbaum – Designedto optimizethespeedof RPCs
Key Concepts • Objects –The abstract data type used by Amoeba –Each object has a list of operationsthat can be preformed Capability (Protection) • – – Store data in 128 bit value Used to verify that the user has permissionto access the object Capabilitiesareencrypted –
Key Concepts • Bullet/ File Server –Store files ina contiguously fashion –Most files can be sent in a single RPC –Designedto be a de icated server • DirectoryServer –Handles naming of files –Knows the physical loc tio of each file
The system is free • • • It has not had an official update in over 10 years Can use powerful older/slowerCPUs to system create a • Micro-Kernel allows for other file systemsto be created • Has manyUNIX like commandsandprograms • Can only hold programs as large as its physical memory