0% found this document useful (0 votes)
36 views11 pages

HW 2

Uploaded by

owen0928092110
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)
36 views11 pages

HW 2

Uploaded by

owen0928092110
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/ 11

OS _

HW 2
B 104020046 單業儒
System calls allow usor processes to

request services of the OS ,

System calls are like a


bridge between
the processes you use and os .
They
help processes do thingslike access file ,

use and communicate with


memory ,

other processes .

1
PThe system is easiertodebugand
modify because changes affect only
limited sections of the
system rather
than all sections
touching ,

Information iskeptonlywhereitis
needed and is accessible only within
a defined and restricted area soany ,

bugsaffecting that data must belimited


to a speific module or layer
#
.

The primary disadvantage to the


layered approach is the poor performana
due to theoverhead
different
ftraversing
through the layers to obtain
a service provided by the OS .

41
|

Parameters can be passed by the

registers .

The register can pass theslarting


position of the parameter block .

3
Parameters can beput ( pushed )
indnstackbytheprogramypoppedbytheOs #
'

Advantages :
Fase of Adding New Device Drivers :

Adding nen device drivers becomes


easy sinoe Most Kernels use this common
interface Developers
. can implement
hardware -

specific code , makingit


simpler to gupport new devices .

Consistent Development Environment :

Using umified interface enables the


a

development of user programs that access


both files and devices in a consistent

manner .
Additionally
Disadvantage : 1

Difficully Capfuring Device Functionality ;

Some devices may be hard to fit into the


file access API leading to loss of
,

functionality or performance whenaccessed



through this interface ,

Overcoming Challenges with ioct ( Operation S

To tackle API limitations for certaindevices ,

ioct1
operations are used These provide a .

standard
way for processes toaccess
specific device functions beyond what the
file aicess API offers .

Ahead -
of -
time ( AOT) compilation is the
compilation of Java code when it isinstalled
on the device .
This is a
timeandenergy
crucial for mobile
saving strategy that is
devices
#
.
Two models of interprocess ommunication :
1

Message Passing Model :

Suitable for
exchanging smaller amounts
of data No need to avoid conflicts
.
.

Easier to implement and idealfor


communications across omputers .

Shared Memory Model :


Allows ommunicationwithin thecomputer ,

achieving maximum speed and convenience .

However problems
,
with protection and
between processes
bynchronization sharing
memor exist ,
Separating mechanism and policy means
keeping how things are

done (mechanism ) separate from what needs to be done ( policy) ,

The reasons are


thefollowing
:

'

Flexibility : You can


change what needs to be done without messingwith
how its done This makes the
system more adaptable
'
. ,

Maintainability: It's easier to understand and fix


things because you dont
have to change everything when policies or requirements change ,

Adaptability : The system can handle changes befter because


you can update
policies without
rewriting the whole system .

4
Encapsulation By keeping mechanism and policy separate
:
, you hide the
complex details , making the system easier to work with
and
modify .
EX : Cousider the file system and the
memory management system .

They need to coordinate loselybecause


files are stored in memory ,

But figuring out how to separate


them into layers can be trickey
because they are so interconnected .
'

FHexibility : Modules can be added or removed without


restarting the system , makingcustomization
easier .

2
Effcieny: Only necessarymodulesareloaded, saving
memory and improvingperformance
3

rangeofhardwareandfeafures
Scalability: Supportsa wide
without overloading the core Kernel ,

4
Ease to Develope Developers can workindependentlyon
:

modules speeding up updates and new


,

features ,

5
Isolation :
If a module has issues , it can beunloaded
without affecting system stability ,
Pros of the Synthesis Approach :

Optimired Performance :

By incorporating an assembler within the Kernel , system call


-

performance 1s improved Assem bling routines


.
within theKernel
space minimizes the path system calls take , resultingin
faster execution ,

Cous of the SynthesisApproach :

'
Decreased Modularity : This approach
goes againstthelayered
design philosophy making it harder to
,

maintain and understand the system .

It sacrifices modularityfor performance


optimiration ,

2
Increased Complexity Directly
integrating an assembler into
:
the
Kernel adds complexity to the design

It may lead to more difficult


debugging
and development processess ,

You might also like