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

OS Ch1

The document provides an overview of an Operating Systems course taught by Professor Myungsuk Kim, detailing the course structure, grading criteria, and office hours. It discusses the importance of learning operating systems in the context of computer engineering, explaining key concepts such as the role of an OS, types of operating systems, and their historical evolution. Additionally, it outlines various system architectures and the implications of different I/O types, emphasizing the significance of resource management and user convenience.

Uploaded by

서연
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)
11 views35 pages

OS Ch1

The document provides an overview of an Operating Systems course taught by Professor Myungsuk Kim, detailing the course structure, grading criteria, and office hours. It discusses the importance of learning operating systems in the context of computer engineering, explaining key concepts such as the role of an OS, types of operating systems, and their historical evolution. Additionally, it outlines various system architectures and the implications of different I/O types, emphasizing the significance of resource management and user convenience.

Uploaded by

서연
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
You are on page 1/ 35

운영체제 Operating Systems

Course Overview
▪ Course title: Operating Systems
▪ Professor: Myungsuk Kim
▪ Textbook
• Operating Systems Three Easy Pieces (Remzi H. Arpaci-Dusseau & Andrea
C. Arpaci-Dusseau)
▪ Reference book
• Operating System Concepts (A. Silberschatz)
• Operating Systems: Internals and Design Principles (W. Stallings)
• Operating Systems: Design and Implementation (A.S. Tanenbaum)
운영체제 Operating Systems

Course Overview
▪ Grade
• Midterm Exam (30%)
• Final Exam (40%)
• Homework & Quiz (20%)
• Attendance (10%)

▪ Office Hour
• Wednesday p.m. 2:00 ~ 4:00
• IT4호관 406호

Our mid & final exams will be in Saturday for at least 2 hours!!!
운영체제 Operating Systems

CH 1 Introduction
운영체제 Operating Systems

Why You Learn Computer Engineering?


▪ Computer Science?? Computer Engineering??
• How to solve problems?
• You want to be coder or expert developer?
▪ The keyword for 4th industry revolution

▪ Every problems in the world will be overcome by new


techniques or approaches based on computer-related
solutions.
운영체제 Operating Systems

What Is Computer or Computer System

application

System
software
(OS)

Computer
hardware
운영체제 Operating Systems

Why You Learn Operating System?


High-Level Applications
Language Distributed computing, Parallel computing, Multimedia,
(HLL) Database, Software engineering, Image processing,
Pattern recognition, Datamining, AI, HCI, …
C/C++

Java System
Compiler programming
Lisp
“Operating System” ,
SQL
Computer Architecture
Python Digital logic Digital system
Microprocessor
Rust Network Electrical circuit
R
Basics
Basic Discrete mathematics , Data structure, Automata,
(Fortran) … Algorithm (Linear algebra, Probability & Statistics) …
운영체제 Operating Systems

What is Operating System?


▪ Software layer between users applications and computer
hardware
• Interfacing with computer hardware and user applications software
• Very large (systemm) program or suite of programs executed by the
processor

Application

support System call library Utility


OS
manage Kernel (or Nucleus)

Computer hardware
운영체제 Operating Systems

Appendix: Interface
▪ Lasts through many implementations (portability, compatibility)
▪ Is used in many different ways (generality)
▪ Provides convenient functionality to higher levels
▪ Permits an efficient implementation at lower levels
Implementation 1
Use a

Implementation 2
Use b Interface

Use c Implementation 3

We can use functions even without knowing the


Interface:
underlying complexity of device (or hardware) !!!
(1) A shared boundary across which two or more separate components of a computer system
exchange information → Hardware interface / Software interface / User interface
(2) Existing entity layer between the functionality and consumer of that functionality
An interface by itself doesn’t do anything. It just invokes the functionality lying behind
운영체제 Operating Systems

Two Perspectives in Operating System


▪ Resource management (or coordinator)
• (Efficiency) An OS allows the complex computer system resources
(hardware, which is limited) to be used (managed) in an efficient manner
for maximizing the performance
• (Fairness) Fairly allocate hardware resources
→ guarantee user experience

OS is similar to government !!!


운영체제 Operating Systems

Two Perspectives in Operating System


▪ Make the computer system convenient to use
• (Convenience) Allow user (or application programs) to be executed easily
(without knowing the underlying complex hardware/software details)
• Make solving user problems (or requests) easily by using a computer
system
운영체제 Operating Systems

Categories of Operating System


▪ How many users can be executed at the same time?
• A single user system is a system in which only one user can access the
computer system at a time.
▫ Simple but limited performance
▫ MS-DOS, Windows, Mac OS, …
• A multi user system is a system that allows more than one user to
access a computer system at a time.
▫ Complex
▫ Need to schedule different tasks
▫ Need to manage the protection or authority of each users
▫ Can improve an overall performance
▫ Unix, Mainframe, Windows NT, Linux …
운영체제 Operating Systems

Categories of Operating System


▪ How many tasks (or jobs, programs) can be executed at the
same time?
• A single tasking system can only run one program or application at a
time.
▫ MS-DOS, Windows cmd
• A multi tasking system can run (or handle) multiple applications and
programs at once.
▫ Most modern OS such as Linux, Unix, Windows, …
▪ Open source system vs. Closed source system
• Open source operating software (Linux)
▫ Free of cost software
▫ Provide an ability to change the source code without any restrictions.
▫ Source code can be open for hackers to practice on.
• Closed source operating software (Window)
▫ Paid software
▫ Source code cannot be changed or viewed, so more secure or reliable.
운영체제 Operating Systems

Categories of Operating System


▪ Monolithic Kernel
• Single large process running entirely in a single address space.
• All kernel services exist and execute in the kernel address space.
• Each component can efficiently communicate: Faster
• Difficult to add/delete disk drivers & Difficult to maintain (why? Big)
• UNIX, Linux
▪ Micro Kernel
• The kernel is broken down into separate processes, known as servers.
• All servers are kept separate and run in different address spaces.
• Servers invoke "services" from each other by sending messages via IPC
(Inter Process Communication)
• Mac OS X, Windows NT, MINIX
▪ Hybrid Kernel
운영체제 Operating Systems

Categories of Operating System

User
Application mode

VFS

UNIX server
Application

File server

Device
driver
IPC, File System …

Scheduler,
Virtual memory…
Kernel
Device drivers, Basic IPC, Scheduler
Dispatcher… mode Virtual memory

Hardware Hardware

Monolithic kernel based Micro kernel based


operating system operating system
운영체제 Operating Systems

History of Operating System


▪ What makes (or drives) the evolution of an Operating Systems
• New services (or user requirements)
▫ Which requests or demands are critical in that times
▫ (ex.) CPU utilization, throughput, user experience such as QoS, …
• New hardware technologies
▫ New hardware technologies can open new opportunities
▫ (ex.) VLSI technology, GPGPU, CXL interface, …

We begin our study of operating systems (OSs) with a brief history.


This history is itself interesting, and also serves the purpose of
providing an overview of OS principles.
운영체제 Operating Systems

History of Operating System


▪ Serial processing ~1950s
• Hardware is expensive, human is cheap
• Objective: make efficient use of hardware
• “No operating systems”
▫ Program by machine language
▫ One program should include everything to use computer
▫ Single user working at console / Debugging done offline
• Slow job-to-job transition
운영체제 Operating Systems

History of Operating System


▪ Hardware is expensive vs. Humans are cheap
▪ Goal: Make efficient use of the (expensive!!!) hardware

▪ Operator loaded and ran user jobs and took dumps


• I/O machine (IBM 1401) read in code and data of jobs(programs) onto tape
• Main machine (IBM 7094) did computing and took dumps back to tape
• I/O machine printed output from tape
운영체제 Operating Systems

History of Operating System


▪ (Single) Batch processing ~1960s : As computers became faster
• Grab all types of programs and data in the batch form then proceed to
process together
▫ Collects similar jobs, executes them automatically without manual intervention
▫ Special programming language, JCL (Job Control Language) in monitor
▫ Decrease the setup and takedown time → improve CPU utilization
• Monitor → Simple scheduler
• Single batch possesses all resources of system → Difficult to predict run
time for a job (e.g., if any job fails)
Reside in main
• Beneficial to a large number of jobs (Memory) memory
▫ Mainframe (Payroll or Bank systems …)
운영체제 Operating Systems

History of Operating System


▪ (Single) Batch processing ~1960s

(Time)
운영체제 Operating Systems

History of Operating System


▪ (Single) Batch processing ~1960s

Read one record from file : 15 us

Execute 100 instructions in processor : 1 us

Write one record to file : 15 us

Total : 31 us

Percent CPU utilization = 1/31 = 0.032 = 3.2%


운영체제 Operating Systems

History of Operating System


▪ (Single) Batch processing ~1960s

(Time)
운영체제 Operating Systems

History of Operating System


▪ Multiprogramming batch processing 1960s ~ 1970s

(Time)
운영체제 Operating Systems

History of Operating System


▪ Multiprogramming batch processing 1960s ~ 1970s
• Multiple users shared the system
▫ Degree of multiprogramming ≥ 1
▫ Multiple batch programs running at the same time on a single processor
machine to keep the system as busy as possible → processor can switch
between jobs
• Job spooled on disk or drum
▫ Simultaneous Peripheral Operations Online (SPOOL)
▫ Can hide slow (costly) I/O machines (ex. printer spool)
▫ Overlap of computation with asynchronous I/O
• Buffering and interrupt handling added to OS
• Memory protection & relocation
• Concurrent programming become necessary
• Job schedulers select jobs to run according to
a variety of criteria, including priority, memory size, etc.

What enables multi-programming system? What has trade-off relationships?


운영체제 Operating Systems

Appendix:
▪ Two types of I/O
• Synchronous I/O
▫ Once I/O starts, control returns user program only upon I/O completion
▫ Wait instruction idles the CPU
▫ At most, one I/O request is outstanding at a time
• Asynchronous I/O
▫ Once I/O starts, control returns user program without waiting I/O
completion
운영체제 Operating Systems

Appendix:
▪ Two types of I/O
(Synchronous I/O) (Asynchronous I/O)
운영체제 Operating Systems

History of Operating System


▪ Memory relocation
운영체제 Operating Systems

History of Operating System


▪ Memory protection
운영체제 Operating Systems

History of Operating System


▪ Base/bound registers
• Primitive form of MMU (Memory Management Unit)
운영체제 Operating Systems

History of Operating System


▪ Base/bound registers
• Primitive form of MMU (Memory Management Unit)
• OS manage with “Hardware support”
운영체제 Operating Systems

History of Operating System


▪ Concurrency and synchronization
운영체제 Operating Systems

History of Operating System


▪ Concurrency and synchronization
운영체제 Operating Systems

History of Operating System

Batch processing Multi-programming


Grouping of several
Ability of an OS to execute
processing jobs to be
multiple programs at the
executed one after another by
same time on a single
a computer without any user
processor machine
interaction
Slower Faster
CPU might stay without
CPU always performs a task
performing a task
Helps to minimize human Provides the maximum CPU
interaction and cost utilization
운영체제 Operating Systems

History of Operating System


▪ Time-sharing processing 1970s ~ 1980s
• Hardware cheap, humans expensive → Make efficient use of people’s time
• A logical extension of Batch-multiprogramming systems – the CPU switches
jobs so frequently that multiple users can interact with each job while it is
running, creating interactive computing
▫ Each user has at least one program executing in memory → process
▫ Response time < 1 sec.
• System clock generates interrupt
▫ At each clock, the system regained control and assigned the processor to
another job → time slicing
▫ Job & process scheduling (Round-robin)
• If processes don’t fit in memory, swapping moves them in and out to run
▫ Virtual memory and disk management

Batch multiprogramming Time sharing


Objective Maximize CPU utilization Minimize response time
Source of directives to Job control language commands Commands entered at the
OS provided with the job terminal
운영체제 Operating Systems

History of Operating System


▪ OS with Internet ~ 1990s
• Things got connected → Provide connected multimedia services for users
• OS with built-in Internet Access
▫ Internet protocols added to PC & OS
▫ Internet programming is important (Web, CGI, Java, ...)
▫ Computing system becomes more and more complex → OS also becomes
more and more complex (e.g., including a variety of functional modules)
• OS with Multimedia Support
▫ Demands lots of computer and network resources
▫ Human perception became the center of universe → QoS (Quality of Service),
RTOS (Real Time OS)
▪ New era ~ 2010s (OS as Commodity)
• Common OS used in desktop, mobile, could systems
• OS became software platform
▫ Android, iOS, webOS, …
운영체제 Operating Systems

History of Operating System


▪ Real time system
• System should be guaranteed within a specified timing constraint or
system should meet the specified deadline.
▫ (ex) Flight control system
• Hard real-time system
▫ Missing the deadline can cause disastrous (or catastrophic) consequences.
• Soft real-time system
▫ This type of system can miss its deadline occasionally with some
acceptably low probability. Missing the deadline have no disastrous
consequences.
▫ QoS (Quality of Service) in computing system

You might also like