Uploaded by josephat 25

RCS214 OS overview L001

advertisement
Operating System (OS)
RCS214/RAP216
8 credits
80 hours
What is computer?
• A computer is a device that accepts information (in the
form of digitalized data) and manipulates it for some
result based on a program, software, or sequence of
instructions on how the data is to be processed.
• That is a device that consists of
1. Hardware and
2. Software.
2
Software
• Software is a set of instructions, data or programs used
to operate computers and execute specific tasks. It is the
opposite of hardware, which describes the physical
aspects of a computer
• Software is used to control a computer.
• There are different types of software that can run on a
computer:
3
1. System software and
2. Application software.
3
1. System software.
• Think of software as a layers, the system software is the
bottom layer:
• It sits between the hardware and the application
software.
• Here we have
1. Operating System
2. Utility Software and
3. Programming Software
RCS207_1
4
4
1.1. Operating systems
• Operating systems like Windows, macOS,
Android and iOS are examples of system software
(OS).
• Operating systems are loaded into RAM when the
device starts up, and have access to the hard drive.
• Here we are: RCS214, RCS222
RCS207_1
5
5
1.2. Utility software
• Utility software is part of the system software and
performs specific tasks to keep the computer running.
• Utility software is always running in the background.
• Examples of utility software are security and
optimization programs.
• Security programs include anti-virus software that scans
and removes viruses.
• Most computers will include some sort of anti-virus
software, but you can add your own.
6
6
1.3. Programming Software
• Programming software, which provides the
programming tools for software developers need .
• Programming Software /Languages thus are responsible
on developing the other software such as Application
software, Os (example C programming)
• All programming Languages Courses follow here.
7
7
2. Application software
• This is everything else! Anything that is not an
operating system , PL or a utility is an application or app.
• So a word processor, spreadsheet, web browser, and
graphics software are all examples of application
software, and they can do many specific tasks.
RCS207_1
8
8
Aim of the course
• The aim of the course is to provide the basic theoretical
principles/concepts of operating systems :
1. Services offered,
2. Memory management,
3. Process management,
4. I/O management, and
5. Security.
• Provides the students with an overview of different types of operating
systems, components of operating system, and a thorough knowledge of
storage management.
9
Learning outcomes:
• Upon completion of this course, the students should be able to:
1. Understand the key concepts of modern operating systems;
2. Specify the trade-offs of different algorithms in operating system
design;
3. Apply the knowledge to system performance tuning and system
administration;
4. Contrast the wide spectrum of operating systems in different
10
platforms
Course Contents
1. Overview of computer system and operating system
2. Process Management, Process description and control, Process scheduling, Round-robin and priority
scheduling. Deadlocks: Characterization – Methods for Handling Deadlocks – Deadlocks Prevention –
Avoidance – Detection – Recovery. Threads, Symmetric Multiprocessing.
3. Memory Management, Partitioning, paging and segmentation, Virtual memory, Address translation and
page fault handling, Memory management hardware: page table and Translation Lookaside Buffer, Memory
management algorithms: fetch policy, replacement policy, resident set management and cleaning policy.
4. Input / Output Management and Disk Scheduling, I/O devices, Organization of I/O function, I/O
buffering.
5. Disk scheduling, RAID.
6. File Management, Organization: files and directories.
11
7. Secondary storage management, file systems: FAT and NTFS
Delivery and Assessment
• Lab work. Students to work and practice various operating systems (DOS,
WINDOWS, LINUX etc)
• Methods of Instructions: Direct Instruction, Individual & Group Work, and
Tutorials / Handouts
• Assessment:
1. Involve quiz, test, assignment, and presentation which carries 40%
12
2. End of semester examination which Carries
60%.
3. Total
100%
Readings
1. Silberrschatz at el (2004) Operating System Concept sixth Edition, John Wiley & Sons,
INC
2. William Stallings (2005). Operating Systems: Internals and Design Principles, 5th
edition. Prentice Hall
3. Deitel, H.M. (2003) Operating Systems, Second edition, Pearson Education
4. David A. Solomon, Mark Russinovich (2004). Microsoft Windows Internals, Fourth
Edition: Microsoft Windows Server(TM) 2003, Windows XP, and Windows 2000 (ProDeveloper). Microsoft Press.
5. Remy Card, Eric Dumas, Frank Mevel (1998). The Linux Kernel book. John Wiley &
13
Sons.
Operating System Overview
Overview Content:
15
1.
2.
3.
4.
5.
6.
7.
8.
9.
What is an OS.
What are its key functions.
Structure of Computer Systems
Storage Overview
Operating Systems mode
Starting Operating System(booting)
What are the popular types of OS.
Basics of UNIX and Windows.
Advantages of open source OS like Linux.
Operating System
What is an Operating System?
• Computer System = Hardware + Software
• Software = Application Software + System Software(OS)
• An Operating System is a system Software that acts as an
intermediary/interface between a user of a computer and the computer
hardware.
• Operating system goals:
 Execute user programs and make solving user problems easier
 Make the computer system convenient to use
 Use the computer hardware in an efficient manner
17
Operating System Definition
1.
OS is a resource allocator
– Manages all resources
– Decides between conflicting requests for efficient and fair
resource use
2. OS is a control program
– Controls execution of programs to prevent errors and
improper use of the computer
3.
OS is an Interface
– Interface between user and the computer
18
Structure of Computer Systems
The Structure of Computer Systems
20
 Accessing computer resources is divided into layers.
 Each layer is isolated and only interacts directly with the layer below or
above it.
 If we install a new hardware device
 No need to change anything about the user/applications.
 However, you do need to make changes to the operating system.
 You need to install the device drivers that the operating system will use
to control the new device.
 If we install a new software application
 No need to make any changes to your hardware.
 But we need to make sure the application is supported by the operating
system
 user will need to learn how to use the new application.
 If we change the operating system
 Need to make sure that both applications and hardware will compatible
with the new operating system.
Computer Architecture
21
Special busses (roads) connecting
all input/output devices to
motherboard.
CPU – Central Processing Unit
• This is the brain of your computer.
• It performs all of the calculations.
• In order to do its job, the CPU needs commands to perform,
and data to work with.
• The instructions and data travel to and from the CPU on the
system bus.
• The operating system provides rules for how that
information gets back and forth, and how it will be used by
the CPU.
22
RAM – Random Access Memory
 This is like a desk, or a workspace, where your computer temporarily stores all
of the information (data) and instructions (software or program code) that it is
currently using.
 Each RAM chip contains millions of address spaces.
 Each address space is the same size, and has its own unique identifying
number (address).
 The operating system provides the rules for using these memory spaces, and
controls storage and retrieval of information from RAM.
 Device drivers for RAM chips are included with the operating system.
Problem: If RAM needs an operating system to work, and an operating system needs RAM
in order to work, how does your computer activate its RAM to load the operating system?
23
I/O Structure
• After I/O starts, control returns to user program only
upon I/O completion
– Wait instruction idles the CPU until the next interrupt
– Wait loop (contention for memory access)
– At most one I/O request is outstanding at a time, no
simultaneous I/O processing
• After I/O starts, control returns to user program without
waiting for I/O completion
24
– System call – request to the OS to allow user to wait for I/O
completion
– Device-status table contains entry for each I/O device
indicating its type, address, and state
– OS indexes into I/O device table to determine device status
and to modify table entry to include interrupt
Storage Overview
Storage Definitions and Notation Review
•
•
•
•
•
•
•
•
26
The basic unit of computer storage is the bit.
A bit can contain one of two values, 0 and 1.
All other storage in a computer is based on collections of bits.
Given enough bits, it is amazing how many things a computer can represent:
numbers, letters, images, movies, sounds, documents, and programs, to name a few.
A byte is 8 bits, and on most computers it is the smallest convenient chunk of
storage.
For example, most computers don’t have an instruction to move a bit but do have
one to move a byte. A less common term is word, which is a given computer
architecture’s native unit of data.
A word is made up of one or more bytes. For example, a computer that has 64-bit
registers and 64-bit memory addressing typically has 64-bit (8-byte) words.
A computer executes many operations in its native word size rather than a byte at a
time.
Storage Definitions and Notation Review
• Computer storage, along with most computer throughput, is
generally measured and manipulated in bytes and collections of
bytes.
1.
2.
3.
4.
5.
27
A kilobyte, or KB, is 1,024 bytes
a megabyte, or MB, is 1,0242 bytes
a gigabyte, or GB, is 1,0243 bytes
a terabyte, or TB, is 1,0244 bytes
a petabyte, or PB, is 1,0245 bytes
• Computer manufacturers often round off these numbers and say
that a megabyte is 1 million bytes and a gigabyte is 1 billion bytes.
• Networking measurements are an exception to this general rule;
they are given in bits (because networks move data a bit at a
time).
Storage Structure
• Main memory – only large storage media that the CPU
can access directly
– Random access
– Typically volatile
• Secondary storage – extension of main memory that
provides large nonvolatile storage capacity
– Hard disks – rigid metal or glass platters covered with
magnetic recording material
• Disk surface is logically divided into tracks, which are subdivided into sectors
• The disk controller determines the logical interaction between the device and the
computer
– Solid-state disks – faster than hard disks, nonvolatile
28
• Various technologies
• Becoming more popular
Storage Hierarchy
• Storage systems organized in hierarchy
– Speed
– Cost
– Volatility
• Caching – copying information into faster storage system;
main memory can be viewed as a cache for secondary
storage
• Device Driver for each device controller to manage I/O
– Provides uniform interface between controller and kernel
29
Storage-Device Hierarchy
30
Caching
• Important principle, performed at many levels in a
computer (in hardware, operating system, software)
• Information in use copied from slower to faster storage
temporarily
• Faster storage (cache) checked first to determine if
information is there
– If it is, information used directly from the cache (fast)
– If not, data copied to cache and used there
• Cache smaller than storage being cached
31
– Cache management important design problem
– Cache size and replacement policy
.
Next: Operating System mode
Download