0% found this document useful (0 votes)
11 views15 pages

Lecture 1-1

An operating system (OS) is essential software that manages hardware resources and provides a user-friendly environment for running programs. It encompasses various functionalities such as process management, memory management, and device drivers while addressing key issues like security, reliability, and performance. The document also outlines the evolution of operating systems, including concepts like multiprogramming, timesharing, and embedded systems.

Uploaded by

patrickmafuru12
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views15 pages

Lecture 1-1

An operating system (OS) is essential software that manages hardware resources and provides a user-friendly environment for running programs. It encompasses various functionalities such as process management, memory management, and device drivers while addressing key issues like security, reliability, and performance. The document also outlines the evolution of operating systems, including concepts like multiprogramming, timesharing, and embedded systems.

Uploaded by

patrickmafuru12
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd

Operating Systems

Senior Lecturer:
Dr. S.B
KISANJARA
What is an Operating System?
• “all the code that you didn’t write”
• the code that manages physical (hardware) resources
• provides users with “logical” well-behaved environment
• O.S. defines a set of logical resources (objects) and a set
of well-defined operations on those objects (i.e., an
interface to use those objects)
• provides mechanisms and policies for the control of
objects/resources
• controls how different users and programs interact
• without an O.S. there would be a lot more work to write and run
programs

03/26/25 2
What resources need to be managed?
• the CPU (computation)
• primary memory
• secondary memory devices (disks, tapes, etc)
• networks
• input devices (keyboard, mouse)
• various I/O devices (printers, display, cameras,
speakers)

03/26/25 3
What’s in an OS?
Application Quake Sql Server
Services
SYSTEM CALL API System Utils Shells Windowing & graphics

Naming Access Control Windowing & Gfx

Networking Virtual Memory


Machine
Independent File System Process Management
Services Generic I/O

Device Drivers Memory Management


MD API

Machine Dependent Interrupts, Cache, Physical Memory, TLB, Hardware Devices


Services
03/26/25 4
Logical OS Structure
The OS is Everywhere
main(int argc, char **argv) • Edit
{ int fd = open(argv[1], O_RDONLY); • Compile
if (fd < 0) {
fprintf(stderr, “Failed to open\n”); • Run/Create Process
exit(-1); • Invoke main
}
while (1) { • Open file
if (read(fd, &c, sizeof c) != 1) – check access
exit(-1);
– cache
putc( c )
} – read character
} • Write character
• Terminate process on EOF or Err
% cc main.c
% ./a.out /tmp/foo.bar

03/26/25 5
Major issues in Operating Systems
• structure -- how is an operating system organized?
• sharing -- how are resources shared among users
• naming -- how are resources named (by users or programs)
• protection -- how is one user/program protected from
another
• security -- how to restrict the flow of information
• performance -- why is it so slow?
• reliability and fault tolerance -- when something goes wrong
• extensibility -- how do we add new features?
• communication -- how and with whom can we communicate
(exchange information)

03/26/25 6
Major issues in OS (2)
• concurrency -- how are parallel activities created and
controlled?
• scale and growth -- what happens as demands or resources
increase?
• persistence -- how to make data last longer than programs
• compatibility -- can we ever do anything new?
• distribution -- accessing the world of information
• accounting -- who pays the bills, and how do we control
resource usage?

03/26/25 7
A brief history of operating systems
• “in the beginning”, the OS was just code to which you
linked your program, loaded the whole thing into
memory, and ran your program; basically, just a
run-time library
• simple batch systems were first real operating systems:
• os was stored in part of primary memory
• it loaded a single job (from card reader) into memory
• ran that job (printed its output, etc.)
• loaded the next job...
• control cards in the input file told the os what to do
• Spooling and buffering allowed jobs to be read ahead of
time onto tape/disk or into memory.

03/26/25 8
Multiprogramming
• Multiprogramming systems provided
increased utilization
• keeps multiple runnable jobs loaded in memory
• overlaps I/O processing of a job with computes of
another
• benefits from I/O devices that can operate
asynchronously
• requires the use of interrupts and DMA
• tries to optimize throughput at the cost of response
time
03/26/25 9
Timesharing
• Timesharing supported interactive use of
• each user feels as if he/she has the entire machine (at
least late at night!)
• timesharing tries to optimize response time at the cost
of throughput
• based on time-slicing -- dividing CPU equally among
the users
• permitted active viewing, editing, debugging,
participation of users in the execution process
• MIT Multics system (mid-late 1960s) was first large
timesharing system
03/26/25 10
Distributed Operating Systems
• distributed systems facilitate use of geographically
distributed resources
– machines connected by wires
• supports communication between parts of a job or
different jobs
– interprocess communication
• sharing of distributed resources, hardware and
software
– resource utilization and access
• permits some parallelism, but speedup is not the issue

03/26/25 11
Parallel Operating Systems
• Support parallel applications wishing to get speedup of
computationally complex tasks
• Needs basic primitives for dividing one task into
multiple parallel activities
• Supports efficient communication between those
activities
• Supports synchronization of activities to coordinate
sharing of information
• It’s common now to use networks of high-performance
PCs/workstations as a parallel computer
03/26/25 12
Embedded Operating Systems

• The decreased cost of processing makes computers


ubiquitous. Each “embedded” application needs its
own OS or control software:
– cell phones
– PDAs (Palm Pilot, etc.)
– “network terminals” (internet interfaces)
• In the future, your house will have 100s of these things
in it (if it doesn’t already)

03/26/25 13
CSE 451

• In this class we will learn:


• what are the parts of an O.S.
• how is the o.s. and each sub-part structured
• what are the important interfaces
• what are the important policies
• what algorithms are typically used
• We will do this through reading, lectures, and a project.
• You will need to keep up with all three of these.

03/26/25 14
Review Questions
for Reinforcement

• 1. What do you understand by the term


Operating System?
• 2. What does multiprogramming mean?
• 3.What do you mean by System call?

03/26/25 15

You might also like