Documente Academic
Documente Profesional
Documente Cultură
REFERENCES:
1) Operating System Concepts
By: Silberschatz and Galvin
2) DOS and PC Tips
By: Kris Jamsa
3) Teach Yourself DOS
By: Herbert Schildt
4) Disk Operating System
By: Conchita C. Crisostomo
1
ABSTRACT VIEW OF THE COMPONENTS
OF A COMPUTER SYSTEM
Application Programs
Operating System
Computer
Hardware
2
3) The program in ROM tells the computer to load a more elaborate
program called the OS.
Illustration:
You
Helper
Chores
This helper can be taught the step by step instruction of doing chore
“Y” and remembers this so that when asked the same task later
he/she can basically do the job with only the name of the task given.
OS frees the user from the dirty details of writing the drivers.
3
TYPES OF OPERATING SYSTEMS:
EARLY SYSTEMS
- early computers were (physically) enormously large machines
run form a console.
- The job set-up time was a real problem. While tapes were
being mounted of the programmer was operating the console,
the CPU sat idle. Remember that, in the early days, few
computers were available, and they were expensive (they cost
millions of dollars). In addition, there were the operational
costs of power, cooling, programmers, and so on. Thus,
computer time was extremely valuable, and owners wanted
their computers to be used as much as possible. They need high
utilization to get as much as they could from their investments.
4
Buffer – store unprocessed data
Spooling – use the disk as a very large buffer
Front Panel – the faceplate of a computer cabinet through which
the control knobs, switches, and lights available to
an operator.
Idle – a device is operational but not in use
5
PERSONAL-COMPUTER SYSTEMS
Parallel Systems
- A method of processing that can run only on a type of
computer containing or more processors running
simultaneously.
- most systems to date are single-processor systems; that is, they
have only one main CPU. However, there is a trend toward
multiprocessor systems. Such systems have more than one
processor in close communication, sharing the computer bus,
the clock, and sometimes memory and peripheral devices.
6
Distributed Systems
A DISTRIBUTED SYSTEM
server
Network resources
communication
client
7
VARIETY OF REASONS FOR BUILDING DISTRIBUTED
SYSTEMS, THE MAJOR ONES BEING THESE:
8
REAL-TIME SYSTEMS
9
Write the corresponding answer at the space provided. Answer must be
chosen from the list given below. Select the best answer.
List of answers:
10
CPU SCHEDULING
P1 24
P2 3
P3 3
If the process arrive in the order P1, P2, P3, and are served in
FCFS order, we get the result shown in the following Gantt Chart:
P1 P2 P3
11
If the processes arrive in the order P2, P3, P1, however, the
results will be as shown in the following Gantt Chart:
P2 P3 P1
SHORTEST-JOB-FIRST SCHEDULING
Note:
That a more appropriate term would be the shortest next
CPU burst, because the scheduling is done by examining the
length of the next CPU burst of a process, rather than its total
length.
12
As an example, consider the following set of processes, with the
length of the CPU burst time given in milliseconds:
P1 6
P2 8
P3 7
P4 3
Using SJF scheduling, we would schedule these processes
according to the following Gantt chart:
P4 P1 P3 P2
The real difficulty with SJF algorithm is knowing the length of the
next CPU request.
13
As an example, consider the following four processes, with the length
of the CPU-burst time given in milliseconds:
P1 0 8
P2 1 4
P3 2 9
P4 3 5
If the processes arrive at the ready queue at the times shown and
need the indicated burst times, then the resulting preemptive SJF
schedule is as depicted in the following Gantt Chart:
P1 P2 P4 P1 P3
14
ROUND-ROBIN-SCHEDULING
- one of two things will then happen. The process may have a
CPU burst of less than 1 time quantum. In this case, the
process will release the CPU voluntarily. The scheduler will
then proceed to the next process in the ready queue. Otherwise,
if the CPU burst of the currently running process is longer
than 1 time quantum, the timer will go off and will cause and
interrupt to the operating system.
P1 24
P2 3
P3 3
If we use a time quantum of 4 milliseconds, then process P1 gets
the first 4 milliseconds. Since it requires another 20 milliseconds, it is
preempted after the first quantum, and the CPU is given to the next
process in the queue, process P2. Since process P2 does not need 4
milliseconds, it quits before its time quantum expires. The CPU is then
given to the next process, Process P3. Once each process has received 1
time quantum, the CPU is returned to process P1 for and additional
time quantum. The resulting RR schedule is
15
P1 P2 P3 P1 P1 P1 P1 P1
Waiting Time – the CPU scheduling algorithm does not affect the
amount of time during which a process executes of does I/O; it affects
only the amount of time that a process spends waiting in the ready
queue. Waiting time is the sum of the periods spent waiting in the ready
queue.
DETERMINISTIC MODELING
For example, assume that we have the workload shown. All five
processes arrive at time 0, in the order given, with length of the CPU
burst time given in milliseconds:
16
Process Burst Time
P1 10
P2 29
P3 3
P4 7
P5 12
P1 P2 P3 P4 P5
P3 P4 P1 P5 P2
17
With the RR algorithm, we start process P2, but preempt it after
10 milliseconds, putting it in the back of the queue:
P1 P2 P3 P4 P5 P2 P5 P2
We see that, in this case, the SJF policy results in less than one-
half the average waiting time obtained with FCFS scheduling; the RR
algorithm gives us an intermediate value.
18