0% found this document useful (0 votes)
15 views10 pages

OS-Assignment-1

Uploaded by

050tk1krpc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views10 pages

OS-Assignment-1

Uploaded by

050tk1krpc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

ame: Anshul M.

Joni (22cfo4f)

AssIGNMENT 1 (os)
1. whot oxe the two maln unctions os an
operating system? Briesly czplain :
an extended ochine :
Ly Hides the Hordware comple zily provide s
Simple UI.
4 Presents to Usen with an equivalent of
extended machine that is eosier to praqram
than. unde nlying hordware.
L Abstrac tion - Disk contain s a collection ot name d
Siles Aes

il ResouTCe manaqen:
Provides an orderly and controlled allocation
resources such as me mory_ond T/O devices
among al the px0CeSse s.
2, Brieíly ezplain mlipogramming,
and Distributed o.s. :
multitasking

Mutlpoqeo mming os:


Desision hos to be made about whene to put
the ba jobs in the main memaiy. Hence
Memoy manage ment Junctionality lwas added.
’ Ilo devices also have to be allocate d to process
and hente. I/O Management cwas also include d,
MultiptogrOmmed os utilized all the nesou T(eS
essectively, but doesp'# provide use intergction

visicw
with computer,
’ Multitosking 0S

Multipioces5 with Single yse point of vie.


Resess to the ability of an os to ezecvle

multiple processes Lon-turienty.


Distri buted

It appeors to user traditional uniproce ssar


System even
ev though it is actvally composed ot
multiple processers.
Main chorocteris tics aYe transpaYanty and
Y"esouTCe
sharing
Supports RPe RML
Hadoop framewonk.
3.what is spooling ? Do you think that a dwoned
personal computeiS will have spolinq as sta dayd
seoture in futuve

Spooling mean Simultaneous peripheral


operations on line
’ In this process data is temporarily stored into
butfey be fore se nding it to a slow peripheral
device - his allows the CPy to contim ue other
tasks while TJO operation completes.

visicw
Hayd disk

Card
neode n CPU Printee
Advonced personol computers will Iikely
cantinve to vse spooling especiolly on
monoging print jobs & other Ilo operations.
while devices are getting saster, spooling
still helps in esficiently managing tasks
and resouYCeS
It ensures
res that CPr doesn't nem qin Idle
wbile. Ilo operations OceUYe.

4, I s there any neoson why you might wont to


mount a le system on a non-empty direc tory
I So, ubot is it

major Deason to mount a Sile


non- empty directory is to access data frorn qn
ezternal storage device, such os USB drive Or
external Hord disk. This allows you to mead
write ond monoge da ta on the peripheral
devices directly from the ezistinq
directory
your system.
structure on youY

visicN
5. Can the
Covnt ead (d, bu[ter , nbytes )
call retuYn any Valve in covnt other thon
nbytes ? 15 se, why
Cownt write l sd, buster, nbytes)
call eturn qny va lve in coun t other than
nbytes ? 15 s0, why

) read (sd, bu[ feye, val ue )


n bytes

return value: The num ber of bytes octvally


read.
Might return [ewerbytes the n requested
becav se Sewer by ters axe availa ble.

W) Write (fd, bufer, nby tes)


return vave The no. of bytes actually written
Maght retuyn fewer bytes if SOme interrvption

6. On all Curre nt computers, at least part of


the interrupt hondlers are writter
assem bly language. Why? Beta use -
Speed Assembly lang. provides low level control
and faster e xecution.
Direct hordwre access It allows precise and
direct access to hardware e qistors and
insty uetjon s

visic
7. In siquYe -1a multithreade d web sen vet is
shown. IÍ the only way to ead S1om a sile
1S the moYmal
mal bl ocking syste m call, Do you
think use level thre ads Kernel leve threads
are being used for the web ser VeY ? why

Ker nel level threads are being ysed.


Glocking read calls would not Halt user leve l
threads +prevents conurrent processing
kernel level threads which allows the 0s to
switch between threads when one is blocked.
Maintained sen Ve ness and esficieny.
responsive

8, Briefly explain fol lowing design strvetuses of


the operating syste
i) Monolithie :

’ Tn this approgch, the entire


a single proqnam, in Kernel mode, The os
is written as collection of procedu res
single large
linked togethere into aa single lomge exe cu table
binary progiam
9 Any procedure com call any of the othe
one, when needed.
Q5 9ccupies si'ng le add ness space, to construct
the object proqrarm os the os, one fist
coYmpiles qllthe individal proe dures and th
binds them all together into a single object file
using the línker
visiow
Advantaqe Es3 icient
Oisadvan toge - Any payt of os tails, Entíre os
Sails.
- 0i55iicult to modirdy.
- No protection.

Eg. Unix, Linuz.

Basic strveure?

1) Mai program: That invokes the regveste d


Servie procedsre
ji) A set off servie
service proce dvrs that caryy out
the system cal.
ii) A set of Utility procedures that help the

’In his mode l, fon each system call there is


service procedure t hat take cone of jt
and exeute it.
’ The Utility proce dures do things that are
needed by seVeTal service rocedures such
as Setching data from the uSen pro qTams,

Miceokernel model ?
Suggests client Server model.
The idegl is to acheive high relia bílíty
by splitking into Small modules only
one of which, micro key nals un qs relabively
powersul ordinary
ordinayy use processes.

visicw
’ Basically kernmel handle the conm nica tion
betweem clients and senvers, handlinq inter1vpt
I/O and mini mul process and no1y monagenent.

Advoy ta qes:

Kernel is manogable ond edse of extend1n9


the OS, be cavse new services gre addeð to
use space and do not neg uixe modificati on
of the kenne.

Easie to port from one bardwa re to ano ther.

Oisadvontoge:
’ Less esficient beavse fnequ ant mode chonge nequire d.
ii) Layered os:
’ 0s i s desiqned as hierarc hy of layers eoch
constrvcted upon One below it
Each layer con be think 0s an object which
hos its data and functions.

The fi1st OsS THE System with 6 layeTS.

visioN
Laye Function
5 The sero
4 Ilo mqndgemen t
3
Opera tor- process com mVnica ti on
2
oTY manaqe men t
memoTY
Proces alloca tion multipiogsamming

Adyontagesi
’ Debugging iseasy
Mo delaity
Easy ch0nge sunction ality of any layets.
Protection,

Disadvanta gei
Care fulL detinition of layexs.
’2ess eficient.

g. Compore
process ond thneads briefly, Explain
user space , kernel spuce and hy brid impleme ntot on.

Process Threads :
’ An instance of program Smalles unit of
exe cvtion. execv tion within a proesS,

High overhead Low over head.

Require TPC mechonis m Co mmunica te dineetly


through shere d memoy.

visic
Proccss Threads

She du ling man0ged Scheduling monaged by


by both OS and nUntime
libr ary.
’ Suitoble fom Svitoble ton task
inde pe ndent tosa requirin g concurrency.

User space
where applicotíon. code mns, sep0T4 te
Som kese spae
’ This isolation prevents diret acce S5 to CIitical
JoUICe S enhomcing seccurity and stobility
o Application in uses space interQct with
Kernel via sy stem

Kerne Spoce:

where 0S stoYe s functions


’ Managinq System
system resovrCes and hayducne.
Handles tosks like prOCess scheduling, memory
mamogement ond de vice con tnol.
’ Separa tion from user spoe ensures s to bili ty
and security pre venting direct ani pvasion.

visicw
Hybid implementation:
Com bines Vsen leve and Kernel level thre adin g.
Uses many to many model.
Beniit is low
lo ovex head along with obvst
persOTmonce.
Eq. Solaris and Windouws NT.

why inuocation of System cal is machine.


depen dent < Oriet ly explain steps involved.
3 DiSserent cPUs have disfere nt set of instyuctions
and negiters, malking mple mentation depen dent on
hardwate.
’ Eoch 0s may have ditfeset method son hondling
syséen cdlted, tailored to the specific kernel.

Steps
’ Para meters are pushe d into a stack
Save the curYent state on stack.
Srop imstt, exeu te d. to suiteh to kernemode.
’ os identiied System cal
’ Hondleo performs the. regueste d aperation.
Restore the previovs State from staeh.
CPU suwitch back to sey mode
ErToT co de is returned i system
syste call Can't
be eeuted

visic

You might also like