Documente Academic
Documente Profesional
Documente Cultură
Take notes
Moore’s Law
years
The Internet of
Bell’s Law: new computer class per 10 years Things!
Motivation (4) : Computing Devices
Everywhere
Motivation (5)
(Anti)Virus
System call, memory management
Game Development
Thread, memory management
Smartphone
Sistem I/O, schedulling
Cloud computing
Virtual machine
Computer component
Hardware
Storage
I/O
Software
Operating System
Brawinware (User)
People, Machines, other computers
Static View of System
Components
What Operating Systems Do
Depends on the point of view.
Users want convenience, ease of use and good performance
Don’t care about resource utilization.
Applications
e.g. Word, Netscape, etc
Operating System –
- the user interface
Software that
controls the
hardware devices
How Programs Are Run
The operating system presents an interface to the user
(e.g. Windows Desktop)
The user double clicks on an icon to run a program (e.g.
Microsoft Word)
The operating system copies the program (or at least the first part
of it) from the hard disk into main memory
The CPU runs the instructions in the program, and presents the
initial Word screen
Within Word, the user uses the menu to open a document
The application software (Word) asks the Operating System to
open the file.
The Operating System communicates with the hardware to open
the file on the hard disk.
Definition and Role of
Operating System
OS as Resource allocator
Regulates and allocates resources
e.x. process management, memory
management
OS as control program
OS perform execution control of user
program and I/O
OS as Kernel
Programs that run all of the time
Organization of Computer System
Organization of a
Computer System
Processor (CPU) Storage I/O Device
Main Memory
Secondary
Storage
Input Devices
Output Devices
The Processor
The processor is the "brain" of the computer system.
Main processor is called the Central Processing Unit (CPU).
A particular computer will have a particular type of
processor, such as a Pentium or a SPARC chip.
Co-processors assist the CPU with some of the processing
functions. Examples:
Math co-processors handle heavy duty math processing
Graphics coprocessors speed up the display of graphics
onto the monitor
Central Processing Unit (CPU)
Performs calculations
Arithmetic / Logic Unit
and decisions
Coordinates
Control Unit processing steps
Small, fast
Registers storage areas for
instructions and
data
Register Processor
• Accessing memory to retrieve
instructions requires more time than
running it - resolved by registering on
the processor
• To store the main variables and
temporary results - as a processing
place
Register ..
• Program counter - contains the memory
address of the next instruction to be taken
• Stack pointer - a pointer that shows the top
of a stack in memory
• Word status program - saves the status /
state of the program that the processor
Memory
Computer Memory -
millions/billions of on/off charges
Divided into:
Bits 0 or 1
Secondary Storage
CPU and Memory
CPU can interact with main memory in two ways:
It can write a byte/word to a given memory location.
Theprevious bits that were in that location are
destroyed
The new bits are saved for future use.
It can read a byte/word from a given memory location.
The CPU copies the bits stored at that location and
stores them in a CPU register
Thecontents of the memory location are NOT
changed.
Main Memory Characteristics
Very closely connected to the CPU.
Contents are quickly and easily changed
Why? Akses CPU ke main memory hanya butuh beberapa
clock
• Consists of 2 parts:
• Electronic components: Device
controller / controller
• Mechanical components: The device
itself
• Device controllers are a set of chips that
run physically.
• Different types of devices - different
software is needed to control them - device
drivers
Device Driver
• Run in the kernel
• Three ways to enter drivers into the kernel:
• Reconnect the kernel with the new driver and then
restart the system. Widely used by UNIX-based
systems
• Enter the operating system file and notify that the
driver needs to restart the system. When booting
all required drivers are loaded. Used by Windows
• OS is able to receive new drivers without having to
restart. Example: USB flash disk
Kernel is a software that makes communication between
computer applications and hardware, which provides system
services such as memory settings for processes that are running,
setting files, input-output to and from a device
Metode I/O
• Synchronous - waits until the I / O process is complete
• A thread starting an I / O operation will then enter state wait
until the I / O operation is complete
• When in wait state, the CPU is idle
• Asynchronous - other processes can run even though I / O
operations have not been completed
• A thread sends an I / O request to the kernel by calling the
appropriate function, if it is received by the kernel, the thread
will continue another process until the kernel notifies that the I /
O operation is complete. Then the thread will interrupt the
process it is working on and process the I / O operation data
BUS
• Communication paths between several
different devices
• Consists of 3 types:
• Address bus - address
communication line
• Data bus - data communication line
• Control bus - control signal path (eg
read / write)
Bus (Past)
Bus (Present)
• FSB - high speed main bus that
connects RAM, Processor, GPU (VGA
AGP)
Bridge - Another slower device
connected to a lower speed bus that is
connected to another bus that is faster
to the main bus
INTERUPSION
Hardware or software requests services from
the CPU and the CPU will temporarily stop the
process it is doing to service the interruption
Interruptions from hardware are usually sent
via certain signals
Software interruptions by running a system
call. This system call will cause a trap /
exception (special interruptions generated by
software due to problems or requests for OS)
Excersize
Explain how the processor and memory work
Explain functions of the control unit (CU),
arithmetic logical unit (ALU), and registers
Explain function of bus system and the types of
bus systems in computer
Explain the I / O module and the example input
output device
Preparation for next week
Install Linux
Read Chapter 2 from the reference
“Operating Systems Internals and
Design Principles”