0% found this document useful (0 votes)
7 views57 pages

Khipu UTEC Operating Systems Overview

Uploaded by

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

Khipu UTEC Operating Systems Overview

Uploaded by

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

Introduction

Operating Systems

CS3015 – 2024II 1
PROF.: JGONZALEZ@[Link]
Dr. Jorge Gonzalez Reaño
jgonzalez@[Link]
Assistant Professor
Department of Computer Science
He obtained his BS degree in Electronic Engineering from the
Universidad Privada Antenor Orrego, MSc in Microelectronics from
the University of São Paulo in 2013, and a PhD in Computer Science
from the University of Campinas in 2021. Currently he is a research
collaborator at the Lightwave Research Laboratory of Columbia
University, NY. His current research interests are in computer
architecture, optical interconnects, memory systems and intra-chip
traffic.

2
Executive Summary
3

• Motivation: Operating System (OS) plays a key role in modern computing


systems.
• Problem: OS implements complex functionality because of the increasing
demands on current applications.
• Overview:
- CS3015 course logistics.
- Operating System Introduction and show the abstraction levels.
- Review of OS evolution related to the computing systems and its
fundamental concepts.
• Conclusion: Operating Systems course provides details of the interaction and
management of the available resources in the computing system.

CS3015-OPERATING SYSTEMS
Outline
5
Course Logistics

Introduction

System Abstraction

Historical Perspective

Fundamentals

Classification and Architecture

Conclusions

CS3015-OPERATING SYSTEMS
CS3015 Operating Systems
6
• Introduces fundamental concepts of modern operating system design
using a theoretical and practical approach.
• Objectives:
- Show the details and answer: how the operating system works?
- Details the OS techniques to efficiently manage the hardware resources.
- Implement an Operating System with a limited functionality.
• Content:
Distributed in two modules:
- First module, from Week 1 to Week 8
- Second module, from Week 9 to Week 16

CS3015-OPERATING SYSTEMS
Evaluation
7
For more details please refer to the course Syllabi in Canvas

THEORY LABORATORY
4 Labs:
EVALUATION
(7%)(L1)
2 Exams (25%) (E) (10%)(L2)
*only if the student
(7%)(L3)
pass both theory and
(11%)(L4)
laborary parts of the
1 Project (15%)(P)
course
50% 50%
100%
Lab: It is mandatory to attend the lab session in order to present a lab
report.

CS3015-OPERATING SYSTEMS
Recall: Clasroom
8

• Do not use cellphones or laptops. Follow instructor guidelines.


• 7 min. to begin lecture.

CS3015-OPERATING SYSTEMS
Important Rules
9
• Read UTEC rules (also in syllabi):
• [Link]
os_estudiantes_2022.pdf

• Do not:
• Publish your solution repos online or share with other students.
• Use partial or entire solutions and code implementations from: a) online
repositories, b) your own work on a previous semester, c) or other students
(including those who have already taken the course).
• In case of doubt, please ask the instructors and TA.
• Do:
• Discuss ideas and problems with other students
• Ask the TA and instructor.

CS3015-OPERATING SYSTEMS
Logistics
10
• We recommend students to attend all classes.
• Work hard! Be honest and gentle!
• During class will be required to activate cameras (online)
• We encourage students to formulate questions.
• Do not be afraid to ask!

• Ask for help:


• Please contact bienestarestudiantil@[Link] in case
you fight procrastination, digital addicition, etc. or
need counseling.

CS3015-OPERATING SYSTEMS
Logistics
12
• All course communication via Piazza. Use email for emergencies.
• Do not send direct messages, use the forum. Do not be afraid to ask ☺
• [Link]

• Lab instructor: Mauricio Pinto, mpinto@[Link]


• TA: Roosevelt Ubaldo, rubaldo@[Link]
• Attention hours: TBD
• Gives hints, solves exercises, makes jokes, recommends anime.
• Talk with your TA ☺

CS3015-OPERATING SYSTEMS
Al ways remember!
1 You can do it!
2
Work hard!

13
Books
14
• Course books for our Operating Systems course are:

Abraham, S., Greg, G., & Peter Baer, G. (2018). Operating System Concepts.-
10th.

Stallings, William. (2015). Operating Systems : Internals and Design Principles.


Upper Saddle River, N.J. :Prentice Hall.

CS3015-OPERATING SYSTEMS
Outline
15
Course Logistics

Introduction

System Abstraction

Historical Perspective

Fundamentals

Classification and Architecture

Conclusions

CS3015-OPERATING SYSTEMS
Pervasive computing
17
• Computers are used in multiple
domains:
• High Performance Computing: Khipu- androi
Utec, Frontera Texas, etc. d
• Mobile devices: smartphones, tablets,
wearables, etc.
• Each application field requires:
• Having a platform-ready for users and
developers.
• System management of the available
resources.
• Operating System is present on each
type of domain, including Mars
exploration!!
CS3015-OPERATING SYSTEMS
What is an
Operating System?

18
OS relevance
19
[Link]

Andrew Tanenbaum
• Emeritus Prof. Vrije
Universty
Amsterdan
• Minix designer

CS3015-OPERATING SYSTEMS
Outline
20
Course Logistics

Introduction

System Abstraction

Historical Perspective

Fundamentals

Classification and Architecture

Conclusions

CS3015-OPERATING SYSTEMS
Operating System: Abstraction for Innovation
22

• In design, higher abstraction reduces the


kernel
design complexity.
• While Computer Architecture studies the
processing element design.
• Operating Systems focus on bringing the
higher abstraction to the user/programmer.
• Both areas complement each other to
provide the Hardware/Software interface.

CS3015-OPERATING SYSTEMS
Recall: How does a computer starts?
23

• Before we start …

CS3015-OPERATING SYSTEMS
Recall: ARM Cortex pipelines
24

• Pipeline ideas:
• Phases
• Operation/Execution
• Parallelism
• Microarchitecture
optimization

CS3015-OPERATING SYSTEMS
Recall: Processor organization
25

Evolution for exploiting


Instruction Level
Parallelism (ILP)

CS3015-OPERATING SYSTEMS
Multicore Organization
26

• Superscalar: by increasing
the number of pipelines.

• Sharing and updating


data is critical for
consistance and
coherence.

CS3015-OPERATING SYSTEMS
Intel Multicore (circa 2008).
27

CS3015-OPERATING SYSTEMS
Important questions:
In CS3015 we
How can we share the introduce the OS
1 perspective:
computing resources?
- Multiprogramming
with multithreads
- General computing
system perspective
2 How can we organize the
system logically?

28
Multithreading
29 Different than
• Performing multiple threads of
execution in parallel
Multitasking
• Replicate registers, PC, etc. • Gives the illusion that a single
• Fast switching between threads processor system is running
• Fine-grain multithreading multiple programs
• Switch threads after each cycle simultaneously.
• Interleave instruction execution
• Each process takes turns
• If one thread stalls, others are executed
running. (time slice)
• Coarse-grain multithreading
• Only switch on long stall (e.g., L2-cache • After its time is up, it waits
miss) until it has a turn again.
• Simplifies hardware, but doesn’t hide (blocks)
short stalls (eg, data hazards)

CS3015-OPERATING SYSTEMS
OS Goals
Abstractio
31 n Application
Software Virtual Machine
Interface
Operating System Physical Machine
Hardwar Interface
Complexit e
y

• OS needs to provide a higher-level abstraction called Virtual Machine:


• Reduce complexity: Remove software/hardware notions.
• Help the programmer: Optimize for convenience, utilization, reliability.
• OS designer need to consider for all target areas (e.g. file systems, virtual memory,
networking, scheduling):
• Hardware characteristics and limitations.
• Software interface to provide: useful, simple, efficient.
Virtual Machine Interface does not refer to virtualization hypervisors or software (JavaVm,
Docker, Virtualbox, etc.).
CS3015-OPERATING SYSTEMS
Recall: Abstraction for Innovation
32
• In design, higher abstraction reduces the design
kernel complexity.
• While Computer Architecture studies the
processing element design.

• Operating Systems focus on bringing the higher


abstraction to the user/programmer.
• Both areas complement each other to provide the
Hardware/Software interface.

CS3015-OPERATING SYSTEMS
Abstraction Interfaces
33
• Application programming interface (API):
AP
• Gives a program access to the hardware
resources and services. I
AB
• Supplemented with high-level language I
(HLL) library call IS
A
• Application binary interface (ABI):
• Defines the system call interface.

• Instruction set architecture (ISA):


• Details the execution capabilities of the
system.
• Provides user ISA.
CS3015-OPERATING SYSTEMS
Outline
34
Course Logistics

Introduction

System Abstraction

Historical Perspective

Fundamentals

Classification and Architecture

Conclusions

CS3015-OPERATING SYSTEMS
Computing System Evolution
36
Info and historic data:
[Link]
computer/4/78

Social perspective:
• (1940-1970) Hardware Expensive, Humans
Cheap
- E.g.: Eniac
• (1980-2000) Hardware Cheaper, Humans
Expensive.
- E.g: IBM workstations
• (2000-present) Hardware Really Cheap,
Humans Really Expensive:
- E.g.: amazon cloud systems
CS3015-OPERATING SYSTEMS
OS Evolution
37
• Functional perspective:
• Second generation (1955–65): batch
systems

• Third generation (1965–1980):


multiprogramming

• Fourth generation (1980–present):


also for personal computer

• Fifth generation (1990–present):


multiprocessor, also for mobile
computers

CS3015-OPERATING SYSTEMS
OS Timeline 1964: Multiplexed
Information and
38 Computing Service. GE
then Honeywell

[[Link],
CS3015-OPERATING SYSTEMS 2011]
Unix Family Tree
39

CS3015-OPERATING SYSTEMS
Linux OS
40
Official Linux history (20th anniv. 2011): [Link]

Kernel
v5.5

• Names: (1991) Freax, (1992) Linux, (1996) GNU/Linux.


• Kernel Developer: Torvald Linus
• Free open-source, developed using Minix OS (Tanenbaum) and C language.
• Today have more than 27M lines of code.
CS3015-OPERATING SYSTEMS
What about Windows?
41

• Based on Unix? Recall: Xenix

CS3015-OPERATING SYSTEMS
Linux Distros
42

Distro
popularity
rankings

• A Linux distribution (often abbreviated as distro) is


an operating system made from a software collection What about this?
that is based upon the Linux kernel and, often,
a package management system.
• A typical Linux distribution comprises a Linux
kernel, GNU tools and libraries, additional software,
documentation, a window system (the most common
being the X Window System, or, more
recently, Wayland), a window manager, and a desktop
environment.
[The almighty Wikipedia]
CS3015-OPERATING SYSTEMS
Do not forget ... since 2009
43

CS3015-OPERATING SYSTEMS
[Link]
44

CS3015-OPERATING SYSTEMS
OS and C relationship
45

[Link]

CS3015-OPERATING SYSTEMS
Outline
46
Course Logistics

Introduction

System Abstraction

Historical Perspective

Fundamentals

Classification and Architecture

Conclusions

CS3015-OPERATING SYSTEMS
Operating System
48

• Definition:
• A program that controls the execution of application programs
• An interface between applications and hardware

• Three key goals:


• Convenience: simple to use, from the programmer perspective.
• Efficiency: important metric related to the specific task.
• Ability to evolve: permits the effective development, testing, and
introduction of new system functions without interfering with service.

CS3015-OPERATING SYSTEMS
OS Four Main Features
49
1. Memory protection: a user program that is executing must not alter the memory
area of the OS or other user programs.
• Solution according to a policy (e.g., abort the job, print out “error”, etc.)
2. Timing control: A timer is set at the beginning of each job.
• When it expires, the user program is stopped.
3. Privileged instructions: can be executed only by the OS (subset of ISA).
• If it is present on a user program, an error occurs and the control goes back to the
OS. Notice: I/Os intructions are in the privileged set.
4. Interrupts: Allow the OS to give and regain control to/from the user programs.

CS3015-OPERATING SYSTEMS
OS as Resource Manager
50
• OS controls the use of
a computer’s
resources:
• I/Os (displays,
peripherals).
• Main and secondary
memory (DRAM,
NVM, SSD and HDD)
• Processor execution
time.
OS resides permanent or temporal in the resources.
CS3015-OPERATING SYSTEMS
OS as Monitor
51

• OS controls the sequence of jobs. OS functionality

• OS is a permanent monitoring
software, always in memory.
Command Line Interface
• From the processor perspective: E.g.: bash, [Link]
• Job is executing: processor is
fetching and executing
instructions in a user program
E.g.: Spotify,
• Job is stopped: processor is Matlab, own
fetching and executing CS software.
instructions from the OS.

CS3015-OPERATING SYSTEMS
Kernel
52

• OS is also known as the system Kernel


kernel.
• Isolated from the user and
applications.
• Interacts directly with the
hardware.
• As depicted previously, acts as a User
resource manager and monitor.

CS3015-OPERATING SYSTEMS
OS Basics
53
• Definition 1: Execution modes
• User: Restricted areas of memory and instructions.
• Kernel Mode: No restrictions, privileged execution.

• Definition 2: Multiprogram
• Instance with multiple (uni)programs
for execution.
• A (uni)program can have multiple
threads.
• Challenging for the OS to manage.
Multiprogram is not the same as multithreading, we will cover this later on the course.

CS3015-OPERATING SYSTEMS
OS Basics
54

• Definition 3: Process
• Defined in 1960 by Multics designers.
• A program or job in execution that can be associated to a set of system
resources.
• Contains three key elements:
1. Executable program
2. Associated data: variables, work space, buffers, etc.
3. Execution context: Internal data of registers, priority, status and
associations.
• Allows the OS control over the process.
CS3015-OPERATING SYSTEMS
Outline
55
Course Logistics

Introduction

System Abstraction

Historical Perspective

Fundamentals

Classification and Architecture

Conclusions

CS3015-OPERATING SYSTEMS
OS Types
56

1. Batch Systems:
• Provides the OS four main features.
• Simple implementation in early computing systems.
• Job is submitted to computer operator who batches them together and places
them on an input device (a,b,c,d)
• Program branches back to the monitor when finished (e,f).
• System overhead (memory consumption and processor time), however provides
overall gain in performance.
CS3015-OPERATING SYSTEMS
OS Types
57
2. Time-Sharing System
•Processor time is shared among multiple users, enabling multiprogramming.
•OS interleaving the execution of each user program in a quantum of computation.
•Compatible Time-Sharing System (CTSS)
• One of the first time-sharing operating systems (1961).
• Developed at MIT by a group known as Project MAC (Multiple Access Computers) for the
IBM 709.
• Time slicing technique
1. System clock generates interrupts every 0.2 seconds
2. At each clock interrupt the OS regained control and could assign the processor to another
user (current user pre-emption).
3. Store previous user programs and data out to disk before the new user programs and data
were read in
4. Program code and data were restored in main memory in next turn.

CS3015-OPERATING SYSTEMS
OS Structure
58
1. Monolithic Architecture
All in Kernel implementation (e.g.: Linux,
UNIX):
• Scheduling, file system, networking,
device drivers, memory management,
and more.
• Usually, implemented as a single
process, with all elements sharing the
same address space.
• Description:
• Main program that invokes the
requested service procedure.
• A set of service procedures that carry
out the system calls.
• A set of utility procedures that help
the service procedures.
CS3015-OPERATING SYSTEMS
OS Structure
59
• 2. Microkernel Architecture:
• Only a few essential functions to
the kernel: address spaces,
interprocess communication (IPC),
and basic scheduling.
• Other OS services are provided by
processes (called servers) that run
in user mode
• Servers are customized to specific
application or environment
requirements.
E.g.: MINIX 3 microkernel.
• Simplifies implementation, and
provides flexibility.
CS3015-OPERATING SYSTEMS
Prof. Tanenbaum : About Microkernels
• I can't resist saying a few words about microkernels. A microkernel is a very small kernel. If the file system
runs inside the kernel, it is NOT a microkernel. The microkernel should handle low-level process
management, scheduling, interprocess communication, interrupt handling, and the basics of memory
management and little else.
• The core microkernel of MINIX 1.0 was under 1400 lines of C and assembler. To that you have to add the
headers and device drivers, but the totality of everything that ran in kernel mode was under 5000 lines.
Microsoft claimed that Windows NT 3.51 was a microkernel. It wasn't. It wasn't even close. Even they
dropped the claim with NT 4.0.
• Some microkernels have been quite successful, such as QNX and L4. I can't for the life of me see why
people object to the 20% performance hit a microkernel might give you when they program in languages
like Java and Perl where you often get a factor 20x performance hit. What's the big deal about turning a
3.0 GHz PC into a 2.4 GHz PC due to a microkernel? Surely you once bought a machine appreciably slower
than 2.4 GHz and were very happy with it. I would easily give up 20% in performance for a system that was
robust, reliable, and wasn't susceptible to many of the ills we see in today's massive operating systems.

60
Outline
61
Course Logistics

Introduction

System Abstraction

Historical Perspective

Fundamentals

Classification and Architecture

Conclusions

CS3015-OPERATING SYSTEMS
OS: main reasons to change
62
Modern OS changes to provide:
Reasons are related, they are not exclusive
• Program development: to become
easier for development and
maintainability.
• Program execution: to be more Hardware upgrades
New types of
efficient during task execution
hardware
• Usage of hardware resources: to be
New services
able to use adopt interfaces and
standards. Fixes
• Error detection and response: to solve
bugs and vulnerabilities
CS3015-OPERATING SYSTEMS
Summary
63
• Operating System (OS) are present in all types of modern
computing systems.
• We detailed the evolution of OS.
• Identify OS in a computing timeline context.
• We explained the OS level of abstraction inside the computing
design.
• OS fundamental concepts were introduced:
• Main functional characteristics.
• We motivate our course CS3015- Happy journey! ☺

CS3015-OPERATING SYSTEMS
Introduction
Operating Systems

6
CS3015- 2024II 4
PROF: JGONZALEZ@[Link]

You might also like