CPS 346 Lecture notes: Introduction to Operating Systems
Coverage: [OSCJ] Chapter 1 (pp. 3-38) and
[USP] Chapter 1
(pp. 3-20)
Introduction to CPS 346
logistics, evaluation, and policies
What is an operating system?
what is an operating system? a collection of programs which
- manage computer resources (CPU, main memory, secondary memory,
I/O devices)
- provide a working environment for the user
with the following goals:
- manage computer resources efficiently
- make a computer system convenient to use
An OS manages a variety of system resources:
- CPU (time)
- main memory space
- file storage space
- I/O devices
An OS allocates and deallocates resources to executing programs (or processes)
and may resolve conflicts.
Operating system history
- historically, programmer was the OS
- load program (switches, paper tape, cards)
- set starting address
- monitor execution
- assemblers, linkers, and loaders eventually helped
- compilers and high-level languages helped the programmer by
providing a higher level of abstraction
- professional operators handled job setup and execution
- programmer debugged problems from memory dumps
- operators grouped multiple programs with similar characteristics
- batch system allowed no interaction between the user and the executing
program
- the biggest problem was (and still is) the discrepancy between
the speed of the CPU and the speed of I/O devices; two solutions:
- off-line processing
- disk spooling, which often results in a group (pool) of jobs
ready to run when the running job finishes
Review of computer organization
(ref. [OSIDP] Fig. 1.1 on p. 9; image courtesy [OSIDP] webpage)
- von Neumann architecture
- von Neumann bottleneck
Review of instructions
(cycle & representation)
(ref. [OSIDP] Fig. 1.2 on p. 12; image courtesy [OSIDP] webpage)
(ref. [OSIDP] Fig. 1.3 on p. 13; image courtesy [OSIDP] webpage)
What happens when you
power on a computer?
When a computer is powered on, a minimum amount of information is read from
secondary memory into main memory and control is transfered to that area of
main memory; this code reads the core of the OS, called the kernel,
which executes the initial process. This process is called
bootstrapping or the process of pulling oneself up by one's
bootstraps.
Memory hierarchy
(ref. [OSIDP] Fig. 1.14 on p. 27; image courtesy [OSIDP] webpage)
Locality of Reference Principle
(ref. [OSIDP] Fig. 1.15 on p. 28; image courtesy [OSIDP] webpage)
Why study this stuff anyways?
- the computing power (e.g., multi-cores on the desktop)
is now here to render many OS concepts practical in application
programming (e.g., Google Chrome or game programming)
- gateway to studies in systems programming,
distributed computing, and networking
Course objectives
- Establish an understanding of operating system internals such as process creation and management, scheduling, and memory management.
- Establish an understanding of concurrent programming and synchronization.
- Develop a proficiency in UNIX and C as a operating systems programming language and environment.
References
| [OSCJ] |
A. Silberschatz, P.B. Galvin, and G. Gagne.
Operating Systems Concepts with Java.
John Wiley and Sons, Inc., Seventh edition, 2007. |
| [OSIDP] |
W. Stallings.
Operating Systems: Internals and Design Principles.
Prentice Hall, Upper Saddle River, NJ, Sixth edition, 2009.
|
| [USP] |
K.A. Robbins and S. Robbins.
UNIX Systems Programming:
Concurrency, Communication, and Threads.
Prentice Hall, Upper Saddle River, NJ, Second edition, 2003
|
|