COE628 W1 Lecture
COE628 W1 Lecture
Operating System
8
Many Different OSes
Windows
Linux
BSD (Berkeley
Software
Distribution)
11
Two Common OS Families
• Microsoft Windows.
• UNIX and UNIX-based including:
• LINUX
• SOLARIS
• MAC OS X
• Android (Google)
• Chromium (and Chrome—the OS, not the browser) (Google)
• BSD Unix
• Apple iOS (iPad, iPhone, iPod touch)
• POSIX (IEEE standard. All Unix OSes support it and Microsoft
Windows is almost completely compliant.)
Windows
• In the late 1980s Microsoft, under the leadership of Dave Cutler,
started development of a new single-user operating system to replace MS-
DOS (Microsoft Disk Operating System). Several versions of windows
are followed, such as Windows NT (NT standing for New Technology),
Windows 2000, Windows XP (XP stands for eXPerience in 2001), Windows
7 (supports the functions for touch-controlled screen and has released
this year of 2009), Windows 8/8.1, Windows 10, and so on.
• Design goals
• Extensibilities, portability, reliability, compatibility, and
performance.
Linux
• In 1991, Linus Torvalds, a Finish student at the University of
Helsinki at the time, developed a new operating system that is known
today as Linux. The initial kernel, which was similar to a small
subset of UNIX, has grown into a full- scale operating system
today. The Linux2.0 kernel, released in 1997, was accepted
as a commercial operating system: it has all features traditionally
attributed to UNIX.
• Linux has three components: kernel, system libraries, and system
utilities
Difference Between Linux and Windows
Operating System
LINUX
BASIS FOR COMPARISON WINDOWS
Hardware upgrades
New services
Fixes
EVOLUTION of Operating Systems
• Early Systems (1950)
• Simple Batch Systems (1960)
• Multiprogrammed Systems (1970)
• Time-Sharing and Real-Time Systems (1970)
• Personal/Desktop Computers (1980)
• Multiprocessor Systems (1980)
• Networked/Distributed Systems (1980)
• Web-based Systems (1990)
EVOLUTION of Operating Systems
• Operating systems have gone through a long
history of evolution, which we summarize here.
• Batch systems
• Batch operating systems were designed in the 1950s to
control mainframe computers. At that time, computers
were large machines that used punched cards for
input, line printers for output and tape drives for
secondary storage media. Each program to be
executed was called a job. A programmer who wished
to execute a job sends a request
to the operating system.
EVOLUTION of Operating Systems
• Multiprogramming, Time-sharing systems
• To use computer system resources efficiently,
multiprogramming was introduced. The idea is to hold
several jobs in memory at a time, and only assign a resource to a
job that needs it on the condition that the resource is available.
Multiprogramming brought the idea of time sharing: resources
could be shared between different jobs, with each job being
allocated a portion of time to use a resource. Because a computer
is much faster than a human, time sharing is hidden from the
user—each user has the impression that the whole system is
serving them exclusively.
EVOLUTION of Operating Systems
• Personal systems
• When personal computers were introduced, there was a need for an operating
system for this new type of computer. During this era, single-user operating
systems such as DOS (Disk Operating System) were introduced.
• Parallel systems
• The need for more speed and efficiency led to the design of parallel systems:
multiple CPUs on the same machine. Each CPU can be used to serve one
program or a part of a program, which means that many tasks can be
accomplished in parallel instead of serially. The operating systems required for
this are more complex than those that support single CPUs.
EVOLUTION of Operating Systems
• Distributed systems
• Networking and internetworking, have created a new dimension in operating
systems. A job that was previously done on one computer can now be shared
between computers that may be thousands of miles apart. Distributed systems
combine features of the previous generation with new duties such as
controlling security.
• Real-time systems
• A real-time system is expected to do a task within a specific time constraint.
They are used with real-time applications, which monitor, respond to or control
external processes or environments.
Operating Systems Classification
¨Multiuser: when two or more users can work with programs and
share peripheral devices (printer, scanner, fax)
¨Multitasking: multiple applications operated at the same time
¨Multiprocessing: more than one CPUs that can be shared
¨Multithreading: smaller parts of a program are loaded when needed
by OS
¨Real-Time Operating System (RTOS): designed to allow computers to
process and respond to the consistent input of information without
delay
Why study operating systems?
• Operating systems are a maturing field
• Most people use a handful of mature OSes
• Hard to get people to switch operating systems
• Hard to have impact with a new OS
• High-performance servers are an OS issue
• Face many of the same issues as OSes
• Resource consumption is an OS issue
• Battery life, radio spectrum, etc.
• Security is an OS issue
• Hard to achieve security without a solid foundation
• New “smart” devices need new OSes
• Web browsers increasingly face OS issues
Views of an OS
• User Interface
• KernelFile
• management system
User Interface
• Each operating system has a user interface, a program that accepts
requests from users (processes) and interprets them for the rest of the
operating system. A user interface in some operating systems, such as
UNIX, is called a shell. In others, it is called a window to denote
that it is menu driven and has a GUI (graphical user interface)
component
Kernel
¨ This is the core of the operating
system.
¨ The kernel is responsible for loading
and operating programs or
processes, and managing input and
output.
¨ Kernel act as a bridge between
applications and the actual data
processing done at the hardware
level
Kernel
• The operating system software file (program) which is copied into
RAM, usually from the hard disk drive, during the boot-up.
• The kernel contains the “internal programs” for the most often used
operations like copying files.
• kmem (Linux)
• command.exe (Microsoft)
File Management System
¨The file management system is what the operating system uses to organize
and manage files.
¨A file is a collection of data.
¨Virtually all of the information that a computer stores is in the form of a
file.
¨There are many types of files, including program files, data files, and text
files.
¨The way an operating system organizes information into files is called the
file system.
¨Most operating systems use a hierarchical file system, which organizes files
into directories under a tree structure.
¨The beginning of the directory system is called the root directory.
KERNEL: System Calls
• OS kernel
• Creates/deletes processes
• Provides access to hardware
• Kernel supplies well-defined system call interface
• Applications set up syscall arguments and trap to
kernel
• Kernel performs operation and returns result
• Applications can invoke kernel through system
calls
• Special instruction transfers control to kernel
• which dispatches to one of few hundred syscall
handlers
• Higher-level functions built on syscall interface
as printf, scanf, fgets, etc. all user-level code
• Example: POSIX/UNIX interface, open, close,
read, write, etc.
System call Example
• Standard library implemented in terms
of syscalls
• - printf – in libc, has same privileges as
application
• - calls write – in kernel, which can send
bits out serial port
POSIX - Portable Operating System Interface
• POSIX is an IEEE standard for Unix-like operating systems
• MS-Windows is almost fully compliant
• POSIX is actually a collection of standards that cover system calls,
libraries, applications and more
• POSIX 1003.1 denes the C language interface to a Unix-like kernel
• While various programming languages provide specific means of
accessing keys, every POSIX compliant OS must implement the
following basic le I/O functions, creat(), open(), close(), read(), write(),
ioctl()
POSIX Example
Next Week: Process Management