CS代写 COMP1411: Introduction to Computer Systems – cscodehelp代写

PowerPoint Presentation

Lecture 12

Copyright By cscodehelp代写 加微信 cscodehelp

COMP1411: Introduction to Computer Systems
Dr. Xianjin XIA
Department of Computing,
The Hong Kong Polytechnic University
Spring 2022
These slides are only intended to use internally. Do not publish it anywhere without permission.
Acknowledgement: These slides are based on the textbook (Computer Systems: A Programmer’s Perspective) and its slides.

Overview of all the contents

Bus interface

Register file

System bus

Memory bus



Expansion slots for
other devices such
as network adapters

What are the actual programs running on computers?
Machine Language (LEC04, LEC05)
How CPUs are constructed? How machine codes are executed?
Processor Architecture (LEC06)
Running multiple programs on a computer
How data are stored and managed? Performance issues in memories?
Memory Hierarchy (LEC07)
Virtual Memory (LEC09)
How I/O devices are managed in computers?
System I/O (LEC10)
How computers are connected and communicate?
Network (LEC11)
How information are represented in computers
Data Representation (LEC02, LEC03)

Data representation (Integer)
Different bases to represent numbers
Binary, decimal, hex-decimal, and how to do conversion
Operations on binaries
Bit-level operations & | ^, logical operations, left/right shift
Encoding integers
Unsigned integer: B2U
Signed integer: B2T (Two’s complement)
Max and min values
Casting problems
The overflow problem
Byte ordering
Big endian, little endian (useful in machine codes, at least)

Data representation (Floating Point)
Representing fractional numbers
The IEEE floating point representation
Number conversion (decimal  floating point)
The rounding problem
Round to even
Unexpected computation results due to rounding
Conversion of different integer/floating point variables

Machine language
Why learning machine language?
To understand the REAL program running on a computer
Useful knowledge on performance tuning
Machine language (X86-64 for this course)
Basic instruction formats (e.g., movq)
Correct syntax for registers, memory addresses, immediate numbers, etc.
Size of different data types
Registers of X86-64
General purpose registers (64-bit, 32-bit, 16-bit, and 8-bit)
Special registers: conditional codes, PC

Machine language
Machine language (X86-64 for this course)
Basic operations
Moving data (different addressing modes)
Arithmetic operations
Pay attention to the source and destination registers
Shift operations for signed and unsigned data are different
Operations using conditional codes
The definition of conditional codes, in what cases a code is set
Using setX instructions to read conditional codes
Jump instructions & conditional move instructions
Pay attention to how the conditional codes are set
How branching, loop and switch program constructs are implemented with assembly instructions
Conversion between assembly codes and C programs

Processor architecture
Understanding how machine codes are constructed
Taking the Y86-64 ISA as an example
Conversion between machine code, assembly code and C code
Address computation
Logic gates – the fundamentals of a CPU
Circuit design – using logic gates to implement complex computations
Instruction execution stages
What is done in each stage
The execution of different Y86-64 machine/assembly codes
A general principle of performance improvement
Pipeline design for best performance
Throughput and latency, and their computation
Data hazard and stalling

Memory Hierarchy
Understanding memory performance
Different memory devices at different levels
How memory access slows down the instruction execution performance
Principle of locality
Temporal locality vs. spatial locality
Measuring and improving locality
Address computation
The basic idea of caching
How CPU fetch data in the presence of caches
How cache design parameters affect the efficiency of caches
Cache block size, replacement policy, associativity (more details in TUT09)

Understanding the motivations of concurrency
The concept of concurrency
The concept of process and its difference from program
The basic behaviors in multi-process execution
Parent and child processes
Understanding how fork() works
Writing concurrent programs with fork() and wait(), waitpid(), i.e., programs that have multiple processes that synchronize with each other
Draw the process graph for a concurrent program
Understanding all feasible outputs of a concurrent program

Virtual memory
Why virtual memory
To fit a large program into a relatively smaller memory device
Understanding virtual memory and physical memory
Address computation
The paging mechanism
Decomposing address space into pages
Page loading and replacement, page tables
Address translation under the paging mechanism (more details are given in Tutorial 11)

System-level I/O
Understanding I/O devices and how they are connected to a computer system
Programming with files
Understanding file operations provided by the OS and the programming language (standard libraries)
Understanding that OS typically treat I/O devices as files, for easy operation by the programmers and users
File programming
Open, close, read, write files
Understanding file descriptor and the basic principles that an OS assigns file descriptors to processes (descriptor table, open file table)

Understanding the basic concepts of LAN and WAN
So that you know how computers are connected
IP address + port number to address a specific process on a specific computer in the network
Can do basic socket programming

Final Exam
Date: Apr. 30, 2022
Time: 12:30 — 14:30
Venue: Home
Form: Open book


程序代写 CS代考 加微信: cscodehelp QQ: 2235208643 Email: kyit630461@163.com

Posted in Uncategorized

Leave a Reply

Your email address will not be published. Required fields are marked *