Professional Documents
Culture Documents
CENG334 2008 W01a
CENG334 2008 W01a
Introduction
Topics
•What’s an operating system?
•Course policy
Erol Sahin
URL: http://kovan.ceng.metu.edu.tr/~erol/Courses/CENG334
Some of the following slides are adapted from Matt Welsh, Harvard Univ.
Week 1 18/02/08 1
Welcome to CENG334!
What is this course about?
Operating Systems drive the inner workings of
virtually every computer in the world today
PCs, servers, iPods, cell phones, missile guidance systems,
etc. all have an OS that dictate how they operate.
The OS manages many aspects of how programs run, and how
they interact with hardware and the outside world.
1
3
Welcome to CS161!
What is this course about?
Operating Systems drive the inner workings of
virtually every computer in the world today
PCs, servers, iPods, cell phones, missile guidance systems,
etc. all have an OS that dictate how they operate.
The OS manages many aspects of how programs run, and how
they interact with hardware and the outside world.
2
What is an operating system?
Software that provides an elaborate illusion to applications
Kernel
Memory management Process management
Accounting Filesystem TCP/IP stack
Hardware/software
interface
So do I!
3
One OS Function: Concurrency
The OS timeslices each application on a single CPU
Switches between applications extremely rapidly, i.e., 100 times/sec
Kernel Scheduler
Timeslice on
single CPU system
time
VM System
4
More OS Functions
Multiprocessor support
Modern systems have multiple CPUs
Can run multiple applications (or threads within applications) in parallel
OS must ensure that memory and cache contents are consistent across CPUs
Filesystems
Real disks have a hairy, sector-based access model
User applications see flat files arranged in a hierarchical namespace
Network protocols
Network interface hardware operates on the level of unreliable packets
User apps see a (potentially reliable) byte-stream socket
10
5
Why bother with an OS?
Not just to give Slashdot readers something to argue about...
Safety!
Don't let applications run amok – keep them in a “sandbox”
e.g., Access to unallocated memory address crashes only the program, not the
whole system
Segmentation fault – core dumped
Efficiency
Share one machine across many different apps: concurrent execution
You would be surprised how much slack there is in a typical computer system
11
Although more and more people are hacking them (e.g., Linux and BSD)
You need to understand the “big picture” in order to hack the details
This course is the basis for future work in other areas of systems
Distributed systems, P2P, sensor nets, etc.
12
6
Major OS Design Issues
Structure
How is the OS itself organized? Lots of modules? One big blob of code?
Sharing
How are limited resources multiplexed across users?
Naming
How to programs and users name and access resources?
Security
How to prevent malicious users from compromising the system?
Performance
How to keep it all fast?
Reliability
What happens when a program (or the OS itself) has a bug or failure?
13
Communication
How do programs exchange information?
Concurrency
How are multiple concurrent activities created and controlled?
Scale
What happens when demands on resources increase?
Distribution
How do many computers interact with each other, e.g., to pool resources?
Accounting
How do you track (and maybe charge for) resource usage?
14
7
In the Beginning...
There was no OS – just libraries
Computer only ran one program at a time, so no need for an OS
Disk spooling
Disks were much faster than punchcards – read stack onto disk while previous
program is running
With multiple programs on disk, need to decide which to run next!
But, CPU still idle while program accesses a peripheral (e.g., tape or disk!)
Harvard Mark I, 1944 ENIAC, 1945
IBM 360,
1960's
15
Multiprogramming
To increase system utilization, multiprogramming OS’s were
invented
keeps multiple runnable jobs loaded in memory at once
16
8
Timesharing
To support interactive use, timesharing OS's were created
multiple terminals connected to one machine
each user has illusion of entire machine to him/herself
optimize response time, perhaps at the cost of throughput
Timeslicing
divide CPU fairly among the users
if job is truly interactive (e.g. editor), then can switch between programs and users faster
than users can generate load
17
18
9
19
20
10
Distributed OS
Goal – Make use of geographically distributed resources
workstations on a LAN
servers across the Internet
Supports communication between applications
interprocess communication (on a single machine):
message passing and shared memory
21
Embedded OS
The rise of tiny computers everywhere – ubiquitous computing
Processor cost low enough to embed in many devices
PDAs, cell phones, pagers, ...
How many CPUs are in your car? On your body right now?
22
11
Teaching staff
– Instructor:
• Section 1, 2: Dr. Erol Sahin
Location: B-111, Tel: 210 5539,
E-mail: erol@ceng
– Teaching assistant:
• Hande Celikkanat
E-mail: hande@ceng
23
Textbook
Operating System Concepts
Seventh Edition
Avi Silberschatz
Greg Gagne
ISBN 0-471-76907-X
ISBN-10: 0130313580
ISBN-13: 97801303135
24
12
Grading
25
Assignments
26
13
Policies
• Late assignments:
– Late submission policy will be announced for
each assignment.
– %100 = meeting the deadline.
– %60 = within 1 week of the deadline.
– %0
• Academic dishonesty:
– All assignments submitted should be fully
your own. We have a zero tolerance policy
on cheating and plagiarism. Your work will be
regularly checked for such misconduct and
any such attempts will be prosecuted:
27
Cheating
• What is cheating?
– Sharing code: either by copying, retyping, looking at, or supplying a copy of a
file.
• What is NOT cheating?
– Helping others use systems or tools.
– Helping others with high-level design issues.
– Helping others debug their code.
28
14
Communication
• Online information about the course will be available on the CENG334 web
page: http://kovan.ceng.metu.edu.tr/~erol/Courses/CENG334/
• Announcements about the course will be made at the CENG334
newsgroup at news://metu.ceng.course.334
• Please put Section 1,2 on the subject line of your posting.
• If you have a specific question you can send an e-mail to the us. However
make sure that the subject line starts with CENG334 [capital letters, and no
spaces] to get faster reply.
29
15