Академический Документы
Профессиональный Документы
Культура Документы
1 Operating systems
Operating Systems
I/O
I/O
Manageme
Manageme
nt
nt
Resources
Resources
managem
managem
ent
ent
User
User
inteface
inteface
Operatin
Operatin
g
g
System
System
Error
Error
reporting
reporting
Interrupt
Interrupt
managem
managem
ent
ent
Memory
Memory
managem
managem
ent
ent
Device
Device
managem
managem
ent
ent
Making sure all the parts of the computer can work together.
Making sure that the user can interact with the computer by
providing an interface.
Ensuring that any errors in the computer are reported to the
user, usually with messages on the VDU.
Managing files on the hard drive and in memory and allowing
the user to manage files by providing a file management
utility program.
Making sure that data can be entered into the computer,
displayed or saved by providing software that allows data
input and output.
Providing utility programs such as FORMAT DISK, FILE
MANAGEMENT or DEFRAG.
'Scheduling. The operating system provides programs that
ensure the resources of the computer such as CPU time, are
used as efficiently as possible by all the different users and
the different jobs.
Interrupts
Interrupts are signals generated by a hardware device or by a
software application that tell the CPU it needs some CPU time.
A CPU can only ever do one job at a time, so when the processor
receives a signal, it does one of the following:
The CPU might stop what it is doing and start servicing the
device or software that sent the signal.
The CPU might carry on doing its current job until it is finished
and then service the device or software that sent the signal.
The CPU might carry on doing its current job and then service
other interrupts that have happened.
Program
error
Hardware
error
Occurs at
fixed time
intervals
Violation of
memory
Invalid
instruction
(/0)
I/O
1.
2.
3.
4.
When finished, the contents of the stack are sent back into
appropriate registers.
CPU continues with the task.
Start
Fetch instruction
Yes
Any more instructions?
No
No
Yes
End
Latency issues
Overload
Prioritisation of interrupts
Scheduling
The objectives of scheduling are to:
High-level scheduler
Loads jobs into the ready queue that need processing in order
depending on which algorithm is being utilised.
This queue is called the ready to process queue.
Medium-level scheduler
Responsible for moving a job out of the running state and into
the blocked queue.
o This could be because it requires peripheral usage /
resource of some kind.
Low-level scheduler
Scheduling Algorithms
READY
BLOCKED
RUNNING
Leave the system
Memory management
Memory management: deciding how the RAM is to be used for all
of the different applications and data.
RAM (or Immediate Access Store) is used to store data that is
currently in use. When data is opened it is then transferred by the
operating system from a secondary storage device into the IAS.
The loader is responsible for:
Transferring an application or file into an appropriate place in
the primary memory.
Adjusting any references to RAM addresses that have been
made in a program.
When the computer runs out of RAM, it utilises virtual memory:
unused space available on the hard disk.
Therefore, programs can be run when there is not enough memory
because the system relies on the fact that only one application is
serviced at a time and because you dont need the entire code for
an application in RAM at any one moment.
Paging
Segmentation
Pages are variable in size.
The enables logical grouping of sections of a program.
Previously a frequently used function might span
multiple pages which was inefficient.
Segmentation reduces the size of the paging
table.
Retrieving a segment is more complicated though.
The start address of a segment and its size must
be stored.
Problems
Disk thrashing: processor spends more time swapping
pages than processing tasks, slows down computer.
Affects hard disk performance
Spooling
A print spooler is a piece of software that intercepts details about
files that have been sent to the printer.
The head
reads/writes
when above a
track
Set of
magnetic disks
Divided into
Tracks
Tracks
Divided into
Sectors
Sectors are
grouped in
Clusters
Hard Drive
Hard Drive
Computer
automatically
looks for Boot
Files
Contents of
bootstrap are
loaded into RAM
BIOS is run
Booting up