Download presentation
Presentation is loading. Please wait.
Published byKelley Murphy Modified over 9 years ago
1
ITFN 2601 Introduction to Operating Systems Lecture 2 Computer Hardware Review OS Concepts Overview
2
Agenda Flavors of OS Hardware Review OS Concepts Overview System Calls Various OS Approaches
3
Flavors of OS Mainframe Server Multiprocessor Personal Computer Real-Time Embedded Smart Card
4
Mainframe OS High-end I/O capacity 1000+ disks Gigabytes of data High-end web servers B2B (business to business) E-commerce High-speed VR/FMV Rendering Many small, simultaneous jobs
5
Server OS Large personal computers (kahuna, zidane, etc.) Print, file servers for small businesses Web servers Can load balance these to increase performance UNIX, Linux, Win2000 Server OS
6
Multiprocessor OS Connect multiple computers together Share/distribute jobs among multiple machines/processors Specialized protocols for managing communication Win2000 Advanced Server
7
Personal Computer OS Focus on single user, multiple jobs What you’re running on your machine Win9x, Win2000 Pro, Linux
8
Real-Time OS Time dominates these machines’ specs Data collection from production lines, factory machinery Hard real-time: time critical in all instances Soft real-time: OK to drop occasionally
9
Embedded OS Personal Digital Assistants TVs, microwaves, mobile phones Very small OS, embedded on chip PalmOS, WinCE
10
Smart Card OS Credit card sized devices Specialized OS for specialized purposes E-payment cards (e-cash cards) Some JVM coming into play
11
Hardware Review CPU Memory Display Controller Keyboard Controller Floppy Controller Hard Disk Controller Display Keyboard Floppy Hard Disk Bus
12
Hardware Review Processors Memory I/O Devices Bus
13
Processors Brain of the computer Fetch, decode, execute cycle Registers Program Counter (PC) Stack Pointer (SP) Pipelining improves performance, but complexities of “rolling back” appear Kernel vs. User Mode (enables establishing limitations of instruction set available)
14
Memory Trade off of speed vs. cost/size Registers (on processor) Cache (processor) Cache (mainboard) Main Memory Disk Other Network Cache/Machines Tape Speed decreases Cost increases
15
I/O Devices Typically consist of two parts: Controller Device Controller manages & presents the API of the device to the OS The software that “talks” to the controller is called a device driver
16
Memory Allocation We need a protective and fair way of allocating and resizing memory blocks for processes/jobs Two sections of memory Code (typically static) Data (volatile) OS Program Code User 1 Data User 2 Data Limit Base Limit Base Limit Base
17
Computer Memory The CPU is often referred to as the brain of the computer. This is where all the actual computing is done. The chipset supports the CPU. It usually contains several "controllers" which govern how information travels between the processor and other components in the system. Some systems have more than one chipset.
18
Computer Memory The memory controller is part of the chipset, and this controller establishes the information flow between memory and the CPU. A bus is a data path in a computer, consisting of various parallel wires to which the CPU, memory, and all input/output devices are connected. The memory bus runs from the memory controller to the computer's memory sockets
19
Computer Memory Memory speed is sometimes measured in Megahertz (MHz), or in terms of access time - the actual time required to deliver data - measured in nanoseconds (ns). A computer's system clock resides on the motherboard. It sends out a signal to all other computer components in rhythm, like a metronome. Cache memory is a relatively small amount (normally less than 1MB) of high speed memory that resides very close to the CPU. Cache memory is designed to supply the CPU with the most frequently requested data and instructions.
20
Invoking Device Actions Busy wait – execute a kernel-level system call and wait (ties up the processor ) Ask the device to generate an interrupt (signal that it’s done or failed) Doesn’t tie up the processor Adds complexity DMA – Direct Memory Access Bypasses the use of the processor Allows the device to write directly to memory once the “rules of the road” are established
21
Bus Communication “highway” for all data to travel upon Multiple buses exist in modern machines Cache (fastest) Local (on mainboard –other busses connect to it) Memory PCI (successor of ISA - high-speed I/O) SCSI (high-speed scanners & disks) USB (slow peripherals) IDE (disks, etc.) ISA (slowest – legacy)
22
OS Concepts Processes Deadlock Memory Management I/O Files Security
23
Processes Defined as a “program in execution” AKA a “job” Contain Instructions (code segment) SP, PC, registers, file handles Data segment Processes can spawn subprocesses & threads The OS must ensure fairness & protection, timeslicing & managing multiple processes at a time
24
Deadlock Two or more processes “stalemated” because they can’t make progress Process A Has resource 1 Waiting on resource 2 Process B Has resource 2 Waiting on resource 1
25
Memory Management Providing protection of one process’ memory section from another process (security) Providing a fair allocation of memory to multiple processes Swapping memory to disk as needed
26
Input/Output All OS must manage I/O devices Two categories: Device independent Device dependant (device drivers)
27
Files System calls Create, remove, read, write, etc. Directories & subdirectories Create, remove, rename, move, etc.
28
Security Allocate permissions Directories Files Example UNIX policies to consider: Read, Write, Execute User, Group, World
29
System Calls Services that the OS provides to the user Set of API that user-level programs may invoke Flavors of System Calls UNIX Win32
30
UNIX System Calls pid = fork()creates child process exit()terminates process fd = open(file, …)opens file s = mkdir(name, mode)creates directory s = chmod(name, mode)sets file/dir permissions s = kill(pid, signal)sends signal to process
31
Win32 System Calls CreateProcess(…)creates new process ExitProcess(…)terminates process CreateFile(…)opens file CreateDirectory(…)creates directory
32
Approaches to OS Monolithic Virtual Machines Client-Server (microkernel)
33
Monolithic OS Architecture OS written as a set of procedures Each procedure has well-defined interface (parameters) Very little structure or information hiding
34
Virtual Machine OS Architecture Replicate the hardware within software Trap OS calls and translate/handle them Breaks down if you make direct I/O calls Slow Other approach: JVM (define an alternate instruction set and translate to various OS)
35
Client-Server OS Architecture Implement as much as possible in user- level modules The OS is as small as possible It only serves to translate and message pass OS-level calls to service processes
36
Summary Various levels of OS complexities/sizes exist (mainframe to smart cards) Important to know your hardware Processors, memory, I/O, buses Important topics in OS forthcoming Processes, deadlock, mem mgmt, files, etc. System calls provide an API to user-level programs Varied OS architecture approaches Monolithic, VM, client-server
37
FIN
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.