1.1What are the three main purpos of an operat ing system?
⑴ In terface betwee n the hardware and ur;
(2)man age the resource of hardware and software;
(3)abstracti on of resource;
Answer;
•Tb provide an environment ksr a computer ur to execute programs on computer h日rchvare in n convenient and efficient manner.
•Tb allocate the parate resources of the computer as needed to st)ke the problem given. The allcxation prtxzess should b? as fair and efficient as possible.
•Asa control program it rves two major functions; (1) supervision of the execution 由 ur programs to prevent errors and improper u of the computer, and (2) management of the operatioji and control of I/O devices.
1.2List the four steps that are necessary to run a program on a completely dedicated machine. Preprocess ing > Process ing > Linking > Executi ng.
Answer:
乩 Rerxe machine time*
b* Manually load program into memory.
u Load starting address and begin exe匚Lition.
cL Monitor and control execution of program fr(im console.
1.6Define the esntial properties of the following types of operating systems:
a.Batch
b.In teractive
c.Time shar ing
d.Real time
e.Network
f.Distributed
Answer
a” Batch, Jobs w计h similar reeds are batched together and run through the computer as a group by ^r\ operator or automatic jc)b s^quenc^r. [^rformanct? i$ incr^a^ed by atteiTipting to keep CPU 3nd I/O devices busv 311 timesi through buffering, off-line operation^ spooling, and multiprogramming. Batch is good for executing 】arge jobs thjit need little interacticm; it can be submitted and piuked up later.
b. Interactive. This system is cumpofied of m^nv short transactions where the results of the next transactiiin may be unpredictablen Respond time needs tn be short (ctwids) since the ur submits and waik for the result.
u Time sharing. This systems u 船呂匚 Pl sch<*duling ^nd multi programming to pmvidu eConoiniCcil interactive u of 蛊 system. The CPL switches rapidly iri>m one ur tn another Instead of having a job defined by spcxiled card images^ each program reads
its next control card from the terminab and output is normally printed immediately to the screen.
(_L Real time. Often tisvci in a dedicated application, this system reads information from nsors and must respond within a fixed amount of time to ensure correct performance.
e.Network.
f.Distributed .This system distributes computation among veral physical processors” The prtKessors do not share menion- or a clock. Instead, each pnxzessor has its own kxzal memory. They communicate with each other through various communication linesf such as a high-speed bus or telephone line.
1.7Wehave stresd the need for an operating system to make efficient u of the com
puting
hardware. When is it appropriate for the operating system to forsake this principle and to waste ” resources? Why is such a system not really wasteful?
Answer Single-ur systems should maximize u of the system for the ur A GUI
might "xvastc * GPL' cycles, but it optimizes the urTs interaction with the system.
2.2How does the distinction between monitor mode and ur mode function as a rudimentary form of protecti on (curity) system?
Answer: By establishing a t of privileged instructions that can be executed only when in tlie m(snitnr mt)def the tiperating system is assured of controlling the entire system at all times.
2.3What are the differences between a trap and an interrupt? What is the u of each
fun cti on?
Answer An interrupt is a ha rd \ v a re-^en era ted change-of-flow within the system. An interrupt handler is summoried to deal with the cau oF the interrupt; control is then re
turned to the interrupted context and instruction. A trap is a software-j;enerated interrupt. An interrupt can be uwd to signal the compJrtion “f an I/O obviate the nevd for polling. A trap can be ud ti> call operating svstem routines or to catch arithmetic errors.