├── .gitattributes
├── .gitignore
├── .gitmodules
├── ArtificialIntelligence
├── 1_introduction.tex
├── 2.1_uninformed_search.tex
├── 2.2_heuristic_search.tex
├── 2.3_game_tree_search.tex
├── 3_CSP.tex
├── 4_knowledge_representation.tex
├── 5_planning.tex
├── 6_uncertainty.tex
├── 7_machine_learning.tex
├── README.md
├── fig
│ ├── FOL.png
│ ├── MGU.png
│ ├── T01-3.png
│ ├── T02-2.png
│ ├── UCS.png
│ ├── alpine_club_eg1.png
│ ├── alpine_club_eg2.png
│ ├── backtracking.png
│ ├── backtracking_eg.png
│ ├── blocking.png
│ ├── bucket_elimination.png
│ ├── count_actions.png
│ ├── d-separation_example.png
│ ├── diff_fc_gac.png
│ ├── forward_checking.png
│ ├── forward_checking_eg.png
│ ├── gac.png
│ ├── gac_eg.png
│ ├── gac_enforce.png
│ ├── game-tree.png
│ ├── interpretation.png
│ ├── refutation.png
│ └── relevance_example.png
├── main.pdf
└── main.tex
├── C-Programming
├── C-Structure.pdf
├── C-Structure.tex
├── Questions.txt
├── README.md
├── Slide01-C-Thm.pdf
├── Slide01-C-Thm.tex
├── Slide02-C-Questions.pdf
├── Slide02-C-Questions.tex
├── fig
│ ├── TIOBE.PNG
│ ├── aligned.pdf
│ ├── aligned.xml
│ ├── datatype.jpg
│ └── memoryLayoutC.jpg
└── mypackage.tex
├── Compilers
├── 1_introduction.tex
├── 2_lexical.tex
├── 3_syntax.tex
├── 4_semantic.tex
├── 5_runtime.tex
├── 6_codegen.tex
├── README.md
├── fig
│ ├── AST.png
│ ├── LR1-eg.jpg
│ ├── T06.pdf
│ ├── T07-1.pdf
│ ├── T07-2.pdf
│ ├── compiler_flow.jpg
│ ├── copying_collector.jpg
│ ├── dag-1.pdf
│ ├── dag-2.pdf
│ ├── follow_eg1.jpg
│ ├── follow_eg2.jpg
│ ├── mark_and_compact.jpg
│ ├── reference_counting.jpg
│ ├── shift-reduce.jpg
│ ├── stack.jpg
│ └── three-addr-code-dag.jpg
├── main.pdf
└── main.tex
├── ComputerNetworking
├── 1_introduction.tex
├── 2_physical_layer.tex
├── 3_data_link_layer.tex
├── 4_network_layer.tex
├── 5_transport_layer.tex
├── 6_application_layer.tex
├── 7_summary.tex
├── README.md
├── fig
│ ├── 802-11-frame-2.png
│ ├── 802-11-frame-3.png
│ ├── 802-11-frame.png
│ ├── 802-11.png
│ ├── ARP.PNG
│ ├── CRC.PNG
│ ├── EUI-64.png
│ ├── FTP.png
│ ├── IP_datagram.png
│ ├── LSA-graph.png
│ ├── MOSPF.png
│ ├── NLRI.png
│ ├── PPP.PNG
│ ├── SACK.PNG
│ ├── SMTP.png
│ ├── TCP-transition.PNG
│ ├── TCP-window.PNG
│ ├── TCP.PNG
│ ├── auto-MDIX.png
│ ├── bridge.jpg
│ ├── checksum.PNG
│ ├── conflict_count.jpg
│ ├── congression-AIMD.PNG
│ ├── congression-slow-start.PNG
│ ├── dns-example.png
│ ├── extended-LAN.png
│ ├── go-back-n.png
│ ├── http-msg.png
│ ├── http-respond.png
│ ├── ieee802.PNG
│ ├── ip-packet.png
│ ├── ip_mac.png
│ ├── ipencap.png
│ ├── ipv6-format.png
│ ├── ipv6-group-broadcast.png
│ ├── ipv6-network-prefix.png
│ ├── mac_address.jpg
│ ├── multicast.png
│ ├── my-router-table.png
│ ├── nagle.PNG
│ ├── network-flow.PNG
│ ├── network-headers.pdf
│ ├── network-manchester.pdf
│ ├── network.drawio
│ ├── next-header.png
│ ├── non-pipelining-http.png
│ ├── ospf_example.jpg
│ ├── ospf_lsa.jpg
│ ├── out-of-band.png
│ ├── pipelining-http.png
│ ├── protocol_family.png
│ ├── reverse_path_broadcasting.png
│ ├── rip_timer.png
│ ├── route_all_example.jpg
│ ├── router_table_example.jpg
│ ├── selective-repeat.png
│ ├── spanning_tree.jpg
│ ├── switch-crossbar.png
│ ├── switch-share.png
│ ├── switch.png
│ ├── tcp_close.png
│ ├── tcp_connect.png
│ ├── tcp_example.jpg
│ ├── tcp_format.png
│ ├── token-ring.png
│ ├── udp_format.png
│ ├── v4-to-v6.png
│ ├── virtual_circuit.png
│ ├── vlan.jpg
│ └── wlan-example.png
├── main.pdf
└── main.tex
├── ComputerOrganization
├── 0_introduction.tex
├── 1_data_representation.tex
├── 2_instruction_system.tex
├── 3_arithmetic.tex
├── 4_processor.tex
├── 5_memory.tex
├── 6_io.tex
├── 7_bus.tex
├── Lectures
│ ├── Slide00-Introduction.pdf
│ ├── Slide00-Introduction.tex
│ ├── Slide01-Digital_Circuits.tex
│ ├── Slide02-Processors.pdf
│ ├── Slide02-Processors.tex
│ └── fig
│ │ ├── Lecture1
│ │ ├── boolean_algebra.PNG
│ │ ├── boolean_algebra_axioms.PNG
│ │ ├── boolean_algebra_law.PNG
│ │ ├── boolean_to_logic_gate.PNG
│ │ ├── delay_vs_size.PNG
│ │ ├── digit_analog_comparison.PNG
│ │ ├── noise_margin.PNG
│ │ ├── organization.PNG
│ │ └── type_of_digital_circuits.PNG
│ │ └── Lecture2
│ │ ├── 1bit-ff.jpg
│ │ ├── 3-8decoder.jpg
│ │ ├── 8-1mux.jpg
│ │ ├── 8bit-latch.jpg
│ │ ├── 8bit-latch_2.jpg
│ │ ├── Abstraction-Computation.pdf
│ │ ├── Abstraction-FA.pdf
│ │ ├── Abstraction-Function_Call.pdf
│ │ ├── Abstraction-HA.pdf
│ │ ├── Abstraction-Processor.pdf
│ │ ├── Abstraction-nFA.pdf
│ │ ├── Abstraction.xml
│ │ ├── Core-i7-cache.jpg
│ │ ├── Datapath-All.pdf
│ │ ├── Datapath-Control-signals.pdf
│ │ ├── Datapath-Multi-State.pdf
│ │ ├── Datapath-Multi.pdf
│ │ ├── Datapath-PC.pdf
│ │ ├── Datapath-Princeton.pdf
│ │ ├── Datapath-R-I.pdf
│ │ ├── Datapath-R-I_2.pdf
│ │ ├── Datapath-R-R.pdf
│ │ ├── Datapath-State.pdf
│ │ ├── Datapath-branch.pdf
│ │ ├── Datapath-jal.pdf
│ │ ├── Datapath-jalr.pdf
│ │ ├── Datapath-lw.pdf
│ │ ├── Datapath-sw.pdf
│ │ ├── Datapath.xml
│ │ ├── MIPS.pdf
│ │ ├── Von-Neumann-Architecture-Diagram.jpg
│ │ ├── Von_Neumann_Architecture.png
│ │ ├── aligned.PNG
│ │ ├── b-imm.PNG
│ │ ├── base32.PNG
│ │ ├── branch.PNG
│ │ ├── clock_1.PNG
│ │ ├── clock_rate-vs-cpi.PNG
│ │ ├── d-ff.png
│ │ ├── d-ff_2.jpg
│ │ ├── d-latch.png
│ │ ├── ff_1.jpg
│ │ ├── ff_2.jpg
│ │ ├── ff_3.jpg
│ │ ├── ff_4.jpg
│ │ ├── general_registers.PNG
│ │ ├── halting_problem.png
│ │ ├── i-imm.PNG
│ │ ├── imm.PNG
│ │ ├── j-imm.PNG
│ │ ├── jal.PNG
│ │ ├── jalr.PNG
│ │ ├── lambda_formula.jpg
│ │ ├── lambda_formula_2.jpg
│ │ ├── lw-sw.PNG
│ │ ├── lw.PNG
│ │ ├── memoryLayoutC.jpg
│ │ ├── memory_addressing.PNG
│ │ ├── misc-mem.PNG
│ │ ├── nop.PNG
│ │ ├── opcode_map.PNG
│ │ ├── overview.PNG
│ │ ├── processor_performance-2.PNG
│ │ ├── processor_performance.PNG
│ │ ├── program_compilation_overview.PNG
│ │ ├── r-i.PNG
│ │ ├── r-i_2.PNG
│ │ ├── r-r.PNG
│ │ ├── register_files.PNG
│ │ ├── rvi_formats.PNG
│ │ ├── rvi_formats_complex.PNG
│ │ ├── sr-latch.jpg
│ │ ├── sw.PNG
│ │ ├── system.PNG
│ │ └── turing_machine.jpg
├── README.md
├── fig
│ ├── Arithmetic-Division.pdf
│ ├── Arithmetic-Mulplication.pdf
│ ├── Arithmetic.xml
│ ├── Cache-combine.pdf
│ ├── Cache-page.pdf
│ ├── Cache-page_address.pdf
│ ├── Cache.xml
│ ├── Datapath-Multi-cycle.pdf
│ ├── Datapath.xml
│ ├── Datapath_All.pdf
│ ├── Datapath_add.pdf
│ ├── Datapath_beq.pdf
│ ├── Datapath_jump.pdf
│ ├── Datapath_lw.pdf
│ ├── Datapath_ori.pdf
│ ├── Datapath_sw.pdf
│ ├── Memory-Double_Decode.pdf
│ ├── Memory.xml
│ ├── basic_datapath.PNG
│ ├── microinstruction.png
│ ├── schedule.pdf
│ ├── schedule.xml
│ ├── sram_cycle.png
│ ├── word-capacity.PNG
│ └── word-length.PNG
├── main.pdf
└── main.tex
├── DatabaseSystems
├── 10_recovery.tex
├── 1_introduction.tex
├── 2_sql_intro.tex
├── 3_high-level_sql.tex
├── 4_relational_algebra.tex
├── 5_ER-model.tex
├── 6.5_storage.tex
├── 6_database_design.tex
├── 7_index.tex
├── 8_transaction.tex
├── 9_concurrency.tex
├── README.md
├── fig
│ ├── E-R-figure.png
│ ├── RAID.png
│ ├── b-tree.png
│ ├── bitmap.png
│ ├── bp-tree.png
│ ├── bp-tree_deletion.png
│ ├── bp-tree_deletion2.png
│ ├── bp-tree_deletion3.png
│ ├── bp-tree_deletion_alg.png
│ ├── bp-tree_file_organization.png
│ ├── bp-tree_insertion.png
│ ├── bp-tree_insertion2.png
│ ├── bp-tree_insertion3.png
│ ├── checkpoints_eg.png
│ ├── conflict_serializability.png
│ ├── deadlock.jpg
│ ├── dense_sparse_indexing.png
│ ├── extendable_hash.png
│ ├── extendable_hash_eg.png
│ ├── free_lists.png
│ ├── hash_index.png
│ ├── lock_table.png
│ ├── mapping_radix.png
│ ├── multilevel-index.png
│ ├── multitable_clustering.png
│ ├── recovery.png
│ ├── relationship_set(description).png
│ ├── relationship_set.png
│ ├── slotted_page.png
│ ├── transaction_state.png
│ ├── tree_protocol.png
│ ├── university_E-R.png
│ ├── university_schema_diagram.png
│ ├── variable-length.png
│ ├── view_of_data.png
│ └── wait-for_graph.png
├── main.pdf
└── main.tex
├── DeepLearning
├── 1_introduction.tex
├── 2_ann.tex
├── 3_optimization.tex
├── 4_issues.tex
├── 5_segmentation.tex
├── README.md
├── dl.bib
├── fig
│ ├── deconvolution.jpg
│ ├── deeplabv1.jpg
│ ├── deeplabv2.jpg
│ ├── deeplabv3+.jpg
│ ├── deeplabv3.jpg
│ ├── dilated_convolution.png
│ ├── dl_flowchart.jpg
│ ├── dl_venn.jpg
│ ├── dropout.jpg
│ ├── encoder-decoder.jpg
│ ├── fcn.jpg
│ ├── gd_catalog.jpg
│ ├── lenet.png
│ ├── mlp.png
│ ├── neuron_model.png
│ ├── normalization.jpg
│ ├── pspnet.jpg
│ ├── residual_block.jpg
│ └── unet.jpg
├── main.pdf
└── main.tex
├── DigitalCircuits
├── 1_introduction.tex
├── 2_integrated_circuit.tex
├── 3_combinitorial_circuit.tex
├── 4_sequential_circuit.tex
├── 5_circuit_design.tex
├── README.md
├── fig
│ ├── 12system_protues.PNG
│ ├── 12system_state.pdf
│ ├── 12system_wave.PNG
│ ├── 555timer.jpg
│ ├── 74hc163.PNG
│ ├── 74ls93.PNG
│ ├── JK_flip-flop.png
│ ├── Karnaugh_12system.pdf
│ ├── Karnaugh_example.png
│ ├── Karnaugh_graph.png
│ ├── adder.jpg
│ ├── circuit_machine.xml
│ ├── cmos.PNG
│ ├── cmos_ex.PNG
│ ├── comparator.jpg
│ ├── counter.jpg
│ ├── decoder.jpg
│ ├── design_flow.png
│ ├── encoder.jpg
│ ├── flip-flops.png
│ ├── frequency_divisor.jpg
│ ├── johnson.jpg
│ ├── latches.pdf
│ ├── latches.xml
│ ├── logic_gates.PNG
│ ├── mealy_machine.pdf
│ ├── moore_machine.pdf
│ ├── multiplexer.jpg
│ ├── nonideal_pulse_characteristics.jpg
│ ├── one-shot.jpg
│ ├── parallel_adder.jpg
│ ├── ring_counter.jpg
│ ├── three_gates.PNG
│ ├── timer.PNG
│ ├── ttl.PNG
│ ├── ttl_ex.PNG
│ ├── word-capacity.PNG
│ └── word-length.PNG
├── main.pdf
└── main.tex
├── DigitalImageProcessing
├── 1_introduction.tex
├── 2_image_enhancement.tex
├── 3_frequency_domain.tex
├── 4_restoration.tex
├── 5_colorful_images.tex
├── 6_morphological_images.tex
├── 7_image_segmentation.tex
├── 8_representation.tex
├── README.md
├── fig
│ ├── BSF.png
│ ├── Laplacian.png
│ ├── LoG.png
│ ├── MPP.png
│ ├── adjacency.png
│ ├── bitmap-dollars.png
│ ├── bitmap.png
│ ├── boundary_tracing.png
│ ├── canny-margin.png
│ ├── chain_code.png
│ ├── chain_code_difference.png
│ ├── closing.png
│ ├── complements.png
│ ├── convex_hull_SE.png
│ ├── convolution_and_correlation.png
│ ├── differential.png
│ ├── dilation.png
│ ├── edge_detect_noise.png
│ ├── edge_detect_op.png
│ ├── edge_model.png
│ ├── enhancement.png
│ ├── erosion.png
│ ├── eye.png
│ ├── filter_pass.png
│ ├── fourier_descriptor.png
│ ├── fourier_spectrum.png
│ ├── granulometry.png
│ ├── high-boost.png
│ ├── histogram-normalization.png
│ ├── histogram-quality.png
│ ├── hit-or-miss.png
│ ├── homo_filter.png
│ ├── hough.png
│ ├── hough2.png
│ ├── impulse.png
│ ├── laplacian_mask.png
│ ├── line_approx.png
│ ├── line_detect.png
│ ├── noise.png
│ ├── notch.png
│ ├── nyquist.png
│ ├── opening.png
│ ├── polygon_boundary.png
│ ├── pseudo-contour.png
│ ├── region_segmentation.png
│ ├── restoration.png
│ ├── rgb_and_cmyk.png
│ ├── salt-and-pepper-noise.png
│ ├── shape_number.png
│ ├── signature.png
│ ├── simultaneous-contrast.png
│ ├── skeletons.png
│ ├── skeletons2.png
│ ├── sobel_and_robert.png
│ ├── spectrum_angle_example.png
│ ├── statistical_moment.png
│ ├── texture_segment.png
│ ├── top-hat.png
│ ├── trans-by-cases.png
│ ├── trans-cut.png
│ ├── trans-gamma.png
│ ├── trans-inverse.png
│ ├── trans-log.png
│ ├── trans-power.png
│ ├── undershoot-overshoot.png
│ └── webb.png
├── main.pdf
└── main.tex
├── MachineLearning
├── 10_dimension_reduction.tex
├── 11_feature_selection.tex
├── 12_semi-supervised.tex
├── 13_recommendation_system.tex
├── 1_introduction.tex
├── 2_basic_concepts.tex
├── 3_linear_model.tex
├── 4_decision_tree.tex
├── 5_neural_network.tex
├── 6_svm.tex
├── 7_bayesian.tex
├── 8_ensemble_learning.tex
├── 9_clustering.tex
├── README.md
├── fig
│ ├── A-Look-at-Machine-Learning-Evolution.png
│ ├── AGNES.jpg
│ ├── BP.png
│ ├── DBSCAN.jpg
│ ├── DT-boundary.png
│ ├── ID3.png
│ ├── LDA.png
│ ├── LLE.png
│ ├── LeNet.png
│ ├── MP-neuron.png
│ ├── SVM.png
│ ├── SVR.png
│ ├── TSVM.png
│ ├── adaboost.jpg
│ ├── attention.png
│ ├── bert.png
│ ├── bias-var.png
│ ├── decision_tree.jpg
│ ├── ensemble-learning.png
│ ├── kNN.png
│ ├── linear-separable.png
│ ├── multihead.png
│ ├── multivar-DT.png
│ ├── perceptron.png
│ ├── semi-supervised_learning.jpg
│ ├── soft-margin-loss.png
│ ├── stacking.jpg
│ ├── transformer.png
│ └── xor-nonlinear.png
├── main.pdf
├── main.tex
└── reference.tex
├── MathematicalLogic
├── 1_propositional_logic.tex
├── 2_predicate_logic.tex
├── 3_verification.tex
├── 4_program_verification.tex
├── 5_modal_logic.tex
├── 6_bdd.tex
├── README.md
├── fig
│ ├── bdd_limitation.jpg
│ ├── bdd_reduction1.jpg
│ ├── bdd_reduction2.jpg
│ ├── bdd_reduction3.jpg
│ ├── free_bound_var.jpg
│ ├── kripke_model.jpg
│ ├── ltl_ctl.jpg
│ ├── mutual_exclusion.jpg
│ ├── parse_tree_dag_eg.jpg
│ ├── reduce_alg.jpg
│ ├── restrict_alg.jpg
│ ├── shortcut_bdd.jpg
│ ├── transition_system.jpg
│ └── well-formed_formula.jpg
├── main.pdf
└── main.tex
├── NaturalLanguageProcessing
├── 1_introduction.tex
├── 2_cut.tex
├── 3_model.tex
├── 4_syntax.tex
├── 5_question_and_answering.tex
├── 6_machine_translation.tex
├── README.md
├── fig
│ ├── CFG.png
│ ├── PCFG.png
│ ├── RNN.png
│ ├── attention.png
│ ├── best_path.png
│ ├── chart_parsing.png
│ ├── chart_parsing_2.png
│ ├── chart_parsing_3.png
│ ├── dependency_parser.png
│ ├── dependency_tree.png
│ ├── entropy.png
│ ├── example-based_mt.png
│ ├── max_matching.png
│ ├── n-gram.png
│ ├── projective.png
│ ├── rule-based_mt.png
│ ├── word_pos_labeling.png
│ └── word_seq_labeling.png
├── main.pdf
└── main.tex
├── OperatingSystems
├── 1_introduction.tex
├── 2_processes.tex
├── 3_threads.tex
├── 4_concurrrency.tex
├── 5_deadlock.tex
├── 6_memory.tex
├── 7_scheduling.tex
├── 8_IO.tex
├── 9_file_system.tex
├── README.md
├── fig
│ ├── 5-state-process-model.jpg
│ ├── C_memory.jpg
│ ├── OS.drawio
│ ├── OS.pdf
│ ├── SPOOLing.png
│ ├── TLB.png
│ ├── VRR.png
│ ├── deadlock.png
│ ├── deadlock2.png
│ ├── dynamic_partition.png
│ ├── feedback.png
│ ├── kernels.png
│ ├── memory_address_transformation.png
│ ├── process_scheduling.png
│ ├── relocation.png
│ ├── resource_graph.png
│ ├── short-term-scheduling-all-2.png
│ ├── short-term-scheduling-all.png
│ ├── threads.png
│ └── two-level_paging.png
├── main.pdf
└── main.tex
├── PatternRecognition
├── 1_introduction.tex
├── 2_bayesian.tex
├── 3_maximum_likelihood.tex
├── 4_non-param.tex
├── 5_linear_discriminant.tex
├── 6_neural_network.tex
├── 7_stochastic_methods.tex
├── README.md
├── appendices.tex
├── fig
│ ├── Fisher.png
│ ├── SVM.png
│ ├── bayesian_decision.png
│ ├── bayesian_est.png
│ ├── biased_ML_Gaussian.png
│ ├── boltzmann_learning.png
│ ├── covariance_matrix.png
│ ├── forward_propagation.png
│ ├── kNN_error_bound.png
│ ├── kn-neighbor.png
│ ├── linear_decision_boundary.png
│ ├── nearest_neighbors.png
│ ├── simulated_annealing.png
│ ├── soft_margin.png
│ ├── stochastic_opt_problem.png
│ └── vc_dimension.png
├── main.pdf
└── main.tex
└── README.md
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "mylatextmpl"]
2 | path = mylatextmpl
3 | url = https://github.com/chhzh123/mylatextmpl
4 |
--------------------------------------------------------------------------------
/ArtificialIntelligence/1_introduction.tex:
--------------------------------------------------------------------------------
1 | % !TEX root = main.tex
2 |
3 | \section{简介}
4 | \subsection{概述}
5 | \begin{itemize}
6 | \item 1997 Deep Blue
7 | \item 2011 IBM Watson
8 | \item 2016 Google DeepMind
9 | \end{itemize}
10 |
11 | 什么是AI?
12 | \begin{itemize}
13 | \item 像人类一样思考(thinking humanly):中文屋子
14 | \item 理智思考(thinking rationally)
15 | \item 像人类一样行为(acting humanly):图灵测试(1950)
16 | \item 理智行为(acting rationally)
17 | \end{itemize}
18 |
19 | 常见术语
20 | \begin{itemize}
21 | \item 强AI:机器像人类一样思考
22 | \item 弱AI:机器有智能的行为
23 | \item 通用AI(AGI):能够解决任何问题
24 | \item 窄AI:专注于某一特定任务
25 | \end{itemize}
26 |
27 | 不以模拟人类作为实现人工智能的最好方法
28 | \begin{itemize}
29 | \item 计算机和人类的体系结构不同:数值计算、视觉、并行处理
30 | \item 对人类大脑的了解太少了!
31 | \end{itemize}
32 |
33 | \subsection{历史}
34 | \begin{itemize}
35 | \item 1950-70: Early excitement, great expections
36 | \begin{itemize}
37 | \item Samuel(1952)跳棋程序
38 | \item Newell(1955)逻辑理论家
39 | \item Dartmouth会议(1956):AI诞生
40 | \end{itemize}
41 | \item 1970-90: Knowledge is power
42 | \item 1990-: rise of machine learning "AI Spring"
43 | \item 2010-: Deep learning
44 | \end{itemize}
--------------------------------------------------------------------------------
/ArtificialIntelligence/README.md:
--------------------------------------------------------------------------------
1 | # Artificial Intelligence
2 |
3 | 人工智能笔记,所用教材Stuart Russell, Peter Norvig, *Artificial Intelligence: A Modern Approach (3rd ed)*
--------------------------------------------------------------------------------
/ArtificialIntelligence/fig/FOL.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ArtificialIntelligence/fig/FOL.png
--------------------------------------------------------------------------------
/ArtificialIntelligence/fig/MGU.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ArtificialIntelligence/fig/MGU.png
--------------------------------------------------------------------------------
/ArtificialIntelligence/fig/T01-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ArtificialIntelligence/fig/T01-3.png
--------------------------------------------------------------------------------
/ArtificialIntelligence/fig/T02-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ArtificialIntelligence/fig/T02-2.png
--------------------------------------------------------------------------------
/ArtificialIntelligence/fig/UCS.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ArtificialIntelligence/fig/UCS.png
--------------------------------------------------------------------------------
/ArtificialIntelligence/fig/alpine_club_eg1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ArtificialIntelligence/fig/alpine_club_eg1.png
--------------------------------------------------------------------------------
/ArtificialIntelligence/fig/alpine_club_eg2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ArtificialIntelligence/fig/alpine_club_eg2.png
--------------------------------------------------------------------------------
/ArtificialIntelligence/fig/backtracking.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ArtificialIntelligence/fig/backtracking.png
--------------------------------------------------------------------------------
/ArtificialIntelligence/fig/backtracking_eg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ArtificialIntelligence/fig/backtracking_eg.png
--------------------------------------------------------------------------------
/ArtificialIntelligence/fig/blocking.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ArtificialIntelligence/fig/blocking.png
--------------------------------------------------------------------------------
/ArtificialIntelligence/fig/bucket_elimination.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ArtificialIntelligence/fig/bucket_elimination.png
--------------------------------------------------------------------------------
/ArtificialIntelligence/fig/count_actions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ArtificialIntelligence/fig/count_actions.png
--------------------------------------------------------------------------------
/ArtificialIntelligence/fig/d-separation_example.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ArtificialIntelligence/fig/d-separation_example.png
--------------------------------------------------------------------------------
/ArtificialIntelligence/fig/diff_fc_gac.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ArtificialIntelligence/fig/diff_fc_gac.png
--------------------------------------------------------------------------------
/ArtificialIntelligence/fig/forward_checking.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ArtificialIntelligence/fig/forward_checking.png
--------------------------------------------------------------------------------
/ArtificialIntelligence/fig/forward_checking_eg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ArtificialIntelligence/fig/forward_checking_eg.png
--------------------------------------------------------------------------------
/ArtificialIntelligence/fig/gac.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ArtificialIntelligence/fig/gac.png
--------------------------------------------------------------------------------
/ArtificialIntelligence/fig/gac_eg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ArtificialIntelligence/fig/gac_eg.png
--------------------------------------------------------------------------------
/ArtificialIntelligence/fig/gac_enforce.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ArtificialIntelligence/fig/gac_enforce.png
--------------------------------------------------------------------------------
/ArtificialIntelligence/fig/game-tree.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ArtificialIntelligence/fig/game-tree.png
--------------------------------------------------------------------------------
/ArtificialIntelligence/fig/interpretation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ArtificialIntelligence/fig/interpretation.png
--------------------------------------------------------------------------------
/ArtificialIntelligence/fig/refutation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ArtificialIntelligence/fig/refutation.png
--------------------------------------------------------------------------------
/ArtificialIntelligence/fig/relevance_example.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ArtificialIntelligence/fig/relevance_example.png
--------------------------------------------------------------------------------
/ArtificialIntelligence/main.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ArtificialIntelligence/main.pdf
--------------------------------------------------------------------------------
/ArtificialIntelligence/main.tex:
--------------------------------------------------------------------------------
1 | \documentclass{note}
2 | \usepackage[cpp,table,pseudo]{mypackage}
3 | \usepackage{footnote}
4 | \makesavenoteenv{tabular}
5 |
6 | \renewcommand{\thefootnote}{\fnsymbol{footnote}}
7 | \newenvironment{bayesian}{\begin{center}\begin{tikzcd}[cells={nodes={draw=black, circle}}]}{\end{tikzcd}\end{center}}
8 |
9 | \def\Ent{\mathrm{Ent}}
10 |
11 | \title{人工智能笔记}
12 | \author{陈鸿峥}
13 | \date{{\builddatemonth\today}\protect\footnote{\text{Build \builddate\today}}} % protect!
14 |
15 | \setcounter{secnumdepth}{5}
16 |
17 | \begin{document}
18 |
19 | \maketitle
20 | \renewcommand{\thefootnote}{\arabic{footnote}}
21 | \setcounter{footnote}{0}
22 |
23 | \setcounter{tocdepth}{2}%设置深度
24 | \tableofcontents
25 |
26 | \bigskip\bigskip
27 |
28 | 本课程主要选用Stuart Russell和Peter Norvig的《人工智能---一种现代化方法》(Artificial Intelligence: A Modern Approach)一书,理论及实验作业请见\url{https://github.com/chhzh123/Assignments/tree/master/ArtificalIntelligence},内容非常详实,基本涵盖了人工智能的几大板块。
29 |
30 | \input{1_introduction}
31 | \input{2.1_uninformed_search}
32 | \input{2.2_heuristic_search}
33 | \input{2.3_game_tree_search}
34 | \input{3_CSP}
35 | \input{4_knowledge_representation}
36 | \input{5_planning}
37 | \input{6_uncertainty}
38 | \input{7_machine_learning}
39 |
40 | \end{document}
--------------------------------------------------------------------------------
/C-Programming/C-Structure.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/C-Programming/C-Structure.pdf
--------------------------------------------------------------------------------
/C-Programming/README.md:
--------------------------------------------------------------------------------
1 | # C Programming
2 |
3 | C语言基本理论知识介绍,用于上课
--------------------------------------------------------------------------------
/C-Programming/Slide01-C-Thm.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/C-Programming/Slide01-C-Thm.pdf
--------------------------------------------------------------------------------
/C-Programming/Slide02-C-Questions.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/C-Programming/Slide02-C-Questions.pdf
--------------------------------------------------------------------------------
/C-Programming/fig/TIOBE.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/C-Programming/fig/TIOBE.PNG
--------------------------------------------------------------------------------
/C-Programming/fig/aligned.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/C-Programming/fig/aligned.pdf
--------------------------------------------------------------------------------
/C-Programming/fig/aligned.xml:
--------------------------------------------------------------------------------
1 | 7ZvLcpswGIWfxsvMIAQClombppuuvPCyI4MwajFyQK7tPn2FETEIMr2MsIiSleHXBek7GM6ZsRdwuTs9lXiffWUJyReuk5wW8NPCdYHnIvFRV85NJQiiprAtaSI7XQsr+ovIoiOrB5qQqteRM5Zzuu8XY1YUJOa9Gi5Ldux3S1nev+oeb8mgsIpxPqyuacKzphq6wbX+hdBt1l4ZILm/HW47y51UGU7YsVOCjwu4LBnjzdHutCR5Da/l0oz7/Erry8JKUvC/GbD+7p5BtQE+T/0o/hasn1f0Ts7yE+cHuWG5WH5uCZTsUCSknsRZwIdjRjlZ7XFctx6F5qKW8V0uzoA4TGmeL1nOystYmGASprGoV7xkP0inBcUh2aSiZbiNdk2k5OTUKcltPRG2I7w8iy5tK5KI5T0GWuTHjmKylHXE8mQNy3tk+zLzFaM4kCT/gaprA9UXPHOhCm2gCt2ZUfVsoOo5M6PqW0E1nBlVZANVf25vq8AGqmhub6vQBqrB3N5WkQ1UVb8aGobaZq23TVX1q8apWpGtVL9qnKoV2Ur1q8apWpGtVL9qnKoV2Ur1q8apWpGtVL9qnKoV2Ur1q8apTpyt0jR141GqCdogH03jVz3TVCfOVrehqvpV41Qnzla3oar6VdNU2+W8baqqXzVOVXe20sEonBkj3UlJAyPVSxpnpDv3aGCkOkPjjHSnGA2MVJ9nnNHEmYSAxCfB2FM+QgHEE/k81zGNVXco0QBJtW3mIU2eMQh6xWEE0cZxpvFt5rFOHjJugVU1buaxjqUMlPMaEBPb7PJFzwfWNtxVl5+G3YsOAsnp2iiOtvUnrQc3E4mFNXM1LQPZBDve16avQcEKoggmSzin20KcxkIRIuoPtRI0xvm9bNjRJKkvM3oz9G8XHQ9s0FfXH4rrjYjrTiUuHAs7OsRN2GEjxr03faO+vNFQXnRTecdS14e8uuQF0LS+Y06/0aTa4+L/9Y0zXHbUbSazXV0QKK9eYFresZCi4+uLvLsNfX9v38GPDof6gtsKPBaXdAgM3Q+Bu99ocwqPZT0dT+gqYyV/d49oCP/8iAaaHLQ4vf7X49LW+ccMfPwN
--------------------------------------------------------------------------------
/C-Programming/fig/datatype.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/C-Programming/fig/datatype.jpg
--------------------------------------------------------------------------------
/C-Programming/fig/memoryLayoutC.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/C-Programming/fig/memoryLayoutC.jpg
--------------------------------------------------------------------------------
/Compilers/1_introduction.tex:
--------------------------------------------------------------------------------
1 | % !TEX root = main.tex
2 |
3 | 本课程采用书目Alfred V. Aho, Monica S. Lam, Ravi Sethi, Jeffrey D. Ullman, \emph{Compilers: Principles, Techniques \& Tools (2nd ed)},即大名鼎鼎的龙书。
4 | 同时也参考了\href{http://web.stanford.edu/class/cs143/}{Stanford CS143: Compilers}这门课程。
5 |
6 | \section{简介}
7 | 编译器的几个阶段如下,前端包括词法(lexical)、语法(syntax)、语义(semantic)分析,中端IR生成、优化,后端代码生成。
8 | \begin{figure}[H]
9 | \centering
10 | \includegraphics[width=0.6\linewidth]{fig/compiler_flow.jpg}
11 | \end{figure}
12 |
13 | 编程语言设计的思想:
14 | \begin{itemize}
15 | \item 抽象(abstraction):核心在于信息隐藏(infomation hiding),只把必要的暴露出来
16 | \item 类型(types):表达抽象、查出常见错误、使程序安全
17 | \item 重用(reuse):开发软件系统中常见的模式(类型参数化、类与继承)
18 | \end{itemize}
--------------------------------------------------------------------------------
/Compilers/5_runtime.tex:
--------------------------------------------------------------------------------
1 | % !TEX root = main.tex
2 |
3 | \section{运行时系统}
4 | \subsection{存储管理}
5 | \begin{figure}[H]
6 | \centering
7 | \includegraphics[width=0.5\linewidth]{fig/stack.jpg}
8 | \end{figure}
9 |
10 | \subsection{垃圾回收}
11 | \begin{itemize}
12 | \item 引用计数(reference counting):创建加1,删除减1
13 | \begin{itemize}
14 | \item 简单、立即增量式回收
15 | \item 不能回收循环引用的示例
16 | \end{itemize}
17 | \begin{figure}[H]
18 | \centering
19 | \includegraphics[width=0.8\linewidth]{fig/reference_counting.jpg}
20 | \end{figure}
21 | \item 标记扫除(mark and sweep):做图深搜找连通块
22 | \begin{itemize}
23 | \item 有办法清除循环引用
24 | \item 大量垃圾时效率低,无法满足实时应用
25 | \end{itemize}
26 | \item 标记压缩(mark and compact):标记,计算新地址,拷贝对象到新地址并更新引用
27 | \begin{figure}[H]
28 | \centering
29 | \includegraphics[width=0.8\linewidth]{fig/mark_and_compact.jpg}
30 | \end{figure}
31 | \item 拷贝收集(copying collector):堆被划分为两个区域,可达对象一旦被发现就会立即被移动,但不可达对象不做改动
32 | \begin{figure}[H]
33 | \centering
34 | \includegraphics[width=0.8\linewidth]{fig/copying_collector.jpg}
35 | \end{figure}
36 | \end{itemize}
37 |
38 | JVM采用了两代(young \& old)的方式,对于年轻的对象采用拷贝收集,对于老的对象则采用标记压缩。
--------------------------------------------------------------------------------
/Compilers/README.md:
--------------------------------------------------------------------------------
1 | # Principles of Compilers
2 |
3 | 编译器原理笔记,所用教材Alfred V. Aho, Monica S. Lam, Ravi Sethi, Jeffrey D. Ullman, *Compilers: Principles, Techniques & Tools* (2nd ed), [Online](https://suif.stanford.edu/dragonbook/)
4 |
5 | * 勘误表见[Errata](http://infolab.stanford.edu/~ullman/dragon/errata.html)
--------------------------------------------------------------------------------
/Compilers/fig/AST.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/Compilers/fig/AST.png
--------------------------------------------------------------------------------
/Compilers/fig/LR1-eg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/Compilers/fig/LR1-eg.jpg
--------------------------------------------------------------------------------
/Compilers/fig/T06.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/Compilers/fig/T06.pdf
--------------------------------------------------------------------------------
/Compilers/fig/T07-1.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/Compilers/fig/T07-1.pdf
--------------------------------------------------------------------------------
/Compilers/fig/T07-2.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/Compilers/fig/T07-2.pdf
--------------------------------------------------------------------------------
/Compilers/fig/compiler_flow.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/Compilers/fig/compiler_flow.jpg
--------------------------------------------------------------------------------
/Compilers/fig/copying_collector.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/Compilers/fig/copying_collector.jpg
--------------------------------------------------------------------------------
/Compilers/fig/dag-1.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/Compilers/fig/dag-1.pdf
--------------------------------------------------------------------------------
/Compilers/fig/dag-2.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/Compilers/fig/dag-2.pdf
--------------------------------------------------------------------------------
/Compilers/fig/follow_eg1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/Compilers/fig/follow_eg1.jpg
--------------------------------------------------------------------------------
/Compilers/fig/follow_eg2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/Compilers/fig/follow_eg2.jpg
--------------------------------------------------------------------------------
/Compilers/fig/mark_and_compact.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/Compilers/fig/mark_and_compact.jpg
--------------------------------------------------------------------------------
/Compilers/fig/reference_counting.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/Compilers/fig/reference_counting.jpg
--------------------------------------------------------------------------------
/Compilers/fig/shift-reduce.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/Compilers/fig/shift-reduce.jpg
--------------------------------------------------------------------------------
/Compilers/fig/stack.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/Compilers/fig/stack.jpg
--------------------------------------------------------------------------------
/Compilers/fig/three-addr-code-dag.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/Compilers/fig/three-addr-code-dag.jpg
--------------------------------------------------------------------------------
/Compilers/main.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/Compilers/main.pdf
--------------------------------------------------------------------------------
/Compilers/main.tex:
--------------------------------------------------------------------------------
1 | \documentclass{note}
2 | \usepackage[cpp,table,pseudo]{mypackage}
3 | \usepackage{footnote}
4 | \usepackage{forest}
5 | \makesavenoteenv{tabular}
6 | \usetikzlibrary{automata,backgrounds,fit,shapes,positioning}
7 |
8 | \tikzset{->, % makes the edges directed
9 | >=stealth, % makes the arrow heads bold
10 | node distance=2cm, % specifies the minimum distance between two nodes. Change if necessary.
11 | every state/.style={thick, fill=gray!10}, % sets the properties for each 'state' node
12 | }
13 |
14 | \renewcommand{\thefootnote}{\fnsymbol{footnote}}
15 |
16 | \title{编译原理笔记}
17 | \author{陈鸿峥}
18 | \date{{\builddatemonth\today}\protect\footnote{\text{Build \builddate\today}}} % protect!
19 |
20 | \begin{document}
21 |
22 | \maketitle
23 | \renewcommand{\thefootnote}{\arabic{footnote}}
24 | \setcounter{footnote}{0}
25 |
26 | \setcounter{tocdepth}{2}%设置深度
27 | \tableofcontents
28 |
29 | \bigskip\bigskip
30 |
31 | \input{1_introduction}
32 | \input{2_lexical}
33 | \input{3_syntax}
34 | \input{4_semantic}
35 | \input{5_runtime}
36 | \input{6_codegen}
37 |
38 | \end{document}
--------------------------------------------------------------------------------
/ComputerNetworking/7_summary.tex:
--------------------------------------------------------------------------------
1 | % !TEX root = main.tex
2 |
3 | \section{总结}
4 | \begin{figure}[H]
5 | \centering
6 | \includegraphics[width=\linewidth]{fig/network-headers.pdf}
7 | \end{figure}
8 |
9 | \section{参考资料}
10 | \begin{enumerate}
11 | \item 计算机网络总结,\url{https://blog.csdn.net/n1neding/article/list/7?t=1&}
12 | \end{enumerate}
--------------------------------------------------------------------------------
/ComputerNetworking/README.md:
--------------------------------------------------------------------------------
1 | # Computer Networking
2 |
3 | 计算机网络笔记,所用教材:James F. Kurose, Keith W. Ross, *Computer Networking - A Top-Down Approach (7th ed.)*, Pearson, 2017
--------------------------------------------------------------------------------
/ComputerNetworking/fig/802-11-frame-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/802-11-frame-2.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/802-11-frame-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/802-11-frame-3.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/802-11-frame.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/802-11-frame.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/802-11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/802-11.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/ARP.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/ARP.PNG
--------------------------------------------------------------------------------
/ComputerNetworking/fig/CRC.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/CRC.PNG
--------------------------------------------------------------------------------
/ComputerNetworking/fig/EUI-64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/EUI-64.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/FTP.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/FTP.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/IP_datagram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/IP_datagram.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/LSA-graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/LSA-graph.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/MOSPF.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/MOSPF.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/NLRI.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/NLRI.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/PPP.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/PPP.PNG
--------------------------------------------------------------------------------
/ComputerNetworking/fig/SACK.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/SACK.PNG
--------------------------------------------------------------------------------
/ComputerNetworking/fig/SMTP.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/SMTP.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/TCP-transition.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/TCP-transition.PNG
--------------------------------------------------------------------------------
/ComputerNetworking/fig/TCP-window.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/TCP-window.PNG
--------------------------------------------------------------------------------
/ComputerNetworking/fig/TCP.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/TCP.PNG
--------------------------------------------------------------------------------
/ComputerNetworking/fig/auto-MDIX.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/auto-MDIX.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/bridge.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/bridge.jpg
--------------------------------------------------------------------------------
/ComputerNetworking/fig/checksum.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/checksum.PNG
--------------------------------------------------------------------------------
/ComputerNetworking/fig/conflict_count.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/conflict_count.jpg
--------------------------------------------------------------------------------
/ComputerNetworking/fig/congression-AIMD.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/congression-AIMD.PNG
--------------------------------------------------------------------------------
/ComputerNetworking/fig/congression-slow-start.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/congression-slow-start.PNG
--------------------------------------------------------------------------------
/ComputerNetworking/fig/dns-example.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/dns-example.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/extended-LAN.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/extended-LAN.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/go-back-n.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/go-back-n.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/http-msg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/http-msg.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/http-respond.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/http-respond.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/ieee802.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/ieee802.PNG
--------------------------------------------------------------------------------
/ComputerNetworking/fig/ip-packet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/ip-packet.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/ip_mac.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/ip_mac.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/ipencap.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/ipencap.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/ipv6-format.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/ipv6-format.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/ipv6-group-broadcast.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/ipv6-group-broadcast.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/ipv6-network-prefix.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/ipv6-network-prefix.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/mac_address.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/mac_address.jpg
--------------------------------------------------------------------------------
/ComputerNetworking/fig/multicast.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/multicast.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/my-router-table.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/my-router-table.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/nagle.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/nagle.PNG
--------------------------------------------------------------------------------
/ComputerNetworking/fig/network-flow.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/network-flow.PNG
--------------------------------------------------------------------------------
/ComputerNetworking/fig/network-headers.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/network-headers.pdf
--------------------------------------------------------------------------------
/ComputerNetworking/fig/network-manchester.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/network-manchester.pdf
--------------------------------------------------------------------------------
/ComputerNetworking/fig/next-header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/next-header.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/non-pipelining-http.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/non-pipelining-http.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/ospf_example.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/ospf_example.jpg
--------------------------------------------------------------------------------
/ComputerNetworking/fig/ospf_lsa.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/ospf_lsa.jpg
--------------------------------------------------------------------------------
/ComputerNetworking/fig/out-of-band.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/out-of-band.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/pipelining-http.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/pipelining-http.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/protocol_family.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/protocol_family.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/reverse_path_broadcasting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/reverse_path_broadcasting.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/rip_timer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/rip_timer.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/route_all_example.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/route_all_example.jpg
--------------------------------------------------------------------------------
/ComputerNetworking/fig/router_table_example.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/router_table_example.jpg
--------------------------------------------------------------------------------
/ComputerNetworking/fig/selective-repeat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/selective-repeat.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/spanning_tree.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/spanning_tree.jpg
--------------------------------------------------------------------------------
/ComputerNetworking/fig/switch-crossbar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/switch-crossbar.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/switch-share.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/switch-share.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/switch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/switch.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/tcp_close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/tcp_close.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/tcp_connect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/tcp_connect.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/tcp_example.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/tcp_example.jpg
--------------------------------------------------------------------------------
/ComputerNetworking/fig/tcp_format.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/tcp_format.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/token-ring.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/token-ring.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/udp_format.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/udp_format.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/v4-to-v6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/v4-to-v6.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/virtual_circuit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/virtual_circuit.png
--------------------------------------------------------------------------------
/ComputerNetworking/fig/vlan.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/vlan.jpg
--------------------------------------------------------------------------------
/ComputerNetworking/fig/wlan-example.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/fig/wlan-example.png
--------------------------------------------------------------------------------
/ComputerNetworking/main.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerNetworking/main.pdf
--------------------------------------------------------------------------------
/ComputerNetworking/main.tex:
--------------------------------------------------------------------------------
1 | \documentclass{note}
2 | \usepackage[cpp,table]{mypackage}
3 | \usepackage{footnote}
4 | \makesavenoteenv{tabular}
5 |
6 | \renewcommand{\thefootnote}{\fnsymbol{footnote}}
7 |
8 | \title{计算机网络笔记}
9 | \author{陈鸿峥}
10 | \date{{\builddatemonth\today}\protect\footnote{\text{Build \builddate\today}}} % protect!
11 |
12 | \begin{document}
13 |
14 | \maketitle
15 | \renewcommand{\thefootnote}{\arabic{footnote}}
16 | \setcounter{footnote}{0}
17 |
18 | \setcounter{tocdepth}{2}%设置深度
19 | \tableofcontents
20 |
21 | \bigskip\bigskip
22 | 本课程使用的教材为James F.~Kurose和Keith W.~Ross的《计算机网络---自顶向下方法(第七版)》。
23 |
24 | \input{1_introduction}
25 | \input{2_physical_layer}
26 | \input{3_data_link_layer}
27 | \input{4_network_layer}
28 | \input{5_transport_layer}
29 | \input{6_application_layer}
30 | \input{7_summary}
31 |
32 | \end{document}
--------------------------------------------------------------------------------
/ComputerOrganization/7_bus.tex:
--------------------------------------------------------------------------------
1 | % !TEX root = main.tex
2 |
3 | \section{总线}
4 | \subsection{总线概述}
5 | 总线:在多个部件之间实现互连,用于分时共享方式传输公共信息的一组数据通路
6 | \par常见IO总线:ISA、USB、PCI、VL-BUS
7 | \par现行PC机主要系统总线是PCI和ISA
8 | \par三总线结构:处理机总线、PCI总线、ISA总线
9 | \par总线周期:通过总线完成一次内存或IO设备读写操作所需时间
10 | \par总线性能影响因素
11 | \begin{itemize}
12 | \item 长度
13 | \item 连接元件数目
14 | \end{itemize}
15 | 要在存储器与总线相连部分加三态门,防止随时读取数据(高阻态)
16 | \par 总线的分类
17 | \begin{itemize}
18 | \item 内部总线:寄存器、ALU
19 | \item 系统总线:CPU、MM、IO控制器
20 | \begin{itemize}
21 | \item 控制线:决定总线功能强弱、适应性(控制IO、读写等)
22 | \item 数据线:决定一次能传送数据的位数/能力
23 | \item 地址线:决定最大寻址空间
24 | \end{itemize}
25 | \item 通信/IO/外部总线:主机、IO设备
26 | \end{itemize}
27 | * 在系统总线的数据线上,不传输握手信号
28 | \par 总线传送控制/定时方式:总线在双方交换数据的过程中需要时间上配合关系的控制,实质是一种协议或规则
29 | \begin{itemize}
30 | \item 同步方式:统一时钟信号,电路简单,适合高速设备;时钟偏移,总线长度不能很长,按最慢的设置(CPU内部总线)
31 | \item 异步方式:比同步方式慢,总线频带窄,总线传输周期长,需要握手,用于不同存取速度设备(IO总线)
32 | \begin{itemize}
33 | \item 不互锁:发送接收完就不理对方状态
34 | \item 半互锁:发送方要得到接收方的相应才可进行其他事情
35 | \item 全互锁:来回握手,接收方再得到发送方确认才可进行其他事情
36 | \end{itemize}
37 | \item 半同步方式:wait/ready信号是单向的,不是互锁的;适用于系统工作速度不高,但又包含了许多工作速度差异较大的各类设备的简单系统
38 | \item 分离方式:总线读周期分成两个子周期(寻址+数据传送),在两子周期之间,退出总线,从设备准备数据;适用于有很多主模块(如多个处理器或多个DMA设备)的系统
39 | \end{itemize}
40 | 总线主设备
41 | \begin{itemize}
42 | \item 总线使用请求信号$\to$总线使用应答信号$\to$使用总线
43 | \item 中断请求信号$\to$中断相应信号和中断向量$\to$等待CPU处理
44 | \item DMA请求信号$\to$DMA应答信号$\to$数据交换$\to$撤销DMA请求信号
45 | \end{itemize}
46 | 总线操作五个步骤
47 | \begin{itemize}
48 | \item 传输请求
49 | \item 总线仲裁
50 | \item 部件寻址
51 | \item 数据传输
52 | \item 总线释放
53 | \end{itemize}
54 |
55 | \subsection{总线设计}
56 | 高性能(宽通路,分离数据地址线)与低成本(窄通路,复用数据地址线)之间的权衡
57 | \par 复用:不同信号在同一总线上分时传送
58 | \par总线控制器:对存储空间进行分配、启动等,仲裁哪个主设备获得总线使用权
59 | \[\text{总线带宽(数据传输率)}=\text{总线宽度}/8b\times\text{总线时钟频率}\]
60 | \par注意区别总线周期(通过总线完成一次完整数据传输所需要的时间)与系统周期
61 | \par 总线的操作可分为传输请求、总线仲裁、部件寻址、数据传输、总线释放
62 | \begin{itemize}
63 | \item 主设备:能申请并获得总线控制权的设备
64 | \item 从设备:被主设备访问的设备
65 | \end{itemize}
66 | \par总线仲裁(arbiter):总线主设备请求并获得总线控制权的过程
67 | \begin{itemize}
68 | \item 分布仲裁:自举裁决、冲突检测
69 | \item 集中仲裁:菊花链(串行逐一访问)、独立请求并行判优
70 | \end{itemize}
71 | 仲裁后,获得总线控制权的设备建立“总线忙”信号,用完即撤销
72 | \par 数据传输方式
73 | \begin{itemize}
74 | \item 基本:一个地址一个数据
75 | \item 成组/猝发(burst):提高总线数据传输率,一个地址多个数据
76 | \end{itemize}
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/Slide00-Introduction.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/Slide00-Introduction.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/Slide01-Digital_Circuits.tex:
--------------------------------------------------------------------------------
1 | \documentclass{myslide}
2 | \usepackage[slide]{mypackage}
3 |
4 | \title{Computer System Architecture}
5 | \subtitle{--- Digital Circuits}
6 |
7 | \author[chhzh123]{陈鸿峥}
8 | \date[Dec 30, 2018]{December, 2018}
9 |
10 | \keywords{}
11 |
12 | \begin{document}
13 |
14 | \begin{frame}
15 | \titlepage
16 | \end{frame}
17 |
18 | \begin{frame}
19 | \tableofcontents[hideallsubsections]
20 | \end{frame}
21 |
22 | \section{基本概念}
23 | \begin{frame}
24 | \sectionpage
25 | \end{frame}
26 |
27 | \begin{frame}{计算机组成}
28 | % 01.7-14
29 | \begin{figure}
30 | \centering
31 | \includegraphics[width=\linewidth]{fig/organization.PNG}
32 | \end{figure}
33 | \end{frame}
34 | % 01.22 Bluespec SystemVerilog流程
35 |
36 | \begin{frame}{数字信号与模拟信号}
37 | % 01.7-14
38 | \begin{itemize}
39 | \item 模拟(analog)信号:连续
40 | \item 数字(digital)信号:离散,容许噪声,存在噪声容限(margin)
41 | \end{itemize}
42 | \begin{figure}
43 | \centering
44 | \includegraphics[width=0.8\linewidth]{fig/noise_margin.PNG}
45 | \end{figure}
46 | \end{frame}
47 |
48 | \begin{frame}{数字模拟信号对比}
49 | \begin{figure}
50 | \centering
51 | \includegraphics[width=\linewidth]{fig/digit_analog_comparison.PNG}
52 | \end{figure}
53 | \end{frame}
54 |
55 | \begin{frame}{数字电路}
56 | \begin{figure}
57 | \centering
58 | \includegraphics[width=\linewidth]{fig/type_of_digital_circuits.PNG}
59 | \end{figure}
60 | \end{frame}
61 |
62 | \begin{frame}{布尔代数}
63 | \begin{figure}
64 | \centering
65 | \includegraphics[width=\linewidth]{fig/boolean_algebra.PNG}
66 | \end{figure}
67 | \end{frame}
68 |
69 | \begin{frame}{布尔代数公理}
70 | \begin{figure}
71 | \centering
72 | \includegraphics[width=\linewidth]{fig/boolean_algebra_axioms.PNG}
73 | \end{figure}
74 | \end{frame}
75 |
76 | \begin{frame}{布尔代数性质}
77 | \begin{figure}
78 | \centering
79 | \includegraphics[width=\linewidth]{fig/boolean_algebra_law.PNG}
80 | \end{figure}
81 | \end{frame}
82 |
83 | \begin{frame}{逻辑门}
84 | \begin{figure}
85 | \centering
86 | \includegraphics[width=\linewidth]{fig/boolean_to_logic_gate.PNG}
87 | \end{figure}
88 | \end{frame}
89 |
90 | \begin{frame}{设计的折衷:时延与面积}
91 | \begin{figure}
92 | \centering
93 | \includegraphics[width=\linewidth]{fig/delay_vs_size.PNG}
94 | \end{figure}
95 | \end{frame}
96 |
97 | \end{document}
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/Slide02-Processors.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/Slide02-Processors.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture1/boolean_algebra.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture1/boolean_algebra.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture1/boolean_algebra_axioms.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture1/boolean_algebra_axioms.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture1/boolean_algebra_law.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture1/boolean_algebra_law.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture1/boolean_to_logic_gate.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture1/boolean_to_logic_gate.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture1/delay_vs_size.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture1/delay_vs_size.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture1/digit_analog_comparison.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture1/digit_analog_comparison.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture1/noise_margin.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture1/noise_margin.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture1/organization.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture1/organization.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture1/type_of_digital_circuits.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture1/type_of_digital_circuits.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/1bit-ff.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/1bit-ff.jpg
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/3-8decoder.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/3-8decoder.jpg
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/8-1mux.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/8-1mux.jpg
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/8bit-latch.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/8bit-latch.jpg
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/8bit-latch_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/8bit-latch_2.jpg
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/Abstraction-Computation.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/Abstraction-Computation.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/Abstraction-FA.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/Abstraction-FA.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/Abstraction-Function_Call.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/Abstraction-Function_Call.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/Abstraction-HA.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/Abstraction-HA.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/Abstraction-Processor.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/Abstraction-Processor.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/Abstraction-nFA.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/Abstraction-nFA.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/Core-i7-cache.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/Core-i7-cache.jpg
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/Datapath-All.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/Datapath-All.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/Datapath-Control-signals.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/Datapath-Control-signals.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/Datapath-Multi-State.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/Datapath-Multi-State.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/Datapath-Multi.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/Datapath-Multi.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/Datapath-PC.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/Datapath-PC.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/Datapath-Princeton.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/Datapath-Princeton.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/Datapath-R-I.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/Datapath-R-I.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/Datapath-R-I_2.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/Datapath-R-I_2.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/Datapath-R-R.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/Datapath-R-R.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/Datapath-State.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/Datapath-State.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/Datapath-branch.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/Datapath-branch.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/Datapath-jal.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/Datapath-jal.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/Datapath-jalr.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/Datapath-jalr.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/Datapath-lw.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/Datapath-lw.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/Datapath-sw.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/Datapath-sw.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/MIPS.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/MIPS.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/Von-Neumann-Architecture-Diagram.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/Von-Neumann-Architecture-Diagram.jpg
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/Von_Neumann_Architecture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/Von_Neumann_Architecture.png
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/aligned.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/aligned.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/b-imm.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/b-imm.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/base32.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/base32.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/branch.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/branch.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/clock_1.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/clock_1.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/clock_rate-vs-cpi.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/clock_rate-vs-cpi.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/d-ff.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/d-ff.png
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/d-ff_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/d-ff_2.jpg
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/d-latch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/d-latch.png
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/ff_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/ff_1.jpg
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/ff_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/ff_2.jpg
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/ff_3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/ff_3.jpg
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/ff_4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/ff_4.jpg
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/general_registers.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/general_registers.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/halting_problem.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/halting_problem.png
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/i-imm.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/i-imm.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/imm.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/imm.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/j-imm.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/j-imm.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/jal.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/jal.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/jalr.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/jalr.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/lambda_formula.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/lambda_formula.jpg
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/lambda_formula_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/lambda_formula_2.jpg
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/lw-sw.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/lw-sw.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/lw.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/lw.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/memoryLayoutC.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/memoryLayoutC.jpg
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/memory_addressing.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/memory_addressing.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/misc-mem.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/misc-mem.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/nop.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/nop.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/opcode_map.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/opcode_map.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/overview.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/overview.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/processor_performance-2.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/processor_performance-2.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/processor_performance.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/processor_performance.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/program_compilation_overview.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/program_compilation_overview.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/r-i.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/r-i.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/r-i_2.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/r-i_2.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/r-r.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/r-r.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/register_files.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/register_files.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/rvi_formats.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/rvi_formats.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/rvi_formats_complex.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/rvi_formats_complex.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/sr-latch.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/sr-latch.jpg
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/sw.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/sw.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/system.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/system.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/Lectures/fig/Lecture2/turing_machine.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/Lectures/fig/Lecture2/turing_machine.jpg
--------------------------------------------------------------------------------
/ComputerOrganization/README.md:
--------------------------------------------------------------------------------
1 | # Computer Organization
2 |
3 | ## Notes
4 | 计算机组成原理笔记,所用教材:David A. Patterson and John L. Hennessy, ***Computer Organization and Design***, Elsevier, 2014
5 |
6 | 1. 计算机系统概述
7 | 2. 数据的表示与存储
8 | 3. 指令系统
9 | 4. 计算机的运算
10 | 5. 处理器
11 | 6. 存储器的层次结构
12 | 7. 输入输出系统
13 | 8. 总线
14 |
15 | ## Lectures
16 | 主要参考Daniel Sanchez (MIT), Computer System Architecture (6.823)课程,目前涉及的内容包括
17 |
18 | * 计算机概述
19 | * 计算模型
20 | * 数字电路
21 | * RISC-V指令集架构
22 | * 单/多周期CPU数据通路
--------------------------------------------------------------------------------
/ComputerOrganization/fig/Arithmetic-Division.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/fig/Arithmetic-Division.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/fig/Arithmetic-Mulplication.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/fig/Arithmetic-Mulplication.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/fig/Cache-combine.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/fig/Cache-combine.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/fig/Cache-page.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/fig/Cache-page.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/fig/Cache-page_address.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/fig/Cache-page_address.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/fig/Datapath-Multi-cycle.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/fig/Datapath-Multi-cycle.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/fig/Datapath_All.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/fig/Datapath_All.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/fig/Datapath_add.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/fig/Datapath_add.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/fig/Datapath_beq.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/fig/Datapath_beq.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/fig/Datapath_jump.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/fig/Datapath_jump.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/fig/Datapath_lw.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/fig/Datapath_lw.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/fig/Datapath_ori.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/fig/Datapath_ori.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/fig/Datapath_sw.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/fig/Datapath_sw.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/fig/Memory-Double_Decode.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/fig/Memory-Double_Decode.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/fig/Memory.xml:
--------------------------------------------------------------------------------
1 | 7Zpbb9owGIZ/jS875QA5XCYQukrdVTutvfSISbwmcWRMgV70t88mTsipWSoRKAOpUu3Xdmx/z5cXuxTok3hzS2Ea/iA+ioCm+BugT4GmqfyH/xLKNlNMVc+EgGJfdtoLD/gNSVGR6gr7aFnpyAiJGE6r4pwkCZqzigYpJetqtwWJqrOmMEAN4WEOo6b6C/sszFRLM/f6d4SDMJ9ZNeysJYZ5Z7mTZQh9si5Jugf0CSWEZaV4M0GRCF4el2zc7IPWYmEUJazPgJf49vHx7f7u5/RONeDjm41H2o0h18a2+YaRz/cvq4SykAQkgZG3V11KVomPxFMVXgtZHPGiyotog9lTqfwsunzTxqKaMLp9kkN2lVLjH8TYVqKHK0a4tJ/5npBUPjNbq1jghyGQ0pKs6Bx17DtPJUgDxDr6aQUonuGIxIivnI+jKIIMv1bXAWWqBUW/PQ1ekEA+AcccHo7ZBce8wvnnIl9htJIzPQHPAs4M2CrwTOAowFIbANchZughhbv9r7llViHBZZqZ2AJvBER3QRImg6+Oiyi/IsrQpjvOzbjIAZoiDUk6sp4b1Lrkb1IKS9aWawePpNaIJPDGwJkC2xIFSwOOJSJqz4BjA88Wujv+iqEtQvlVQjsawkFyS5cmolYcpGT3z/IRJ3AQ/RwcpJnCB4FjdsAxr3B6wtEbpvR8HvZe96DC7k/lQfY5HTHbgRwk7a2eaf8B3iOdapThaR3uzHnptKzWk5M9Aa6yK0wBf6u5WbkOcGdAMyK+E/c35aVAlJT3WKy/LjcygJsRq4JdMkpe0IREhHIlIYlIgwWOopoEIxwkvDrn8Udcd4W1YX67dmRDjH1/l0NtzlnNqwG8Uu1xFDaO6ZWqdk4HtgFfP7XvHVA/qVvq53SEu+Jq3tk/5Zfxe3LZflk/W6o977ejwfxy1CCq5YCWqzQnlNzEucqnKTUAzxDUncumatVuDFa/T8HhqI57Ub0y7fgjX42p3sJ0dFSmRov3asJvneZ3EP8tFtWoYRmdGot5xdLytpwcS9vN7uKwFBg6PpiOi8W+YmliKUzt8Fh4df8F+a6t9G8GuvcX
--------------------------------------------------------------------------------
/ComputerOrganization/fig/basic_datapath.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/fig/basic_datapath.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/fig/microinstruction.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/fig/microinstruction.png
--------------------------------------------------------------------------------
/ComputerOrganization/fig/schedule.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/fig/schedule.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/fig/schedule.xml:
--------------------------------------------------------------------------------
1 | 1ZhNj9owEIZ/Ta4V8Udgj112tz20UiUO7R7dxCTumgwyZoH++jpk8mlAqKVR4EL82h7bT8YzjgM6X+0/GbHOvkIidUAmyT6gTwEhISHM/RXKAZUJRSU1KkGtERbqt6waorpVidx0GloAbdW6K8aQ5zK2HU0YA7tusyXo7qhrkUpPWMRC++p3ldgM1TB6aCo+S5VmOPSMTMuKnyJ+Sw1scxwvIHR5/JXVK1HZwoVuMpHAriXR54DODYAtn1b7udQF3Apb2e/lTG09byNze00HQsse70Jvu2vf2ENF47geWfSYBPRxlykrF2sRF7U75wBOy+xKu1LoHpeQW3yhpGiO9qWxcn92kmG9dOdTElbSmoNrgh3IDGmhO5EJlnetd1MRzVqvhaEm0B3S2nSDxD0glTOEph4hMjpClPQIsSEJPXiE6OgIMdYjNBuQEOMeITY+Qr1dVvvUIIQijxAfHSHe22U0GpKQH4ei0RGKeruMDRmpmR+Hxp/L2JBxiE/uMJfxIeMQD+8wl0VDZntO7iCX1ZG58qEhIzX3z9Tjy2V1ZK58aMhIzdkd5LJ+to8GjdQzj5AHSCbumxWLOeTu77HLrMXnl7T2gIDE1oKTwNgMUsiF/gKwvsixGOkyRTcx2Jq4cnf0dytMKm21BU/TNlILq9679v8JnX/Yvq1vLZXWc9BgGu43cLdrPnLrw0Lb3W7jb/75+x6hnTpN/Udo/pHc36R58rG4kGqWnYhNdqQYXibmEJjDj4L2hymvyq9IX+6Vbde54iva+cstG12/ZVtw+Qm2lXb1zsYRvoFyE2y+JcJ+DuddE+X0sRdp3XH1DfUPA2HPULlmz9Dx9dfLPuURrthc1ZXNmwtR+vwH
--------------------------------------------------------------------------------
/ComputerOrganization/fig/sram_cycle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/fig/sram_cycle.png
--------------------------------------------------------------------------------
/ComputerOrganization/fig/word-capacity.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/fig/word-capacity.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/fig/word-length.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/fig/word-length.PNG
--------------------------------------------------------------------------------
/ComputerOrganization/main.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/ComputerOrganization/main.pdf
--------------------------------------------------------------------------------
/ComputerOrganization/main.tex:
--------------------------------------------------------------------------------
1 | \documentclass{note}
2 | \usepackage[bigstrut]{mypackage}
3 |
4 | \def\ssim{{\scriptstyle{\sim}}}
5 | \renewcommand{\mod}{\mathrm{mod}\;}
6 |
7 | \renewcommand{\thefootnote}{\fnsymbol{footnote}}
8 |
9 | \title{计算机组成原理笔记}
10 | \author{陈鸿峥}
11 | \date{{\builddatemonth\today} \footnote{\text{Build \builddate\today}}}%加了build
12 |
13 | \begin{document}
14 |
15 | \maketitle
16 | \renewcommand{\thefootnote}{\arabic{footnote}}
17 | \setcounter{footnote}{0}
18 |
19 | \setcounter{tocdepth}{2}%设置深度
20 | \tableofcontents
21 |
22 | \bigskip\bigskip
23 | 本课程使用的教材为David A.Patterson (UCB), John L.Hennessy (Stanford), 《计算机组成与设计(硬件软件接口)》.
24 |
25 | \input{0_introduction}
26 | \input{1_data_representation}
27 | \input{2_instruction_system}
28 | \input{3_arithmetic}
29 | \input{4_processor}
30 | \input{5_memory}
31 | \input{6_io}
32 | \input{7_bus}
33 |
34 | \end{document}
--------------------------------------------------------------------------------
/DatabaseSystems/3_high-level_sql.tex:
--------------------------------------------------------------------------------
1 | % !TEX root = main.tex
2 |
3 | \section{进阶SQL} % Chap 4
4 | \subsection{内外连接}
5 | \verb'on'条件可以提供比自然连接更为丰富的连接条件
6 | \begin{lstlisting}
7 | select *
8 | from students join takes on student.ID = takes.ID; -- condition
9 | \end{lstlisting}
10 |
11 | 直接使用\verb'natural join'可能导致元组丢失,比如有一些学生没有选修任何课程,则其在student关系中不会与takes关系中任何元组配对。
12 | 因此有\textbf{外连接}:
13 | \begin{itemize}
14 | \item 左外连接(left outer join):只保留出现在左外连接运算之前(左边)关系中的元组,若右侧关系中没有对应属性则用null代替
15 | \item 右外连接(right outer join)
16 | \item 全外连接(full outer join):左外连接和右外连接的组合
17 | \end{itemize}
18 |
19 | 从而可以很容易查询出“所有课程一门也没有选修的学生”:
20 | \begin{lstlisting}
21 | select ID
22 | from student natural left outer join takes
23 | where course_id is null;
24 | \end{lstlisting}
25 |
26 | 为了将常规连接和外连接区分开,SQL中将常规连接称为内连接(inner join),默认的都是内连接。
27 |
28 | \subsection{视图}
29 | 让用户看到整个逻辑模型显然是不合适的,出于安全考虑,可能需要向用户隐藏特定的数据。
30 | 本来通过select可以把需要的数据计算并存储下来,但一旦底层数据发生变化,查询的结果就不再匹配。
31 | 因此,为了解决这样的问题,SQL提供一种虚关系,称为视图(view),只有在使用的时候才会被计算。
32 | \begin{lstlisting}
33 | create view faculty as
34 | select ID, name, dept_name
35 | from instructor;
36 | \end{lstlisting}
37 | 之后便可以直接使用\verb'from'语句访问视图。
38 |
39 | \begin{definition}[物化视图(materialized view)]
40 | 如果用于定义视图的实际关系改变,视图也会跟着修改。
41 | \end{definition}
42 |
43 | 由于视图并不是数据库底层的关系,故一般数据库不允许对视图关系进行修改。
44 |
45 | \subsection{事务}
46 | SQL标准规定当一条SQL语句被执行,就隐式开始了一个事务。
47 | 下列SQL语句之一会结束一个事务:
48 | \begin{itemize}
49 | \item Commit work:将事务所做的更新在数据库中持久保存。
50 | 在事务被提交后,一个新的事务自动开始。
51 | \item Rollback work:撤销该事务中所有SQL语句对数据库的更新,数据库将恢复到执行该事务的第一条语句之前的状态。
52 | 如果遇断电,回滚会在下一次重启时自动执行。
53 | \end{itemize}
54 |
55 | \subsection{完整性约束}
56 | 单个关系上的约束
57 | \begin{itemize}
58 | \item \verb'not null':跟在属性定义后面
59 | \item \verb'unique (A1,A2,...,Am)':声明$A_1,\ldots,A_m$构成一个候选码
60 | \item \verb'check()':关系中每个元组都必须满足该谓词,如\verb'check(budget>0)'
61 | \end{itemize}
62 |
63 | 参照完整性/子集依赖:外码
64 | \begin{lstlisting}
65 | foreign key (dept_name) references department
66 | on delete cascade
67 | on update cascade
68 | \end{lstlisting}
69 | 会级联(cascade)删除或更新。
70 |
71 | \subsection{授权}
72 | \verb'grant'授权,\verb'revoke'回收
73 | \begin{itemize}
74 | \item \verb'select':允许用户修改关系中任意数组
75 | \item \verb'insert'
76 | \item \verb'delete'
77 | \end{itemize}
78 | 用户名\verb'public'包括了当前所有用户和未来用户的权限。
79 |
80 | \begin{lstlisting}
81 | grant
82 | on
83 | to
84 |
85 | grant update (budget) on department to Amit, Satoshi;
86 | \end{lstlisting}
87 |
88 | 可以先创建角色(role)然后给用户授予角色。
--------------------------------------------------------------------------------
/DatabaseSystems/6.5_storage.tex:
--------------------------------------------------------------------------------
1 | % !TEX root = main.tex
2 |
3 | \section{存储与文件结构} % Chap 10
4 | \subsection{存储器件}
5 | 物理存储:易失(volatile)、非易失
6 |
7 | 磁盘被划分为道、扇区、柱面
8 |
9 | 常见磁盘性能衡量指标:
10 | \begin{itemize}
11 | \item 访问时间:
12 | \begin{itemize}
13 | \item 寻道(seek)时间:到达特定的道
14 | \item 旋转时间
15 | \end{itemize}
16 | \item 数据传输速率
17 | \item 平均失效时间(MTTF):通常3-5年
18 | \end{itemize}
19 |
20 | 通过并行来提高性能:数据拆分(striping)
21 | \begin{itemize}
22 | \item 比特级拆分:每个字节按比特分开,存储到多个磁盘上
23 | \item 块级拆分:将块拆分到多张磁盘,即将磁盘阵列看成一张单独的大磁盘,并给块进行逻辑编号
24 | \end{itemize}
25 |
26 | 独立磁盘冗余阵列(Redundant Array of Independent Disk, RAID)
27 |
28 | \begin{minipage}[H]{0.5\linewidth}
29 | \begin{itemize}
30 | \item RAID-0:块级拆分但无冗余
31 | \item RAID-1:块级拆分+冗余,数据库常用
32 | \item RAID-2:纠错码(Error-Correcting-Code, ECC),可以读出其余位和纠错位重建信息
33 | \item RAID-3:可以检测一整个扇区是否被正确读出
34 | \item RAID-4:在一张独立磁盘上为其他$N$张磁盘对应的块保留一个奇偶校验块
35 | \item RAID-5:将数据和奇偶校验位分布到$N+1$张磁盘中,所有磁盘都能参与读请求
36 | \item RAID-6:P+Q冗余方案,可应对多张磁盘故障情况
37 | \end{itemize}
38 | \end{minipage}
39 | \begin{minipage}[H]{0.5\linewidth}
40 | \begin{figure}[H]
41 | \centering
42 | \includegraphics[width=0.5\linewidth]{fig/RAID.png}
43 | \end{figure}
44 | \end{minipage}
45 |
46 | \subsection{文件结构}
47 | \subsubsection{定长记录}
48 | 每次插入删除都涉及后续元组的移动,可以如下维护一个空闲列表(free list)
49 | \begin{figure}[H]
50 | \centering
51 | \includegraphics[width=0.6\linewidth]{fig/free_lists.png}
52 | \end{figure}
53 |
54 | \subsubsection{变长记录}
55 | 变长记录以以下几种方式出现:
56 | \begin{itemize}
57 | \item 多种记录类型在一个文件中存储
58 | \item 允许一个或多个字段是变长的记录类型
59 | \item 允许可重复字段的记录类型,如数组或多重集合
60 | \end{itemize}
61 | \begin{figure}[H]
62 | \centering
63 | \includegraphics[width=0.5\linewidth]{fig/variable-length.png}
64 | \end{figure}
65 |
66 | 用分槽的页结构(slotted-page)来处理块中变长记录的问题
67 | \begin{figure}[H]
68 | \centering
69 | \includegraphics[width=0.5\linewidth]{fig/slotted_page.png}
70 | \end{figure}
71 |
72 | 块头包含以下信息
73 | \begin{itemize}
74 | \item 块头中记录条目的个数
75 | \item 块中空闲空间的末尾处
76 | \item 由包含记录位置和大小的记录条目组成的数组
77 | \end{itemize}
78 | 注意实际记录是从\textemph{块的尾部}往前插。
79 |
80 | \subsection{文件中记录的组织}
81 | \begin{itemize}
82 | \item 堆文件组织:一条记录可放在文件中任何地方,只要那个地方有空间存放这条记录
83 | \item 顺序文件组织:根据其搜索码值顺序存储
84 | \item 散列文件组织:散列函数
85 | \end{itemize}
86 |
87 | 多表聚簇组织
88 | \begin{figure}[H]
89 | \centering
90 | \includegraphics[width=0.5\linewidth]{fig/multitable_clustering.png}
91 | \end{figure}
--------------------------------------------------------------------------------
/DatabaseSystems/8_transaction.tex:
--------------------------------------------------------------------------------
1 | % !TEX root = main.tex
2 |
3 | \section{事务} % Chap 14
4 | \subsection{基本概念}
5 | \begin{definition}[事务(transaction)]
6 | 构成单一逻辑工作单元的操作集合称为事务。
7 | 即使有故障,数据库系统也必须保证数据库的正确执行——要么执行整个事务,要么属于该事务的操作一个也不执行。
8 | \end{definition}
9 |
10 | 事务具有以下的基本性质(ACID):
11 | \begin{itemize}
12 | \item 原子性(Atomicity):要么执行完,要么不执行,不能执行到一半 $\to$ 日志、恢复系统
13 | \item 一致性(Consistency):除了基本的数据完整性约束,还有更多的一致性约束。
14 | \item 隔离性(Isolation):每个事务都察觉不到系统中有其他事务在并发执行,一定是完成一个再进行下一个 $\to$ 并发控制系统
15 | \item 持久性(Durability):一个事务成功完成对数据库的改变是永久的,即使出现系统故障 $\to$ 结束前已写入磁盘,更新信息已写入磁盘
16 | \end{itemize}
17 |
18 | 事务的基本状态:
19 | \begin{itemize}
20 | \item 活动的(active):初始状态
21 | \item 部分提交的(partially commited):最后一条语句执行后
22 | \item 失败的(failed):执行出错
23 | \item 中止的(aborted):事务回滚且数据库已恢复到事务开始执行前
24 | \item 提交的(commited):成功完成
25 | \end{itemize}
26 | \begin{figure}[H]
27 | \centering
28 | \includegraphics[width=0.3\linewidth]{fig/transaction_state.png}
29 | \end{figure}
30 |
31 | \subsection{可串行化}
32 | \begin{definition}[调度]
33 | 按照时间顺序执行的一串指令即为调度。
34 | 如果事务内的指令都不被打乱,如$$或$$,则为串行调度。
35 | \end{definition}
36 | \begin{definition}[冲突]
37 | 当$I$和$J$是不同事务在相同数据项$Q$上的操作,并且其中\textbf{至少有一个}是\verb'write'指令时,则称$I$与$J$是冲突的。
38 | \end{definition}
39 | \begin{definition}[冲突等价(conflict equivalent)]
40 | 如果调度$S$可以经过一系列\textbf{非冲突}指令交换转换为$S'$,则称$S$和$S'$是冲突等价的。
41 | 若$S'$为串行调度,则$S$为冲突可串行化的(conflict serializable)。
42 | \end{definition}
43 | \begin{figure}[H]
44 | \centering
45 | \includegraphics[width=0.8\linewidth]{fig/conflict_serializability.png}
46 | \end{figure}
47 | 可以将左侧调度通过两个非冲突指令调换转为右侧,故是冲突可串行的。
48 |
49 | 可以通过构造一个优先图(precedence graph)来判断是否冲突可串行化,顶点集由所有参与调度的事务构成,边集由满足下列三个条件之一的边$T_i\to T_j$构成:
50 | \begin{itemize}
51 | \item 在$T_j$执行read(Q)前,$T_i$执行write(Q)
52 | \item 在$T_j$执行write(Q)前,$T_i$执行read(Q)
53 | \item 在$T_j$执行write(Q)前,$T_i$执行write(Q)
54 | \end{itemize}
55 | 即只有\textemph{两者都读才不冲突,先执行到后执行连边}。
56 |
57 | 如果无环(用环检测算法),则冲突可串行化,可以通过\textbf{拓扑排序}(所有父亲执行完才到孩子执行)得到串行化顺序。
58 |
59 | \begin{definition}[可恢复调度]
60 | 若事务$T_j$读事务$T_i$先前写的数据(\textemph{先写后读}),则$T_i$的提交必须在\textemph{$T_j$的提交之前}。
61 | \end{definition}
62 | \begin{definition}[无级联(cascadeless)调度]
63 | 若事务$T_j$读事务$T_i$先前写的数据(\textemph{先写后读}),则$T_i$的提交必须在\textemph{$T_j$这一读操作之前}。
64 | \end{definition}
65 |
66 | \subsection{隔离性级别}
67 | 事务隔离性的好处:提高吞吐量和资源利用率、减少等待时间
68 | \begin{itemize}
69 | \item 可串行化(serializable)
70 | \item 可重复读(repeatable read):只允许读已提交数据,一个事务两次读一个数据期间,其他事务不得更新该数据
71 | \item 已提交读(read committed):只允许读已提交数据,但不要求可重复读
72 | \item 未提交读(read uncommitted):允许读未提交数据,最低一致性要求
73 | \end{itemize}
--------------------------------------------------------------------------------
/DatabaseSystems/README.md:
--------------------------------------------------------------------------------
1 | # Database Systems
2 |
3 | 数据库系统原理笔记,所用教材Abraham Silberschatz, Henry F.Korth, S.Sudarsham, *Database System Concepts (6th ed)*, 2012
--------------------------------------------------------------------------------
/DatabaseSystems/fig/E-R-figure.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/E-R-figure.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/RAID.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/RAID.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/b-tree.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/b-tree.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/bitmap.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/bitmap.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/bp-tree.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/bp-tree.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/bp-tree_deletion.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/bp-tree_deletion.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/bp-tree_deletion2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/bp-tree_deletion2.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/bp-tree_deletion3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/bp-tree_deletion3.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/bp-tree_deletion_alg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/bp-tree_deletion_alg.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/bp-tree_file_organization.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/bp-tree_file_organization.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/bp-tree_insertion.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/bp-tree_insertion.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/bp-tree_insertion2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/bp-tree_insertion2.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/bp-tree_insertion3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/bp-tree_insertion3.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/checkpoints_eg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/checkpoints_eg.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/conflict_serializability.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/conflict_serializability.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/deadlock.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/deadlock.jpg
--------------------------------------------------------------------------------
/DatabaseSystems/fig/dense_sparse_indexing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/dense_sparse_indexing.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/extendable_hash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/extendable_hash.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/extendable_hash_eg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/extendable_hash_eg.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/free_lists.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/free_lists.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/hash_index.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/hash_index.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/lock_table.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/lock_table.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/mapping_radix.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/mapping_radix.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/multilevel-index.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/multilevel-index.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/multitable_clustering.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/multitable_clustering.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/recovery.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/recovery.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/relationship_set(description).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/relationship_set(description).png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/relationship_set.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/relationship_set.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/slotted_page.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/slotted_page.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/transaction_state.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/transaction_state.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/tree_protocol.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/tree_protocol.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/university_E-R.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/university_E-R.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/university_schema_diagram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/university_schema_diagram.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/variable-length.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/variable-length.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/view_of_data.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/view_of_data.png
--------------------------------------------------------------------------------
/DatabaseSystems/fig/wait-for_graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/fig/wait-for_graph.png
--------------------------------------------------------------------------------
/DatabaseSystems/main.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DatabaseSystems/main.pdf
--------------------------------------------------------------------------------
/DatabaseSystems/main.tex:
--------------------------------------------------------------------------------
1 | \documentclass{note}
2 | \usepackage[cpp,table,pseudo]{mypackage}
3 | \usepackage{footnote}
4 | \makesavenoteenv{tabular}
5 |
6 | \def\ojoin{\setbox0=\hbox{$\bowtie$}%
7 | \rule[-.02ex]{.25em}{.4pt}\llap{\rule[\ht0]{.25em}{.4pt}}}
8 | \def\leftouterjoin{\mathbin{\ojoin\mkern-5.8mu\bowtie}}
9 | \def\rightouterjoin{\mathbin{\bowtie\mkern-5.8mu\ojoin}}
10 | \def\fullouterjoin{\mathbin{\ojoin\mkern-5.8mu\bowtie\mkern-5.8mu\ojoin}}
11 |
12 | \renewcommand{\thefootnote}{\fnsymbol{footnote}}
13 | \lstset{language=sql}
14 |
15 | \title{数据库系统原理笔记}
16 | \author{陈鸿峥}
17 | \date{{\builddatemonth\today}\protect\footnote{\text{Build \builddate\today}}} % protect!
18 |
19 | \begin{document}
20 |
21 | \maketitle
22 | \renewcommand{\thefootnote}{\arabic{footnote}}
23 | \setcounter{footnote}{0}
24 |
25 | \setcounter{tocdepth}{2}%设置深度
26 | \tableofcontents
27 |
28 | \bigskip\bigskip
29 |
30 | \input{1_introduction} % Chap 1, 2
31 | \input{2_sql_intro} % Chap 3
32 | \input{3_high-level_sql} % Chap 4
33 | \input{4_relational_algebra} % Chap 6
34 | \input{5_ER-model} % Chap 7
35 | \input{6_database_design} % Chap 8
36 | \input{6.5_storage} % Chap 10
37 | \input{7_index} % Chap 11
38 | \input{8_transaction} % Chap 14
39 | \input{9_concurrency} % Chap 15
40 | \input{10_recovery} % Chap 16
41 |
42 | \end{document}
43 |
44 | % 1,2,3,4,6,7,8,10,11,14,15.1-15.2,16.1-16.4
--------------------------------------------------------------------------------
/DeepLearning/1_introduction.tex:
--------------------------------------------------------------------------------
1 | % !TEX root = main.tex
2 | % !TEX encoding = UTF-8
3 |
4 | \section{简介} % ch1
5 | 图~\ref{fig:venn}反映了\newterm{深度学习}与其他几个常见概念之间的关系。
6 | 传统的\newterm{机器学习}(如决策树、SVM、随机森林等)常需要人工提取特征,这一步经常涉及到\newterm{特征工程}(feature engineering),如果特征没有进行一定处理,直接丢进去让其学习,往往会产生非常糟糕的结果。在一种表示下可能可以对数据进行线性二分,而另一种表示下则没有办法。
7 | 因此,为了避免对特征的强依赖性,一种方法是利用机器学习来学习\textbf{表示(representation)本身},再将新的表示送入到后面的学习器中让它学习\textbf{表示到输出的映射},此即\newterm{表示学习}。
8 | 再到后来,深度学习则更加将这种思想发扬光大,表示学习只能学习到\textbf{浅层简单的特征},那深度学习则尝试去学习\textbf{深层复杂的特征}。
9 |
10 | \bigskip
11 | \begin{tcolorbox}
12 | 事实上现在\newterm{图神经网络}(GNN)也是遵循这样的发展过程,最开始尝试在图上做机器学习\cite{yao:graph_ml_2009,li:distributed_2013,gemulla:mf_2011};然后又开始在图上以各种随机游走的方式做图表示学习-图嵌入(embedding)\cite{perozzi:deepwalk_2014,grover:node2vec_2016};后来发现图嵌入能够获得的特征依然太浅层了,因此现在更多则采用图神经网络\cite{kipf:gcn_2017,hamilton:graphsage_2017,li:gated_2016,velickovic:gat_2018}的方式来做图相关的工作。
13 | \end{tcolorbox}
14 |
15 | \begin{figure}[H]
16 | \centering
17 | \begin{tabular}{cc}
18 | \includegraphics[width=0.5\linewidth]{fig/dl_venn.jpg}
19 | \includegraphics[width=0.5\linewidth]{fig/dl_flowchart.jpg}
20 | \end{tabular}
21 | \caption{深度学习Venn图}
22 | \label{fig:venn}
23 | \end{figure}
24 |
25 | 深度学习在发展过程中也起过几个名字:在1940年代到1960年代被称为\newterm{控制论}(cybernetics),之后\\
26 | 1980到1990年代则被称为\newterm{连接主义}(connectionism),而后从2006年到现在才被称为\newterm{深度学习}。2018年的图灵奖正式颁发给深度学习三巨头---Geoffrey Hinton,Yoshua Bengio和Yann LeCun,也奠定了深度学习在学术界的历史地位。
27 |
28 | \bigskip
29 | \begin{tcolorbox}
30 | 我也一直在思考是什么造成了深度学习在2010年代的兴起,使得如今我们快速进入软件2.0时代\cite{olukotun:software2_2018}。
31 | 总结来讲有以下几点:
32 | \begin{itemize}
33 | \item \textbf{数据}:我们每天产生的数据量越来越多,能够处理的数据量越来越大,名副其实地进入了大数据时代。
34 | 其中的一些数据经过处理能够变得很干净,2010年拥有大量标注图片的数据集ImageNet\cite{deng:imagenet_2009}就是这样的例子,它的提出使得有监督学习迎来了一波兴起。
35 | \item \textbf{算法}:我们有更多更优秀的模型,从AlexNet的dropout\cite{krizhevsky:alexnet_2012},再到后来ResNet的残差模块\cite{he:resnet_2016}。
36 | ImageNet的发展历程,也是深度学习算法/模型改进和发展的历程。
37 | \item \textbf{软件系统}:早年的深度学习框架Caffe\cite{jia:caffe_2014}、Theano\cite{ai-rfou:theano_2016}、MXNet\cite{chen:mxnet_2016}等使得研究人员可以方便地编写神经网络模型,而2015年前后诞生的TensorFlow\cite{abadi:tensorflow_2016}和PyTorch\cite{paszke:pytorch_2019}则是成为了现在深度学习框架的主流范式,程序员不需知道底层的实施细节,只用“调库”和“调参”也可以实现很高效的模型,这些软件系统的诞生极大程度推动了深度学习的遍地开花。
38 | 再到现在XLA\cite{google:xla}和TVM\cite{chen:tvm_2018}等深度学习编译器的出现,更是进一步解放程序员,使上层模型可以方便快捷地部署到后端不同硬件平台上。
39 | \item \textbf{硬件}:GPU为深度学习做出了不可磨灭的贡献,没有GPGPU的发展,很多深度学习任务根本没有办法完成。
40 | 现在的TPU\cite{jouppi:tpu_2017}及各种神经网络加速器\cite{moreau:vta_2018}也都是在拓宽这一层面,以进一步提升深度学习的能力。
41 | \end{itemize}
42 | 上面提到的这几点都不可或缺,它们共同造就了整个深度学习栈,从而带来现在深度学习的繁荣。
43 | \end{tcolorbox}
--------------------------------------------------------------------------------
/DeepLearning/README.md:
--------------------------------------------------------------------------------
1 | # Deep Learning
2 |
3 | 深度学习笔记,所用教材Ian Goodfellow, Yoshua Bengio, Aaron Courville, *Deep Learning*, MIT Press, 2016, [Online](http://www.deeplearningbook.org/)
--------------------------------------------------------------------------------
/DeepLearning/fig/deconvolution.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DeepLearning/fig/deconvolution.jpg
--------------------------------------------------------------------------------
/DeepLearning/fig/deeplabv1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DeepLearning/fig/deeplabv1.jpg
--------------------------------------------------------------------------------
/DeepLearning/fig/deeplabv2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DeepLearning/fig/deeplabv2.jpg
--------------------------------------------------------------------------------
/DeepLearning/fig/deeplabv3+.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DeepLearning/fig/deeplabv3+.jpg
--------------------------------------------------------------------------------
/DeepLearning/fig/deeplabv3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DeepLearning/fig/deeplabv3.jpg
--------------------------------------------------------------------------------
/DeepLearning/fig/dilated_convolution.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DeepLearning/fig/dilated_convolution.png
--------------------------------------------------------------------------------
/DeepLearning/fig/dl_flowchart.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DeepLearning/fig/dl_flowchart.jpg
--------------------------------------------------------------------------------
/DeepLearning/fig/dl_venn.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DeepLearning/fig/dl_venn.jpg
--------------------------------------------------------------------------------
/DeepLearning/fig/dropout.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DeepLearning/fig/dropout.jpg
--------------------------------------------------------------------------------
/DeepLearning/fig/encoder-decoder.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DeepLearning/fig/encoder-decoder.jpg
--------------------------------------------------------------------------------
/DeepLearning/fig/fcn.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DeepLearning/fig/fcn.jpg
--------------------------------------------------------------------------------
/DeepLearning/fig/gd_catalog.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DeepLearning/fig/gd_catalog.jpg
--------------------------------------------------------------------------------
/DeepLearning/fig/lenet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DeepLearning/fig/lenet.png
--------------------------------------------------------------------------------
/DeepLearning/fig/mlp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DeepLearning/fig/mlp.png
--------------------------------------------------------------------------------
/DeepLearning/fig/neuron_model.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DeepLearning/fig/neuron_model.png
--------------------------------------------------------------------------------
/DeepLearning/fig/normalization.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DeepLearning/fig/normalization.jpg
--------------------------------------------------------------------------------
/DeepLearning/fig/pspnet.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DeepLearning/fig/pspnet.jpg
--------------------------------------------------------------------------------
/DeepLearning/fig/residual_block.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DeepLearning/fig/residual_block.jpg
--------------------------------------------------------------------------------
/DeepLearning/fig/unet.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DeepLearning/fig/unet.jpg
--------------------------------------------------------------------------------
/DeepLearning/main.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DeepLearning/main.pdf
--------------------------------------------------------------------------------
/DeepLearning/main.tex:
--------------------------------------------------------------------------------
1 | \documentclass{note}
2 | \usepackage[python,table,pseudo]{mypackage}
3 | \usepackage{xcolor}
4 | \hypersetup{colorlinks=false,urlbordercolor=red}
5 | \usepackage{footnote}
6 | \makesavenoteenv{tabular}
7 | \usepackage[nottoc]{tocbibind}
8 |
9 | \usepackage{tcolorbox}
10 | % \begin{tcolorbox}[sharp corners, colback=green!30, colframe=green!80!blue, title=Another paragraph with title]
11 |
12 | \renewcommand{\thefootnote}{\fnsymbol{footnote}}
13 | \newcommand{\newterm}[1]{\textcolor{black}{\emph{\textbf{#1}}}}
14 | \renewcommand{\Var}[1]{\mathrm{Var}\left(#1\right)}
15 | \def\diag{\mathrm{diag}}
16 |
17 | \title{深度学习笔记}
18 | \author{陈鸿峥}
19 | \date{{\builddatemonth\today}\protect\footnote{\text{Build \builddate\today}}} % protect!
20 |
21 | \setcounter{secnumdepth}{5}
22 |
23 | \begin{document}
24 |
25 | \maketitle
26 | \renewcommand{\thefootnote}{\arabic{footnote}}
27 | \setcounter{footnote}{0}
28 |
29 | \setcounter{tocdepth}{2}%设置深度
30 | \tableofcontents
31 |
32 | \bigskip\bigskip
33 |
34 | 本课程主要选用Ian Goodfellow, Yoshua Bengio, Aaron Courville的《深度学习》(Deep Learning)一书。
35 | 一些众所周知的概念会在笔记中略过,而着重在一些容易忽略的知识点上面。
36 |
37 | \input{1_introduction}
38 | \input{2_ann}
39 | \input{3_optimization}
40 | \input{4_issues}
41 | \input{5_segmentation}
42 |
43 | \newpage
44 | \bibliographystyle{unsrt}
45 | \bibliography{dl}
46 |
47 | \end{document}
--------------------------------------------------------------------------------
/DigitalCircuits/2_integrated_circuit.tex:
--------------------------------------------------------------------------------
1 | \section{集成电路}
2 | \begin{figure}[htbp]
3 | \centering
4 | \includegraphics[width=0.8\linewidth]{fig/cmos.PNG}
5 | \caption{CMOS电路:\large\textbf{$n$内高,$p$外低}}
6 | \end{figure}
7 | \begin{figure}[htbp]
8 | \centering
9 | \includegraphics[width=0.6\linewidth]{fig/cmos_ex.PNG}
10 | \caption{CMOS或非门}
11 | \end{figure}
12 | \begin{figure}[htbp]
13 | \centering
14 | \includegraphics[width=0.6\linewidth]{fig/ttl.PNG}
15 | \caption{TTL电路}
16 | \end{figure}
17 | \begin{figure}[htbp]
18 | \label{ttl_inverse}
19 | \centering
20 | \includegraphics[width=0.6\linewidth]{fig/ttl_ex.PNG}
21 | \caption{TTL反相器}
22 | \end{figure}
23 | \par 由图\ref{ttl_inverse},$Q_1$被$V_{CC}$上拉,始终导通. 若输入为高电平,$Q_2$导通,$Q_3$导通,输出被下拉为低电平. 同时,$Q_2$在集电极处足够低的电压可以使$Q_4$截至.
24 | \begin{figure}[htbp]
25 | \centering
26 | \includegraphics[width=0.6\linewidth]{fig/three_gates.PNG}
27 | \caption{三态门}
28 | \end{figure}
--------------------------------------------------------------------------------
/DigitalCircuits/5_circuit_design.tex:
--------------------------------------------------------------------------------
1 | \section{电路设计}
2 | \subsection{电路分类}
3 | \begin{enumerate}
4 | \item 摩尔(Moore)电路
5 | \begin{figure}[htbp]
6 | \centering
7 | \includegraphics[width=0.4\linewidth]{fig/moore_machine.pdf}
8 | \caption{触发器}
9 | \end{figure}
10 | \item 米勒(Mealy)电路
11 | \begin{figure}[htbp]
12 | \centering
13 | \includegraphics[width=0.4\linewidth]{fig/mealy_machine.pdf}
14 | \caption{触发器}
15 | \end{figure}
16 | \end{enumerate}
17 | \subsection{设计步骤}
18 | \par 基于状态转移表格的方法
19 | \begin{enumerate}
20 | \item 状态图
21 | \item 次态表
22 | \item 触发器转移表
23 | \begin{center}
24 | \begin{tabular}{|c|c|c|c|}
25 | \hline
26 | $Q^n$ & $Q^{n+1}$ & J & K\\\hline
27 | 0 & 0 & 0 & X\\\hline
28 | 0 & 1 & 1 & X\\\hline
29 | 1 & 0 & X & 1\\\hline
30 | 1 & 1 & X & 0\\\hline
31 | \end{tabular}
32 | \end{center}
33 | \item 触发器JK卡诺图
34 | \item JK驱动方程
35 | \item 时序电路
36 | \end{enumerate}
37 | \par 基于状态方程的方法
38 | \begin{enumerate}
39 | \item 状态表
40 | \item 次态卡诺图
41 | \item 状态方程 $Q^{n+1}=J\ol{Q^n}+\ol{K}Q^n$
42 | \item 驱动方程
43 | \item 时序电路
44 | \end{enumerate}
45 | \subsection{实例操作}
46 | \par 目的:用JK触发器实现一个12进制同步计数器
47 | \begin{enumerate}
48 | \item 状态转换图
49 | \begin{figure}[H]
50 | \centering
51 | \includegraphics[width=0.7\linewidth]{fig/12system_state.pdf}
52 | \end{figure}
53 | \item 确定电路所需触发器数目\\
54 | 由于$2^4=16>12$,故需要$4$个JK触发器
55 | \item 次态卡诺图
56 | \begin{figure}[H]
57 | \centering
58 | \includegraphics[width=0.4\linewidth]{fig/Karnaugh_12system.pdf}
59 | \end{figure}
60 | \item 触发器状态方程,由卡诺图可得
61 | \[\begin{aligned}
62 | Q_0^{n+1}&=\overline{Q_0}\\
63 | Q_1^{n+1}&=Q_0\overline{Q_1}+\overline{Q_0}Q_1\\
64 | Q_2^{n+1}&=Q_0Q_1\ol{Q_2}+\ol{Q_1}Q_2\ol{Q_3}+\ol{Q_0}Q_2\ol{Q_3}\\
65 | Q_3^{n+1}&=\ol{Q_2}Q_3+Q_0Q_1Q_2\ol{Q_3}
66 | \end{aligned}\]
67 | \item 触发器驱动方程,由
68 | \[Q^{n+1}=J\ol{Q^n}+\ol{K}Q^n\]
69 | 将状态方程整理为上式形式,可得
70 | \[\begin{aligned}
71 | J_0&=1 \qquad &K_0&=1\\
72 | J_1&=Q_0 \qquad &K_0&=Q_0\\
73 | J_2&=Q_1Q_0 \qquad &K_2&=\ol{\ol{Q_3}\ol{Q_1}+\ol{Q_3}\ol{Q_0}}=\ol{Q_3}+Q_1Q_0\\
74 | J_3&=Q_2Q_1Q_0 \qquad &K_3&=Q_2
75 | \end{aligned}\]
76 | \item 检查自启动\\
77 | 当输入为1111和0000时,可自动跳转至0001;输入为1101时,跳转至0010;输入为1110时,跳转至0011
78 | \end{enumerate}
79 | \par Proteus电路图连接如下
80 | \begin{figure}[H]
81 | \centering
82 | \includegraphics[width=0.9\linewidth]{fig/12system_protues.PNG}
83 | \end{figure}
84 | \par 仿真结果如下
85 | \begin{figure}[H]
86 | \centering
87 | \includegraphics[width=0.6\linewidth]{fig/12system_wave.PNG}
88 | \end{figure}
--------------------------------------------------------------------------------
/DigitalCircuits/README.md:
--------------------------------------------------------------------------------
1 | # Digital Circuits
2 |
3 | 数字电路笔记,所用教材:Thomas L.Floyd, ***Digital Fundamentals (10th ed)***, Pearson Edu. Inc., 2009
4 |
5 | 1. 概述
6 | 2. 基本概念
7 | 3. 集成电路
8 | 4. 组合电路
9 | 5. 时序电路
10 | 6. 电路设计
--------------------------------------------------------------------------------
/DigitalCircuits/fig/12system_protues.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/12system_protues.PNG
--------------------------------------------------------------------------------
/DigitalCircuits/fig/12system_state.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/12system_state.pdf
--------------------------------------------------------------------------------
/DigitalCircuits/fig/12system_wave.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/12system_wave.PNG
--------------------------------------------------------------------------------
/DigitalCircuits/fig/555timer.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/555timer.jpg
--------------------------------------------------------------------------------
/DigitalCircuits/fig/74hc163.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/74hc163.PNG
--------------------------------------------------------------------------------
/DigitalCircuits/fig/74ls93.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/74ls93.PNG
--------------------------------------------------------------------------------
/DigitalCircuits/fig/JK_flip-flop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/JK_flip-flop.png
--------------------------------------------------------------------------------
/DigitalCircuits/fig/Karnaugh_12system.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/Karnaugh_12system.pdf
--------------------------------------------------------------------------------
/DigitalCircuits/fig/Karnaugh_example.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/Karnaugh_example.png
--------------------------------------------------------------------------------
/DigitalCircuits/fig/Karnaugh_graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/Karnaugh_graph.png
--------------------------------------------------------------------------------
/DigitalCircuits/fig/adder.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/adder.jpg
--------------------------------------------------------------------------------
/DigitalCircuits/fig/circuit_machine.xml:
--------------------------------------------------------------------------------
1 | 7VdNc5swEP01PrZDwMbJMXGS9tBMO5OZtjnKIIMaoaVCxHZ/fVdoZZDJ5ziZ9hB8sPT2aaXdfayGSbKoNp80q8sryLmcxFG+mSTnkzg+mkYn+GeRrUPSNHVAoUVOpB64Fn84gRGhrch5ExANgDSiDsEMlOKZCTCmNaxD2gpkuGvNCj4CrjMmx+gPkZuS0KP0pDd85qIoaevjeO4MS5bdFhpaRftN4mTVPc5cMe+LAm1KlsN6ACUXk2ShAYwbVZsFlza3Pm1u3eUD1t25NVfmOQtmdAyz9aHzHDNBU9CmhAIUkxc9epa1+o7b9Uc46WLtZhHOSlNJMvCNMD8H4xtL+TjDWWOYNqe2SggpUNxjl0JKcsRV7hmZZE0jMgcSxTr9xY3ZknRYawCh/rxfAGriNUbDLV+ABN1FmETn9rez+AJj7s9WoMwlq4S0uv3Odc4UI5h2iiOaDx12D+IumTaDD5aDoAZanRErJoEzXXBiTXdSwFeMQ8WN3iJFc8mMuAu9M9J6seP19cYBlfz+8tPWd0y23As2lYZCDISR/m7BGz40XTJOkYDRbXojjgr7v4BqKRSe1dYCWRIKrCC5xkM5747r4aV+9n7dor0tR0IOlbkuheHXNeuSvsauFap1LBJf01AklrtCDXomybfQLBe8FwXBB8qJSVEo+wagZ67tWfD8QhUUEtWOa8M3j+ttrCRakPg+RH06jmi+HnS9lLBy0PDm0eHiS9+897h+47tPZ1F4yIHJTm92GnjvS8O+NB33pfjAvtQtxQSy7YBQg1CmGXj+ZoFepOk0FGmyf6ft8afRo3wcuBP0It2F8izdzt/vzP9Dm4cKcaSc4z2lxcksdOHeBVq11+leJqLpG928V7wCG+JrXbXv9+xr3LOz9B/es8cjqX1tTd26lhuUEgM0j9XLp3tcmFEKbboEflCdkqESed51wvsEEkroVRrKQeWaJ0+X6+SeaiUvrxZO+68910f6T+rk4i8=7VjbctsgEP0aP7YjC1uJHxMnbjvTTDOTmV4eiYQlGgQuQrHdry+I1QVhO64v05kmzkPEsixoz9mzxgM0zVcfJF5kdyIhbBAGyWqAbgZhOBwFE/3PWNbWEkWRNaSSJuDUGh7obwLGAKwlTUjhOCohmKIL1xgLzkmsHBuWUixdt7lg7q4LnBLP8BBj5lu/0URlYB1Gk3biI6FpBltfhhd24hHHT6kUJYf9BiGaVx87neM6FrxokeFELDsmdDtAUymEsk/5akqYyW2dNrtutmW2ObckXO2zIIRjqHX96iTRmYChkCoTqeCY3bbW67iUz8SsH+pB9a7VKNCjTOUMJsiKqu+d5x/G5f1YjwqFpboyKGkTF5zUthllDAIRntQeMcNFQWNrBBcT9CdRag3UwaUS2tSe97MQC/ArlBRPZCqYkNUbouDG/DUzNcA699dzwdUM55QZ3n4lMsEcgxl2CgMYdwNWH223yTQZdOAoRCljMCFgM5YpAYQiH7RhQwVdYkTkRMm1dpGEYUWf3egYuJ42fi3e+gEg38KX4AD8X4TcwtyA/hoh98DcwIIj8IWl94LqTcIAdDcaAZygusMocENY1sGqliU67XjdcVsYh2L7PqNg8z6zvzxXS1J7gpayTU72YjHU1DNmJallN2IKUHPoHf0qRT3xrqjwvdIOGrBVO6mfUvN/KvJHyjUihl7ai4lUkxJC60PZ6Na3Nj/KvferFvW29MrRLbZlRhV5WOCKR0vde90C9Hlf09TlvfGd67KqPaEiU4kTSlqeg/nICsGMptwUtY5MpDmLPj/lKbwSYEekIqvdJeTXCyxAocuvsObnstO761rIOm37olcfh0jo6Owd1JXTaobrQ3amzPBHw4FXJrVdXY387opO310PEs2+CKL+N7MXRLbnf7RoRmcSzTuSC5OmU6nkm0SeQiLH0T+UyAuPap/4orTF4iCp30/tgqvOto+Ll0GTLaovdFcwkdMkqbR3Ez9cBp1Epo5Cq+kqO9CabAALnQCsy7P1s/+3M7X9uNuNbXPe/4Lgda2TXxC0Dri8QmM3hO2l3gXBC4SCfqDRXjeNA/rUxBOPe0kKAi0KK/KmIltUZLTlG4ej+eMzychw6OH2pVRvqr8Lr8veNRmdTfX1sP2N0RZl+0Muuv0D
--------------------------------------------------------------------------------
/DigitalCircuits/fig/cmos.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/cmos.PNG
--------------------------------------------------------------------------------
/DigitalCircuits/fig/cmos_ex.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/cmos_ex.PNG
--------------------------------------------------------------------------------
/DigitalCircuits/fig/comparator.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/comparator.jpg
--------------------------------------------------------------------------------
/DigitalCircuits/fig/counter.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/counter.jpg
--------------------------------------------------------------------------------
/DigitalCircuits/fig/decoder.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/decoder.jpg
--------------------------------------------------------------------------------
/DigitalCircuits/fig/design_flow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/design_flow.png
--------------------------------------------------------------------------------
/DigitalCircuits/fig/encoder.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/encoder.jpg
--------------------------------------------------------------------------------
/DigitalCircuits/fig/flip-flops.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/flip-flops.png
--------------------------------------------------------------------------------
/DigitalCircuits/fig/frequency_divisor.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/frequency_divisor.jpg
--------------------------------------------------------------------------------
/DigitalCircuits/fig/johnson.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/johnson.jpg
--------------------------------------------------------------------------------
/DigitalCircuits/fig/latches.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/latches.pdf
--------------------------------------------------------------------------------
/DigitalCircuits/fig/latches.xml:
--------------------------------------------------------------------------------
1 | 7Vxdc6M2FP01fkwGIcD4Mckm7cN2Jm1m2u3TjmIUrC4gF8uJ019fyUgGJPzJh52snIfARRJC9+jcwxUwgnfp6pcczWe/0QgnI9eJViP4ZeS6wAMO/ycs74VlLPaEIc5JJAuVhifyH5ZGWS9ekggvagUZpQkj87pxSrMMT1nNhvKcvtWLvdCkftY5irFheJqixLT+RSI2k1YQTMoDv2ISz+SpQ3dcHHhG0x9xTpeZPN/IhS/rX3E4RaoteaGLGYroW8UE70fwLqeUFVvp6g4nYmzVsBX1HrYc3fQ7xxk7pIIPixqvKFnKa/9d9oy9q9FgeMUbu52xNOEGwDcXLKc/8B1NaM4tGc14ydsXkiSaCSUkzvjulHcHc/vtK84Z4eN8Iw+kJIrEaW7fZoThpzmainO+cVRx23ocseipI5qnGXtAKUkEpv7EeYQyJM0SQK4qpnrBR99Z/7hdXic/P15tHSywcQGHNqYpZvk7LyIrBI70mkR1EPrF/luJEShbnVXQAWU1JFEZb1ouPcM3pHOaHRUYXsERh6zcpTmb0ZhmKLkvrbfTZf66Hj5Q9x5eEfatsv23GOFrX+494pzw7gl3rcedD07+/q26UykvdvUKC4ZydiNmYQmEte2BiMtbl/kHM/Yu3YaWjHJTeQ1fKZ03Ak3484v42xxRsxMcBBDg7EIIziKt19xS6XPhATHsu/HDvUSX+VSWksTHrz/GCg/NKMtxghh5rbfeBjOuMbcNEKn5+BU94+SRLggjVMzLZ8oYTcUwK4ISIxChxWwzH425XZ3/Je/VkKdPfyYc3eBKfta56GG6ikWAucYJZ/lc1LxOaEym32PE8OKaZOv5nHfg/A7owXP8a79GEGDsGAShTFWCCDogCBU6j2KIOsNeFkXsm46XSCGnUQQ0KcJtSRHrqnz40HulwJySjC0qLT8KQyW+AR3ArqPJh701gL+7Bhy3r6H1im8UV1rOk82QHTR1TA1kebJHnvRN0AzIk+MLEFLXwPLkCTzpmTzpDySlPEsR55VS0BmOIsITKMJqp7awqWvR0xjCNxnCuwwlBeGxSsoNj9ZFR9fQetVaSfmWJs+rpIakSQAavB0kTF5zze3Bv0uqDlwt1sNzwwvwi12th0Id51ux+O+olngnisYKuwGnj5ybfHjoDgow3HaXVMtONkChi+wkaEo1nQAFAwfA4uBI5bT1bnkQHDTdSneBA8sHx4aG8+Kg6X7J8sFFxAWl+QbBQZMgtHxwEXFhUBwElg8uAwdmXBgUBzb7egGZllFzbqWaSAEyB1bNpIDJwWDrPP+q+mMzCwMlYNVysiQJLxgur6CySGddydY4IvQ+IUscEGuOTcAWHNE23WpkLn0I63CEQb2JgqdkrRJqR+dtXQ32kz1ZW7287FdnK9PwfFPB4rp/XI+dZrztw/UJUFLR20bQgXLzOjUMGUFPeVp0L204NdqQEfHnXtHsiGlqKjvshWk8P9wdQQu2ax1BYbgzIu4vX4+4rSOoO+k/goaenQk9xFz1qFans+NQClXZjn4p1EqvQ2HQOSG6W6R+D9JLAflzSa9ik16leDpD2dq0IOk8wd8Xb4RNZ13hpZUK20gs5eWxZ6ow31RhSi23UmGfMmf1IdxuqB23QXz35HZorn3mOMXpM3eSXZXY4i/P0VclQnOiAtDTsgQ0lykTiiLrrm2s6ruauzw4GdBd5mpihBiy7triLgD3B8H+nGWKnwWjOR8e1+GsSGVr1m+m34zs4KB+M9XLLbnidyHPJCHs4zoN9pz3A+FYf/CqQXyAoEF9dOE2z9SYdsWgC1Ac/VJnPysG+jcI/P5uW71eFp/qKRAxDyyYzgUmT8uB+OP+wDTEkgT8ycBUezLqopDlB3VkbaRMxwv2nvreivokC9i9YG+U3/PyuX4dWvn2C/yfflU2o4ctyPatyzxfTzH4DSuywGmQ010syXrA8KvVZecIpZ7TDJOOddmhhHdKKPVsKP3cYNJ12djtD0ynvOxuRX7vuqwnZOl65tDbx9a6bM+r6UZ570hd5nWry2RzVpedQZcFDV8D6k+XNQnw2ptJ0811ly8fqREw3kf6w76PdJz74UQjJL/hbaSevqnpmx8wePpUjupynuqO2gjcIRzlGo6yX6nd5igjQ6wedBjCUQd8J8vUc1tdtl2kucMpfnOgKwPpN4QlZWt9R6mFxTCsN7Hlid2Gl1Qmuxs6+W6C75afqi6Kl98Dh/f/Aw==
--------------------------------------------------------------------------------
/DigitalCircuits/fig/logic_gates.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/logic_gates.PNG
--------------------------------------------------------------------------------
/DigitalCircuits/fig/mealy_machine.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/mealy_machine.pdf
--------------------------------------------------------------------------------
/DigitalCircuits/fig/moore_machine.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/moore_machine.pdf
--------------------------------------------------------------------------------
/DigitalCircuits/fig/multiplexer.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/multiplexer.jpg
--------------------------------------------------------------------------------
/DigitalCircuits/fig/nonideal_pulse_characteristics.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/nonideal_pulse_characteristics.jpg
--------------------------------------------------------------------------------
/DigitalCircuits/fig/one-shot.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/one-shot.jpg
--------------------------------------------------------------------------------
/DigitalCircuits/fig/parallel_adder.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/parallel_adder.jpg
--------------------------------------------------------------------------------
/DigitalCircuits/fig/ring_counter.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/ring_counter.jpg
--------------------------------------------------------------------------------
/DigitalCircuits/fig/three_gates.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/three_gates.PNG
--------------------------------------------------------------------------------
/DigitalCircuits/fig/timer.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/timer.PNG
--------------------------------------------------------------------------------
/DigitalCircuits/fig/ttl.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/ttl.PNG
--------------------------------------------------------------------------------
/DigitalCircuits/fig/ttl_ex.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/ttl_ex.PNG
--------------------------------------------------------------------------------
/DigitalCircuits/fig/word-capacity.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/word-capacity.PNG
--------------------------------------------------------------------------------
/DigitalCircuits/fig/word-length.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/fig/word-length.PNG
--------------------------------------------------------------------------------
/DigitalCircuits/main.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalCircuits/main.pdf
--------------------------------------------------------------------------------
/DigitalCircuits/main.tex:
--------------------------------------------------------------------------------
1 | \documentclass{note}
2 | \usepackage{mypackage}
3 |
4 | \renewcommand{\thefootnote}{\fnsymbol{footnote}}
5 |
6 | \title{数字电路与逻辑设计笔记}
7 | \author{陈鸿峥}
8 | \date{{\builddatemonth\today} \footnote{\text{Build \builddate\today}}}%加了build
9 |
10 | \begin{document}
11 |
12 | \maketitle
13 | \renewcommand{\thefootnote}{\arabic{footnote}}
14 | \setcounter{footnote}{0}
15 |
16 | \setcounter{tocdepth}{2}%设置深度
17 | \tableofcontents
18 |
19 | \input{1_introduction}
20 | \input{2_integrated_circuit}
21 | \input{3_combinitorial_circuit}
22 | \input{4_sequential_circuit}
23 | \input{5_circuit_design}
24 |
25 | \end{document}
--------------------------------------------------------------------------------
/DigitalImageProcessing/README.md:
--------------------------------------------------------------------------------
1 | # Digital Image Processing
2 |
3 | 数字图像处理笔记,所用教材Rafel C. Gonzalez, Richard E. Woods, *Digital Image Processing (3rd ed)*, 2011
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/BSF.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/BSF.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/Laplacian.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/Laplacian.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/LoG.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/LoG.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/MPP.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/MPP.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/adjacency.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/adjacency.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/bitmap-dollars.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/bitmap-dollars.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/bitmap.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/bitmap.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/boundary_tracing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/boundary_tracing.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/canny-margin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/canny-margin.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/chain_code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/chain_code.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/chain_code_difference.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/chain_code_difference.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/closing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/closing.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/complements.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/complements.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/convex_hull_SE.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/convex_hull_SE.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/convolution_and_correlation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/convolution_and_correlation.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/differential.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/differential.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/dilation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/dilation.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/edge_detect_noise.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/edge_detect_noise.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/edge_detect_op.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/edge_detect_op.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/edge_model.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/edge_model.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/enhancement.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/enhancement.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/erosion.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/erosion.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/eye.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/eye.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/filter_pass.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/filter_pass.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/fourier_descriptor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/fourier_descriptor.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/fourier_spectrum.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/fourier_spectrum.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/granulometry.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/granulometry.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/high-boost.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/high-boost.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/histogram-normalization.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/histogram-normalization.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/histogram-quality.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/histogram-quality.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/hit-or-miss.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/hit-or-miss.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/homo_filter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/homo_filter.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/hough.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/hough.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/hough2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/hough2.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/impulse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/impulse.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/laplacian_mask.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/laplacian_mask.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/line_approx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/line_approx.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/line_detect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/line_detect.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/noise.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/noise.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/notch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/notch.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/nyquist.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/nyquist.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/opening.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/opening.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/polygon_boundary.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/polygon_boundary.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/pseudo-contour.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/pseudo-contour.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/region_segmentation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/region_segmentation.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/restoration.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/restoration.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/rgb_and_cmyk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/rgb_and_cmyk.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/salt-and-pepper-noise.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/salt-and-pepper-noise.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/shape_number.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/shape_number.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/signature.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/signature.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/simultaneous-contrast.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/simultaneous-contrast.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/skeletons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/skeletons.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/skeletons2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/skeletons2.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/sobel_and_robert.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/sobel_and_robert.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/spectrum_angle_example.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/spectrum_angle_example.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/statistical_moment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/statistical_moment.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/texture_segment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/texture_segment.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/top-hat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/top-hat.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/trans-by-cases.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/trans-by-cases.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/trans-cut.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/trans-cut.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/trans-gamma.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/trans-gamma.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/trans-inverse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/trans-inverse.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/trans-log.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/trans-log.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/trans-power.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/trans-power.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/undershoot-overshoot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/undershoot-overshoot.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/fig/webb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/fig/webb.png
--------------------------------------------------------------------------------
/DigitalImageProcessing/main.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/DigitalImageProcessing/main.pdf
--------------------------------------------------------------------------------
/DigitalImageProcessing/main.tex:
--------------------------------------------------------------------------------
1 | \documentclass{note}
2 | \usepackage[cpp,table]{mypackage}
3 | \usepackage{footnote}
4 | \makesavenoteenv{tabular}
5 |
6 | \renewcommand{\thefootnote}{\fnsymbol{footnote}}
7 |
8 | \title{数字图像处理笔记}
9 | \author{陈鸿峥}
10 | \date{{\builddatemonth\today}\protect\footnote{\text{Build \builddate\today}}} % protect!
11 |
12 | \begin{document}
13 |
14 | \maketitle
15 | \renewcommand{\thefootnote}{\arabic{footnote}}
16 | \setcounter{footnote}{0}
17 |
18 | \setcounter{tocdepth}{2}%设置深度
19 | \tableofcontents
20 |
21 | \bigskip\bigskip
22 |
23 | \input{1_introduction}
24 | \input{2_image_enhancement}
25 | \input{3_frequency_domain}
26 | \input{4_restoration}
27 | \input{5_colorful_images}
28 | \input{6_morphological_images}
29 | \input{7_image_segmentation}
30 | \input{8_representation}
31 |
32 | \end{document}
--------------------------------------------------------------------------------
/MachineLearning/11_feature_selection.tex:
--------------------------------------------------------------------------------
1 | % !TEX root = main.tex
2 |
3 | \section{特征选择}
4 | 特征选择是从原始特征中挑选出最有代表性、性能最好的特征,而特征提取则是用映射(或变换)的方法将原始特征变换维较少的新特征;降维则是通过原始特征构造新的特征,新的特征能够更好表示原始数据,且特征数量较原始特征少。
5 |
6 | \subsection{子集搜索与子集评价}
7 | 特征选择的两个关键环节:子集搜索和子集评价
8 |
9 | 产生初始候选子集,评价候选子集的好坏,基于评价结果产生下一个候选子集。
10 | \begin{itemize}
11 | \item 前向搜索:逐渐增加相关特征
12 | \item 后向搜索:从完整特征集合开始,逐渐减少特征
13 | \item 双向搜索:每一轮逐渐增加相关特征,同时减少无关特征
14 | \end{itemize}
15 |
16 | \subsection{特征选择方法}
17 | \begin{itemize}
18 | \item 过滤型(filter):先进行特征选择,再进行建模;
19 | 评价指标:
20 | \begin{itemize}
21 | \item 皮尔逊相关系数:系数取值区间为$[-1,1]$,$-1$完全负相关,$+1$完全正相关,$0$则没有相关
22 | \[r=\frac{\mathop{cov}(X,Y)}{\mathop{var}(X)\mathop{var}(Y)}\]
23 | 计算简单,但是不能反映变量之间的非线性关系
24 | \item 信息增益:特征子集$A$确定了对数据集$D$的一个划分,$A$上的取值将数据集$D$分为$V$份,每一份用$D^v$表示,$\mathop{Ent}(D^v)$表示$D^v$上的信息熵
25 | \[\mathop{Gain}(D,A)=\mathop{Ent}(D)-\sum_{v=1}^V\frac{|D^v|}{|D|}\mathop{Ent}(D^v)\]
26 | \end{itemize}
27 | \item 封装型(wrapper):直接将学习器的性能作为特征子集的评价标准,如召回率、准确率、AUC等指标。LVW (Las Vegas Wrapper)采用随机策略进行子集搜索,并以最终分类器的误差作为特征子集评价标准
28 | \begin{enumerate}
29 | \item 在循环的每一轮随机产生一个特征子集
30 | \item 在随机产生的特征子集上通过交叉验证推断当前特征子集的误差
31 | \item 多次循环,在多个随机产生的特征子集中选择误差最小的特征子集作为最终解
32 | \end{enumerate}
33 | \item 嵌入型(embedded):将特征选择和模型训练融为一体
34 | \begin{itemize}
35 | \item 正则化方法:L1范数LASSO回归$\lambda\norm{\vw}_1$,L2范数岭回归$\lambda\norm{\vw}_2$
36 | \item 随机森林/决策树:平均不纯度减少,平均精确率减少
37 | \item 递归特征消除(Recursive Feature Eliminiation, RFE):反复构建模型选出最好/最坏的特征,将选出来的特征放到一边,然后在剩余特征上重复这个过程,遍历所有特征。
38 | 在这个过程中特征被消除的次序就是特征的排序。
39 | 消除的稳定性很大程度取决于模型迭代时选用的底层模型。
40 | \end{itemize}
41 | \item 无监督特征选择:Laplacian score选择那些能够最好保持数据流形结构的特征子集
42 | \end{itemize}
43 |
44 | 数据和特征决定了机器学习的上限,而模型和算法意在逼近这个上限,特征工程就是最大限度地从原始数据中提取特征以供算法和模型使用。
--------------------------------------------------------------------------------
/MachineLearning/1_introduction.tex:
--------------------------------------------------------------------------------
1 | % !TEX root = main.tex
2 |
3 | \section{简介}
4 | 机器学习理论主要是设计和分析一些让计算机可以自动“学习”的算法,数据挖掘是用人工智能、机器学习、统计学和数据库的交叉方法在相对较大型的数据集中发现模式的计算过程。
5 | 大体上看,数据挖掘可以视为机器学习和数据库的交叉,它主要利用机器学习界提供的技术来\textbf{分析}海量数据,利用数据库界提供的技术来\textbf{管理}海量数据。
6 |
7 | \begin{quote}
8 | "A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P, improves with experience E."
9 | \hfill---Tom Mitchell
10 | \end{quote}
11 |
12 | \subsection{分类}
13 | 机器学习(machine learning)通常可以分为以下几类:
14 | \begin{itemize}
15 | \item 监督学习(supervised learning):有标签(label)
16 | \begin{itemize}
17 | \item 回归(regression):连续值
18 | \item 分类(classification):离散值
19 | \end{itemize}
20 | \item 无监督学习(unsupervised learning):无标签
21 | \begin{itemize}
22 | \item 降维
23 | \item 聚类(clustering)
24 | \end{itemize}
25 | \item 强化学习(reinforcement learning):延后的标签
26 | \end{itemize}
27 |
28 | \subsection{历史}
29 | \begin{itemize}
30 | \item 推理期(1950-1970):逻辑理论家(Logic Theorist)A.~Newell \& H.~Simon(1975图灵奖)
31 | \item 知识期(1970s):知识工程之父E.~A.~Feigenbaum(1994图灵奖)
32 | \item 学习期(1980s):决策树、归纳逻辑程序设计(Prolog)
33 | \end{itemize}
34 |
35 | 机器学习的五大学派(tribe):
36 | \begin{itemize}
37 | \item 符号主义(symbolist)
38 | \item 联结主义(connectionist)
39 | \item 进化主义(evolutionaries)
40 | \item 贝叶斯主义(bayesians)
41 | \item 类比主义(analogizers)
42 | \end{itemize}
43 | \begin{figure}[H]
44 | \centering
45 | \includegraphics[width=0.8\linewidth]{fig/A-Look-at-Machine-Learning-Evolution.png}
46 | \end{figure}
--------------------------------------------------------------------------------
/MachineLearning/2_basic_concepts.tex:
--------------------------------------------------------------------------------
1 | % !TEX root = main.tex
2 |
3 | \section{基础概念}
4 | \subsection{训练集与测试集}
5 | \begin{itemize}
6 | \item 留出法(hold-out):直接将数据集划分为两个互斥的集合,一个作为训练集,另一个作为测试集
7 | \begin{itemize}
8 | \item 注意数据分布的一致性,通过多次随机划分取平均保证
9 | \item 通常用$2/3\thicksim 4/5$的样本用于训练,其余用作测试
10 | \end{itemize}
11 | \item 交叉验证法(cross validation)/$k$折(fold)交叉验证:划分为$k$个互斥子集,其中$k-1$个用于训练,最后一个用于验证,训练$k$次,对这$k$次结果取平均
12 | \begin{itemize}
13 | \item 通常采用10次10折交叉验证,每次都换划分方式,确保随机性
14 | \end{itemize}
15 | \item 自助法(bootstrapping):从原始数据集中放回采样得到新数据集作为测试集
16 | \begin{itemize}
17 | \item 在数据集较小的、难以有效划分训练/测试集时比较有用
18 | \item 但改变了初始数据集分布,会引入估计偏差
19 | \end{itemize}
20 | \end{itemize}
21 |
22 | 注意:通常将习得模型实际使用中遇到的数据称为测试集,而将训练的数据划分为训练集与验证集(validation)
23 |
24 | \subsection{参数选择}
25 | 参数通常包括
26 | \begin{itemize}
27 | \item 模型本身的参数(parameter):通过学习改变
28 | \item 超参数(superparameter):预先设定,调参实际上就是在选择算法
29 | \end{itemize}
30 |
31 | \subsection{性能度量}
32 | \begin{itemize}
33 | \item 回归:通常采用均方误差(MSE)
34 | \item 分类:错误率、精度
35 | \end{itemize}
36 |
37 | 对于二分类问题,有混淆矩阵(confusion matrix)
38 | \begin{center}
39 | \begin{tabular}{|c|c|c|}\hline
40 | & 预测正 & 预测反\\\hline
41 | 真实正 & TP(真正例) & FN(假反例)\\\hline
42 | 真实反 & FP(假正例) & TN(真反例)\\\hline
43 | \end{tabular}
44 | \end{center}
45 | \[\begin{aligned}
46 | \text{查准率}P&=\frac{TP}{TP+FP}\\
47 | \text{查全率}R&=\frac{TP}{TP+FN}
48 | \end{aligned}\]
49 |
50 | 为了衡量机器学习算法的泛化性能,需要知道以下指标:
51 | \begin{itemize}
52 | \item 方差(variance):度量同样大小的训练集的变动所导致的学习性能的变化,即刻画数据扰动所造成的影响
53 | \[\Var{\vx}=\mathbb{E}_D\lrs{\lrp{f(\vx;D)-\bar{f}(\vx)}^2}\]
54 | \item 偏差(bias):度量学习算法的期望预测和真实结果的偏离程度,即刻画学习算法本身的拟合能力
55 | \[b^2(\vx)=\lrp{\bar{f}(\vx)-y}^2\]
56 | \item 噪声(noise):表达在当前任务上任何学习算法所能达到的期望泛化误差的下界
57 | \[\eps^2=\mathbb{E}_D\lrs{\lrp{y_D-y}^2}\]
58 | \end{itemize}
59 |
60 | 泛化误差可以分解为
61 | \[E(f;D)=b^2(\vx)+\Var{\vx}+\eps^2\]
62 | 即泛化性能是由学习算法的能力、数据的充分性及学习任务本身的难度决定的
63 | \begin{figure}[H]
64 | \centering
65 | \includegraphics[width=0.4\linewidth]{fig/bias-var.png}
66 | \end{figure}
--------------------------------------------------------------------------------
/MachineLearning/7_bayesian.tex:
--------------------------------------------------------------------------------
1 | % !TEX root = main.tex
2 |
3 | \section{贝叶斯优化}
4 | \subsection{高斯混合模型}
5 | 最常用的混合模型即高斯混合模型(Gaussian Mixture Model, GMM),
6 | \[p(\vx)=\sum_{k=1}^K\pi_k\mathcal{N}(\vx\mid\mu_k,\Sigma_k)\]
7 | 代表有$K$个高斯分布进行混合,其中$\pi_k$为混合系数,满足
8 | \[\sum_{k}=1^K\pi_k=1,\pi_k\geq 0,\forall k\]
9 |
10 | 求最大似然
11 | \[\ln p(X\mid\pi,\mu,\Sigma)=\sum_{n=1}^N\ln\lrp{\sum_{k=1}^K\pi_k\mathcal{N}\lrp{\vx^{(n)}\mid\mu_k,\Sigma_k}}\]
12 | 优化变量为$\Theta=\{\pi_k,\mu_k,\Sigma_k\}$。
13 |
14 | \subsection{EM算法}
15 | 未观测变量即隐变量(latent variable),令$X$表示已观测变量集,$Z$表示隐变量集,$\Theta$表示模型参数。
16 | 若对$\Theta$做极大似然估计,则应最大化对数似然
17 | \[LL(\Theta\mid X,Z)=\ln P(X,Z\mid\Theta)\]
18 | 但由于$Z$是隐变量,上式无法直接求解。
19 | 这时可以通过对$Z$计算期望,来最大化已观测数据的对数边际似然(marginal likelihood)
20 | \[LL(\Theta\mid X)=\ln P(X\mid\Theta)=\ln\sum_Z P(X,Z\mid\Theta)\]
21 |
22 | 期望最大化(Expectation-Maximization, EM)算法是常用估计参数隐变量的方法(非梯度优化)。
23 | \begin{itemize}
24 | \item 期望(E)步:利用当前估计的参数值来计算对数似然的期望值
25 | \item 最大化(M)步:寻找能使E步产生的似然期望最大化的参数值
26 | \end{itemize}
27 | 新得到的参数值重新被用于E步,直至收敛至局部最优解。
28 |
29 | 在GMM上用EM算法与K-means非常类似,只不过EM算法是软指派(soft assignment),而且每一个中心根据软指派数据的加权平均进行移动。b
--------------------------------------------------------------------------------
/MachineLearning/README.md:
--------------------------------------------------------------------------------
1 | # Machine Learning
--------------------------------------------------------------------------------
/MachineLearning/fig/A-Look-at-Machine-Learning-Evolution.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MachineLearning/fig/A-Look-at-Machine-Learning-Evolution.png
--------------------------------------------------------------------------------
/MachineLearning/fig/AGNES.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MachineLearning/fig/AGNES.jpg
--------------------------------------------------------------------------------
/MachineLearning/fig/BP.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MachineLearning/fig/BP.png
--------------------------------------------------------------------------------
/MachineLearning/fig/DBSCAN.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MachineLearning/fig/DBSCAN.jpg
--------------------------------------------------------------------------------
/MachineLearning/fig/DT-boundary.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MachineLearning/fig/DT-boundary.png
--------------------------------------------------------------------------------
/MachineLearning/fig/ID3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MachineLearning/fig/ID3.png
--------------------------------------------------------------------------------
/MachineLearning/fig/LDA.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MachineLearning/fig/LDA.png
--------------------------------------------------------------------------------
/MachineLearning/fig/LLE.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MachineLearning/fig/LLE.png
--------------------------------------------------------------------------------
/MachineLearning/fig/LeNet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MachineLearning/fig/LeNet.png
--------------------------------------------------------------------------------
/MachineLearning/fig/MP-neuron.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MachineLearning/fig/MP-neuron.png
--------------------------------------------------------------------------------
/MachineLearning/fig/SVM.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MachineLearning/fig/SVM.png
--------------------------------------------------------------------------------
/MachineLearning/fig/SVR.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MachineLearning/fig/SVR.png
--------------------------------------------------------------------------------
/MachineLearning/fig/TSVM.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MachineLearning/fig/TSVM.png
--------------------------------------------------------------------------------
/MachineLearning/fig/adaboost.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MachineLearning/fig/adaboost.jpg
--------------------------------------------------------------------------------
/MachineLearning/fig/attention.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MachineLearning/fig/attention.png
--------------------------------------------------------------------------------
/MachineLearning/fig/bert.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MachineLearning/fig/bert.png
--------------------------------------------------------------------------------
/MachineLearning/fig/bias-var.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MachineLearning/fig/bias-var.png
--------------------------------------------------------------------------------
/MachineLearning/fig/decision_tree.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MachineLearning/fig/decision_tree.jpg
--------------------------------------------------------------------------------
/MachineLearning/fig/ensemble-learning.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MachineLearning/fig/ensemble-learning.png
--------------------------------------------------------------------------------
/MachineLearning/fig/kNN.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MachineLearning/fig/kNN.png
--------------------------------------------------------------------------------
/MachineLearning/fig/linear-separable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MachineLearning/fig/linear-separable.png
--------------------------------------------------------------------------------
/MachineLearning/fig/multihead.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MachineLearning/fig/multihead.png
--------------------------------------------------------------------------------
/MachineLearning/fig/multivar-DT.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MachineLearning/fig/multivar-DT.png
--------------------------------------------------------------------------------
/MachineLearning/fig/perceptron.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MachineLearning/fig/perceptron.png
--------------------------------------------------------------------------------
/MachineLearning/fig/semi-supervised_learning.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MachineLearning/fig/semi-supervised_learning.jpg
--------------------------------------------------------------------------------
/MachineLearning/fig/soft-margin-loss.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MachineLearning/fig/soft-margin-loss.png
--------------------------------------------------------------------------------
/MachineLearning/fig/stacking.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MachineLearning/fig/stacking.jpg
--------------------------------------------------------------------------------
/MachineLearning/fig/transformer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MachineLearning/fig/transformer.png
--------------------------------------------------------------------------------
/MachineLearning/fig/xor-nonlinear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MachineLearning/fig/xor-nonlinear.png
--------------------------------------------------------------------------------
/MachineLearning/main.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MachineLearning/main.pdf
--------------------------------------------------------------------------------
/MachineLearning/main.tex:
--------------------------------------------------------------------------------
1 | \documentclass{note}
2 | \usepackage[table,optidef]{mypackage}
3 |
4 | \renewcommand{\thefootnote}{\fnsymbol{footnote}}
5 |
6 | \title{机器学习笔记}
7 | \author{陈鸿峥}
8 | \date{{\builddatemonth\today} \protect\footnote{\text{Build \builddate\today}}}%加了build
9 |
10 | \begin{document}
11 |
12 | \maketitle
13 | \renewcommand{\thefootnote}{\arabic{footnote}}
14 | \setcounter{footnote}{0}
15 |
16 | \setcounter{tocdepth}{2}%设置深度
17 | \tableofcontents
18 |
19 | \bigskip\bigskip
20 | 本笔记对应周志华的《机器学习》(西瓜书)。
21 |
22 | \input{1_introduction}
23 | \input{2_basic_concepts}
24 | \input{3_linear_model}
25 | \input{4_decision_tree}
26 | \input{5_neural_network}
27 | \input{6_svm}
28 | \input{7_bayesian}
29 | \input{8_ensemble_learning}
30 | \input{9_clustering}
31 | \input{10_dimension_reduction}
32 | \input{11_feature_selection}
33 | \input{12_semi-supervised}
34 | \input{13_recommendation_system}
35 | \input{reference}
36 |
37 | \end{document}
--------------------------------------------------------------------------------
/MachineLearning/reference.tex:
--------------------------------------------------------------------------------
1 | % !TEX root = main.tex
2 |
3 | \section{参考资料}
4 | \begin{enumerate}
5 | \item 周志华,《机器学习》,2016
6 | \item Jure Leskovec, Stanford CS246: Mining Massive Data Sets, \url{http://web.stanford.edu/class/cs246/}
7 | \end{enumerate}
--------------------------------------------------------------------------------
/MathematicalLogic/README.md:
--------------------------------------------------------------------------------
1 | # Mathematical Logic
2 |
3 | 数理逻辑笔记
--------------------------------------------------------------------------------
/MathematicalLogic/fig/bdd_limitation.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MathematicalLogic/fig/bdd_limitation.jpg
--------------------------------------------------------------------------------
/MathematicalLogic/fig/bdd_reduction1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MathematicalLogic/fig/bdd_reduction1.jpg
--------------------------------------------------------------------------------
/MathematicalLogic/fig/bdd_reduction2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MathematicalLogic/fig/bdd_reduction2.jpg
--------------------------------------------------------------------------------
/MathematicalLogic/fig/bdd_reduction3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MathematicalLogic/fig/bdd_reduction3.jpg
--------------------------------------------------------------------------------
/MathematicalLogic/fig/free_bound_var.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MathematicalLogic/fig/free_bound_var.jpg
--------------------------------------------------------------------------------
/MathematicalLogic/fig/kripke_model.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MathematicalLogic/fig/kripke_model.jpg
--------------------------------------------------------------------------------
/MathematicalLogic/fig/ltl_ctl.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MathematicalLogic/fig/ltl_ctl.jpg
--------------------------------------------------------------------------------
/MathematicalLogic/fig/mutual_exclusion.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MathematicalLogic/fig/mutual_exclusion.jpg
--------------------------------------------------------------------------------
/MathematicalLogic/fig/parse_tree_dag_eg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MathematicalLogic/fig/parse_tree_dag_eg.jpg
--------------------------------------------------------------------------------
/MathematicalLogic/fig/reduce_alg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MathematicalLogic/fig/reduce_alg.jpg
--------------------------------------------------------------------------------
/MathematicalLogic/fig/restrict_alg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MathematicalLogic/fig/restrict_alg.jpg
--------------------------------------------------------------------------------
/MathematicalLogic/fig/shortcut_bdd.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MathematicalLogic/fig/shortcut_bdd.jpg
--------------------------------------------------------------------------------
/MathematicalLogic/fig/transition_system.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MathematicalLogic/fig/transition_system.jpg
--------------------------------------------------------------------------------
/MathematicalLogic/fig/well-formed_formula.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MathematicalLogic/fig/well-formed_formula.jpg
--------------------------------------------------------------------------------
/MathematicalLogic/main.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/MathematicalLogic/main.pdf
--------------------------------------------------------------------------------
/MathematicalLogic/main.tex:
--------------------------------------------------------------------------------
1 | \documentclass{note}
2 | \usepackage[cpp,table]{mypackage}
3 | \usepackage{footnote}
4 | \makesavenoteenv{tabular}
5 | \usepackage{csquotes}
6 | \usepackage{stmaryrd}
7 | \renewcommand{\mkbegdispquote}[2]{\kaiti}
8 | \newcommand{\hoare}[1]{\llparenthesis #1\rrparenthesis}
9 | \newcommand{\htriple}[3]{\hoare{#1}\;#2\;\hoare{#3}}
10 | \newcommand{\op}{\ \mathop{op}\ }
11 | % \newcommand{\eqdef}{\stackrel{def}{=}}
12 | \renewcommand{\thefootnote}{\fnsymbol{footnote}}
13 |
14 | \title{数理逻辑笔记}
15 | \author{陈鸿峥}
16 | \date{{\builddatemonth\today}\protect\footnote{\text{Build \builddate\today}}} % protect!
17 |
18 | \begin{document}
19 |
20 | \maketitle
21 | \renewcommand{\thefootnote}{\arabic{footnote}}
22 | \setcounter{footnote}{0}
23 |
24 | \setcounter{tocdepth}{2}%设置深度
25 | \tableofcontents
26 |
27 | \bigskip\bigskip
28 |
29 | \input{1_propositional_logic}
30 | \input{2_predicate_logic}
31 | \input{3_verification}
32 | \input{4_program_verification}
33 | \input{5_modal_logic}
34 | \input{6_bdd}
35 |
36 | \end{document}
--------------------------------------------------------------------------------
/NaturalLanguageProcessing/3_model.tex:
--------------------------------------------------------------------------------
1 | % !TEX root = main.tex
2 |
3 | \section{语言模型}
4 | 语言模型主要包括统计语言模型和神经语言模型。
5 |
6 | \subsection{统计语言模型}
7 | 考虑语句的先验概率
8 | \[p(s)=\prod_{i=1}^{m}p(w_i\mid w_1\cdots w_{i-1}),\;p(w_1\mid w_0)=p(w_1)\]
9 | 其中$w_i$可以是字、词、短语等,称为\textbf{统计基元},通常用\underline{词}代之。
10 |
11 | 为减少历史基元的个数,将$w_1w_2\cdots w_{i-1}$映射到等价类$S(w_1w_2\cdots w_{i-1})$,使等价类的数目远小于原来不同历史基元的数目,则有
12 | \[p(w_i\mid w_1\cdots w_{i-1})=p(w_i\mid S(w_1\cdots w_{i-1}))\]
13 |
14 | n元文法(n-gram)模型
15 | \begin{itemize}
16 | \item 当$n=1$时,出现在第$i$位上的基元$w_i$独立于历史,1元文法也被uni-gram或monogram
17 | \item $n=2$时,2-gram(bi-gram)称为1阶马尔可夫链
18 | \item $n=3$时,3-gram(tri-gram)称为2阶马尔可夫链,以此类推
19 | \end{itemize}
20 | 实际操作加上句首\verb''和句尾标记\verb''。
21 | \begin{figure}[H]
22 | \centering
23 | \includegraphics[width=0.6\linewidth]{fig/n-gram.png}
24 | \end{figure}
25 |
26 | 应用:
27 | \begin{itemize}
28 | \item 音字转换问题:给定拼音转为汉字串
29 | \item 汉语分词问题
30 | \end{itemize}
31 |
32 | 对于n-gram,由最大似然估计求得
33 | \[p(w_i\mid w_{i-n+1}^{i-1})=f(w_i\mid w_{i-n+1}^{i-1})=\frac{c(w_{i-1+1})}{\sum_{w_i}c(w_{i-n+1}^i)}\]
34 | 其中$\sum_{w_i}c(w_{i-n+1}^i)$是历史串$w_{i-n+1}^{i-1}$在给定语料中出现的次数,即$c(w_{i-n+1}^{i-1})$。
35 |
36 | \begin{definition}[困惑度(perplexity)]
37 | 假定测试语料$T$由$L$个句子$(t_1,\ldots,t_L)$构成,则整个测试集的概率为
38 | \[p(T)=\prod_{i=1}^Lp(t_i)\]
39 | \end{definition}
40 |
41 | 为避免数据匮乏/稀疏导致的零概率问题,需要做数据平滑:调整最大似然估计的概率值,使零概率增值,使非零概率下调,消除零概率,改进模型的整体正确率。
42 | 基本目标是测试样本语言模型的\textbf{困惑度越小越好},基本约束是
43 | \[\sum_{w_i}p(w_i\mid w_1,w_2,\ldots,w_{i-1})=1\]
44 | \begin{itemize}
45 | \item 加一法:
46 | \[p(w_i\mid w_{i-1})=\frac{1+c(w_{i-1}w_i)}{|V|+\sum_{w_i}c(w_{i-1}w_i)}\]
47 | \item 减值法/折扣法:将剩余概率量分配给未见概率
48 | \begin{itemize}
49 | \item Good-Turing估计
50 | \item 绝对减值法:从每个计数$r$中减去相同的量,剩余概率量由未见事件均分
51 | \[p_r=\begin{cases}
52 | \frac{r-b}{N} & r>0\\
53 | \frac{b(R-n_0)}{Nn_0} & r=0
54 | \end{cases}\]
55 | 其中$n_0$为样本中未出现的事件数目,$b\leq 1$为减去的常量,$b(R-n_0)/N$是由于减值而产生的剩余概率量
56 | \end{itemize}
57 | \end{itemize}
58 |
59 | \subsection{神经语言模型}
60 | 对于固定窗口大小的神经网络显然是不适用的,需要采用一种能够处理任意长度输入的架构,即循环神经网络(RNN),不同神经元共享相同的参数。
61 | \begin{figure}[H]
62 | \centering
63 | \includegraphics[width=0.6\linewidth]{fig/RNN.png}
64 | \end{figure}
65 |
66 | RNN的优点:
67 | \begin{itemize}
68 | \item 能够处理任意长度输入
69 | \item $t$时刻可以访问之前任意时刻的信息
70 | \item 对于较长输入,模型大小不变
71 | \item 权重共享
72 | \end{itemize}
73 |
74 | 不足:循环计算过程慢,难以访问到距当前时刻较远的信息。
--------------------------------------------------------------------------------
/NaturalLanguageProcessing/5_question_and_answering.tex:
--------------------------------------------------------------------------------
1 | % !TEX root = main.tex
2 |
3 | \section{问答与对话}
4 | \begin{definition}[问答系统]
5 | 输入:自然语言的问句,而非关键词的组合\\
6 | 输出:直接答案,而非文档集合
7 | \end{definition}
8 |
9 | 优点:
10 | \begin{itemize}
11 | \item 相对于基于知识推理的问答系统而言:不受知识库规模限制,不受领域限制,更加接近真实应用需求
12 | \item 相对于搜索引擎而言:问答式检索系统接受的是自然语言形式的提问,由于自然语言处理技术的应用,对用户意图的把握更加准确,呈现给用户的答案更加准确
13 | \end{itemize}
14 | \par 缺点:目前问答式检索系统仅能处理有限的简单问题,如Factoid问题等
15 |
16 | 问答式检索方法:
17 | \begin{itemize}
18 | \item \textbf{信息检索+信息抽取}
19 | \item \textbf{信息检索+模式匹配}:离线阶段获取答案模式,在线阶段首先判断当前提问属于哪一类,然后使用这类提问的所有模式来抽取候选答案
20 | \item \textbf{信息检索+自然语言处理技术}
21 | \item \textbf{基于统计翻译模型的问答技术}:把提问句看作答案句在同一语言内的一种翻译
22 | \end{itemize}
23 |
24 | 新方法基于深度学习:把回答问题的过程看作一个黑盒,通过复杂神经网络和超大规模数据集训练出一个拟合能力强大的模型。
25 |
26 | 对话管理(状态跟踪和学习)方法:
27 | \begin{itemize}
28 | \item \textbf{有限状态机}(finite state machine):太受限了
29 | \item 基于\textbf{框架}的方法(frame-based):
30 | \begin{itemize}
31 | \item 使用框架的结构指导对话过程:机器根据框架进行提问,人也根据框架进行回复
32 | \item 问答过程就是一个槽-值填充过程:所有槽都填满了,就可以通过信息系统查询
33 | \item 用户可以一次性回答多个系统问题
34 | \end{itemize}
35 | \item \textbf{统计方法(MDP)}:状态、动作、目标
36 | \end{itemize}
--------------------------------------------------------------------------------
/NaturalLanguageProcessing/6_machine_translation.tex:
--------------------------------------------------------------------------------
1 | % !TEX root = main.tex
2 |
3 | \section{机器翻译}
4 | 基本翻译方法
5 | \begin{itemize}
6 | \item 直接转换
7 | \item 基于规则的翻译方法
8 | \item 基于中间语言
9 | \item 基于语料库:基于事例、统计翻译、神经网络翻译
10 | \end{itemize}
11 |
12 | \subsection{基于规则的翻译方法}
13 | \begin{enumerate}
14 | \item 对源语言句子进行词法分析
15 | \item 句法/语义分析
16 | \item 源语言句子结构到译文结构的转换
17 | \item 译文句法结构生成
18 | \item 源语言词汇到译文词汇转换
19 | \item 译文词法选择与生成
20 | \end{enumerate}
21 | \begin{figure}[H]
22 | \centering
23 | \includegraphics[width=0.6\linewidth]{fig/rule-based_mt.png}
24 | \end{figure}
25 |
26 | 优点:保持原文结构、规范语句
27 | \par 弱点:规则由人工编写,工作量大,主观性强,不利于系统扩充,灵活性低(对非规范语言现象无法处理)
28 |
29 | \subsection{基于语料库的翻译方法}
30 | \begin{figure}[H]
31 | \centering
32 | \includegraphics[width=0.6\linewidth]{fig/example-based_mt.png}
33 | \end{figure}
34 |
35 | 优点:不需源语言句子符合语法规定,也不许对源语言句子做深入分析
36 | \par 缺点:两个不同句子之间相似性难以把握,难以处理陌生语言现象,且事例库庞大起来难以搜索
37 |
38 | \subsection{统计翻译}
39 | \subsubsection{基本方法}
40 | \begin{itemize}
41 | \item 源语言:$S=s_1^m=s_1s_2\cdots s_m$
42 | \item 目标语言:$T=t_1^l=t_1t_2\cdots t_n$
43 | \end{itemize}
44 | 通过最大后验求解
45 | \[\argmax_TP(T\mid S)=\argmax_T P(S\mid T)P(T)\]
46 | 其中$P(S\mid T)$为翻译模型(TM),确定了单词和词语如何被翻译(fidelity),从平行语料中学习;
47 | $P(T)$为语言模型(LM),确定怎么写出好的目标语言的句子(fluency),从单语语料中学习。
48 |
49 | 三个关键问题:
50 | \begin{itemize}
51 | \item 估计语言模型概率$P(T)$
52 | \item 估计翻译模型概率$P(S\mid T)$:关键问题是怎样定义目标语言句子中的词与源语言句子中的词之间的对应关系,基本原理是对位(alignment)模型
53 | \item 快速搜索最大值解
54 | \end{itemize}
55 |
56 | \subsubsection{基于短语的翻译模型}
57 | 基于词的翻译模型很难消除歧义,很难处理一对多、多对一问题。
58 | 以短语为基本翻译单元,遵循短语划分、短语翻译、短语调序的步骤。
59 | \begin{definition}[对齐一致性]
60 | $S^j$中每个词$S_k$,若$(k,k')\in A$,则$i'\leq k'\leq j'$,$T_i^j$中每个词$T_{t'}$,若$(t,t')\in A$,则$i\leq t\leq j$。
61 | \end{definition}
62 |
63 | 关键问题是学习短语翻译规则(双语句对词语对齐、短语翻译规则抽取)、估计短语翻译概率。
64 |
65 | \subsection{神经机器翻译}
66 | 统计机器翻译都是人工设定的模块和特征,可解释性高、模块定制化、错误追踪,但是数据稀疏、不擅长复杂结构、依赖先验知识。
67 |
68 | 分布式的语义表示是统计机器翻译到机器翻译的核心
69 | \begin{figure}[H]
70 | \centering
71 | \includegraphics[width=0.6\linewidth]{fig/attention.png}
72 | \end{figure}
73 |
74 | BLEU(BiLingual Evaluation Understudy)评价方法:统计同时出现在系统译文和参考译文中的$n$元词个数,最后把匹配到$n$元词的数目除以系统译文的$n$元词数目,得到评测结果。
--------------------------------------------------------------------------------
/NaturalLanguageProcessing/README.md:
--------------------------------------------------------------------------------
1 | # Natural Language Processing (NLP)
2 |
3 | 自然语言处理笔记
--------------------------------------------------------------------------------
/NaturalLanguageProcessing/fig/CFG.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/NaturalLanguageProcessing/fig/CFG.png
--------------------------------------------------------------------------------
/NaturalLanguageProcessing/fig/PCFG.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/NaturalLanguageProcessing/fig/PCFG.png
--------------------------------------------------------------------------------
/NaturalLanguageProcessing/fig/RNN.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/NaturalLanguageProcessing/fig/RNN.png
--------------------------------------------------------------------------------
/NaturalLanguageProcessing/fig/attention.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/NaturalLanguageProcessing/fig/attention.png
--------------------------------------------------------------------------------
/NaturalLanguageProcessing/fig/best_path.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/NaturalLanguageProcessing/fig/best_path.png
--------------------------------------------------------------------------------
/NaturalLanguageProcessing/fig/chart_parsing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/NaturalLanguageProcessing/fig/chart_parsing.png
--------------------------------------------------------------------------------
/NaturalLanguageProcessing/fig/chart_parsing_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/NaturalLanguageProcessing/fig/chart_parsing_2.png
--------------------------------------------------------------------------------
/NaturalLanguageProcessing/fig/chart_parsing_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/NaturalLanguageProcessing/fig/chart_parsing_3.png
--------------------------------------------------------------------------------
/NaturalLanguageProcessing/fig/dependency_parser.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/NaturalLanguageProcessing/fig/dependency_parser.png
--------------------------------------------------------------------------------
/NaturalLanguageProcessing/fig/dependency_tree.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/NaturalLanguageProcessing/fig/dependency_tree.png
--------------------------------------------------------------------------------
/NaturalLanguageProcessing/fig/entropy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/NaturalLanguageProcessing/fig/entropy.png
--------------------------------------------------------------------------------
/NaturalLanguageProcessing/fig/example-based_mt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/NaturalLanguageProcessing/fig/example-based_mt.png
--------------------------------------------------------------------------------
/NaturalLanguageProcessing/fig/max_matching.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/NaturalLanguageProcessing/fig/max_matching.png
--------------------------------------------------------------------------------
/NaturalLanguageProcessing/fig/n-gram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/NaturalLanguageProcessing/fig/n-gram.png
--------------------------------------------------------------------------------
/NaturalLanguageProcessing/fig/projective.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/NaturalLanguageProcessing/fig/projective.png
--------------------------------------------------------------------------------
/NaturalLanguageProcessing/fig/rule-based_mt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/NaturalLanguageProcessing/fig/rule-based_mt.png
--------------------------------------------------------------------------------
/NaturalLanguageProcessing/fig/word_pos_labeling.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/NaturalLanguageProcessing/fig/word_pos_labeling.png
--------------------------------------------------------------------------------
/NaturalLanguageProcessing/fig/word_seq_labeling.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/NaturalLanguageProcessing/fig/word_seq_labeling.png
--------------------------------------------------------------------------------
/NaturalLanguageProcessing/main.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/NaturalLanguageProcessing/main.pdf
--------------------------------------------------------------------------------
/NaturalLanguageProcessing/main.tex:
--------------------------------------------------------------------------------
1 | \documentclass{note}
2 | \usepackage[cpp,table]{mypackage}
3 | \usepackage{footnote}
4 | \makesavenoteenv{tabular}
5 | \usepackage{csquotes}
6 | \renewcommand{\mkbegdispquote}[2]{\kaiti}
7 |
8 | \renewcommand{\thefootnote}{\fnsymbol{footnote}}
9 |
10 | \title{统计自然语言处理笔记}
11 | \author{陈鸿峥}
12 | \date{{\builddatemonth\today}\protect\footnote{\text{Build \builddate\today}}} % protect!
13 |
14 | \begin{document}
15 |
16 | \maketitle
17 | \renewcommand{\thefootnote}{\arabic{footnote}}
18 | \setcounter{footnote}{0}
19 |
20 | \setcounter{tocdepth}{2}%设置深度
21 | \tableofcontents
22 |
23 | \bigskip\bigskip
24 |
25 | \input{1_introduction}
26 | \input{2_cut}
27 | \input{3_model}
28 | \input{4_syntax}
29 | \input{5_question_and_answering}
30 | \input{6_machine_translation}
31 |
32 | \end{document}
--------------------------------------------------------------------------------
/OperatingSystems/3_threads.tex:
--------------------------------------------------------------------------------
1 | % !TEX root = main.tex
2 |
3 | \section{线程}
4 | 在没有线程概念的系统中,进程是\textbf{资源分配}、调度/执行的单位;而在有线程概念的系统中,线程就成了\textbf{基本调度单位}/程序执行流最小单元,由线程ID、程序计数器、寄存器集合和堆栈组成。
5 |
6 | 线程独立拥有寄存器和栈等现场状态,只会与进程共享地址空间、代码和IO文件资源,\textbf{不与进程共享上下文寄存器}。
7 |
8 | 线程的优点:
9 | \begin{itemize}
10 | \item 创建速度快
11 | \item 终止所用时间少
12 | \item 切换时间少
13 | \item 通信效率高,同一进程无需调用内核,共享存储空间
14 | \end{itemize}
15 |
16 | \bigskip
17 | 用户级线程(ULT):线程管理都由应用程序完成(线程库),内核不知道线程的存在,优点:
18 | \begin{itemize}
19 | \item 线程切换不需要模式切换
20 | \item 调度算法可以应用程序专用
21 | \item ULT不需要内核支持,线程库可以在任何OS上运行
22 | \end{itemize}
23 | 缺点:
24 | \begin{itemize}
25 | \item 一个线程阻塞会导致整个进程阻塞(因用户级线程对操作系统不可见,操作系统对整个进程进行调度)
26 | \item 不能利用多核和多处理器技术
27 | \end{itemize}
28 |
29 | \bigskip
30 | 内核级线程(KLT):线程管理由内核完成(提供API),调度基于线程进行,优点:
31 | \begin{itemize}
32 | \item 线程阻塞不会导致进程阻塞
33 | \item 可以利用多核和多处理器技术
34 | \item 内核例程本身也可以使用多线程
35 | \end{itemize}
36 | 缺点:
37 | \begin{itemize}
38 | \item 线程切换需要进行模式切换
39 | \end{itemize}
40 |
41 | \bigskip
42 | 多线程模型
43 | \begin{itemize}
44 | \item 多对一:多个用户级线程映射到一个内核级线程,线程管理在用户空间进行,效率高;若内核服务阻塞,则整个进程被阻塞
45 | \item 一对一:每个用户级线程映射到一个内核级线程,开销大
46 | \item 多对多:折中
47 | \end{itemize}
48 | \begin{figure}[H]
49 | \centering
50 | \includegraphics[width=0.6\linewidth]{fig/threads.png}
51 | \end{figure}
52 |
53 | 线程与进程之间的关系
54 | \begin{itemize}
55 | \item 1:1,每个进程都有唯一线程,DOS、传统Unix
56 | \item M:1,一个进程多个线程,Windows NT、Linux、Mac OS、iOS
57 | \item 1:M,一个线程可在多个进程环境中迁移
58 | \end{itemize}
59 |
60 | * Linux并不区分线程和进程,采用Copy On Write (COW)方式
--------------------------------------------------------------------------------
/OperatingSystems/8_IO.tex:
--------------------------------------------------------------------------------
1 | % !TEX root = main.tex
2 |
3 | \section{IO管理与磁盘调度}
4 | 控制设备和内存或CPU之间的数据传送方式:
5 | \begin{itemize}
6 | \item 程序控制(programmed IO):需要不断读取IO控制器的状态寄存器,才能决定是否读写数据
7 | \item 中断驱动方式(interrupt-driven IO):IO设备主动打断CPU运行并请求服务
8 | \item 直接内存访问(Direct Memory Access, DMA):直接在IO设备和内存之间开辟直接的数据交换通路
9 | \end{itemize}
10 |
11 | 假脱机技术(Simultaneous Peripheral Operations On Line, SPOOL)/虚拟设备技术:
12 | 专门利用一道程序来完成对设备的IO操作,而无需使用外围IO处理机
13 | \begin{figure}[H]
14 | \centering
15 | \includegraphics[width=0.7\linewidth]{fig/SPOOLing.png}
16 | \end{figure}
17 | 优点是高速虚拟IO操作,实现对独享设备的共享
18 |
19 | IO缓冲:CPU快IO慢,提高外设利用率,尽可能使外设处于忙的状态(多道程序并发);增加缓冲区有利于提高命中率,操作系统采用软件方法实现缓冲技术
20 | \begin{itemize}
21 | \item 单方向缓冲:单缓冲、双缓冲、环形缓冲
22 | \item 双方向缓冲:缓冲池(buffer pool)
23 | \item 循环缓冲
24 | \end{itemize}
25 |
26 | 磁盘调度算法
27 | \begin{itemize}
28 | \item 先来先服务FCFS:公平简单,平均寻道距离大
29 | \item 最短寻找时间优先(shortest seek time first, SSTF):与当前磁头邻近的磁道,性能比FCFS好,可能出现饥饿;移臂距离最小
30 | \item 电梯算法/扫描算法SCAN:比较实用的调度算法:在最短寻找时间优先算法的基础上规定了磁头的方向,不利于磁头一端的访问请求
31 | \item 循环扫描算法C-SCAN:到头会回到另一侧重新开始,移臂方向改变最少
32 | \end{itemize}
33 |
34 | Windows支持两类RAID配置
35 | \begin{itemize}
36 | \item 硬件RAID:若干独立的物理磁盘,通过磁盘控制器或磁盘存储柜,组合成逻辑磁盘。冗余信息的创建和重新生成由控制器负责处理
37 | \item 软件RAID:不连续的磁盘空间通过容错软件磁盘驱动程序(Fault-Tolerant software DISK driver, FTDISK)组合成逻辑分区。Windows的软件RAID机制实现了RAID1(镜像)和RAID5(交错块分布式奇偶校验)
38 | \end{itemize}
--------------------------------------------------------------------------------
/OperatingSystems/README.md:
--------------------------------------------------------------------------------
1 | # Operating Systems
2 |
3 | 操作系统原理笔记,所用教材:William Stallings, *Operating Systems - Internals and Design Principles (8th ed.)*, Pearson, 2017
--------------------------------------------------------------------------------
/OperatingSystems/fig/5-state-process-model.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/OperatingSystems/fig/5-state-process-model.jpg
--------------------------------------------------------------------------------
/OperatingSystems/fig/C_memory.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/OperatingSystems/fig/C_memory.jpg
--------------------------------------------------------------------------------
/OperatingSystems/fig/OS.drawio:
--------------------------------------------------------------------------------
1 | 7V1tb6NGEP41K7UfruJ1d/loEudaqVWlRr3e9RuyiU2LvS7GiX2/vrsYzNuabBzMQIwUJewANsyzM7Mzz0CQebfaf468zfI3NvdDZGjzPTLvkWFgYvLfQnA4CgjVjoJFFMyPIj0XPAbf/VSYHbYL5v62dGDMWBgHm7JwxtZrfxaXZF4UsZfyYU8sLH/rxlv4NcHjzAvr0r+Cebw8SqlBcvnPfrBYZt+sY+e4Z+VlB6d3sl16c/ZSEJlTZN5FjMXHrdX+zg+F7jK9HM97OLP3dGGRv45VTnDjP73VL4f4yx9ffv++//vL56dv00/pxW7jQ3bD/pzffzpkUbxkC7b2wmkudSO2W8998akaH+XH/MrYhgt1LvzHj+NDCqa3ixkXLeNVmO7190H8tbD9TXzUT3Y6ut+nn5wMDtlgHUeHr8VB4SwxzE9LRtl5T2wdpxeiUz4+3q+4ybNqTEVbtotmfoPurHQ6etHCjxuOs09gcyPx2crn18fPi/zQi4Pn8nV46XRdnI7LEeUbKahvADi9yGcv3KXfhKYYORi5GprayHWRO6nPgTDk9iWwflkGsf+48RJFvHALLyMp1+6zH8X+vlm/dX1kJ2T2kjoMHafjl4L5paJlwfIs7UoazDxRD2zkEguBsw9b0T4wpH3YEvuwhXG4OpoSYR+TftmHgftmH0ZNP63Nfq0w+3W12a8XZ78ON/vxEKKDbjb6tjVbjwH/7ZASUEitTiHNYbzURgEjlCqgFBJQLIlQFLkPyNHExkRH9K5XEcrSehahiESDSWinVCyGJ/doUo9hkBq0rZ5pULe7dSoXLHrzwAAc+OkQAj+VmISDHCqsgq9/uVNxpr0yCdMsm8RproOZxBm/rCFqJinEBE1wTYVcAXFZV9s4Yv/6dyxkUW5JT0EYVkReGCzWfDjjCvO53BXqDGZeOEl3rIL5PDwHTtk0i/hYLeFjV1yWBB9Lgo9xNXxkXp/jgxG1kxIIEds3i4+hQeMjc0FEBGPqJPYzTYCyhCFRN9lwbwoxq+rx9DpiuFPEHAliNqJ8JZrUShwLOQ+3jJhRtTFoxLJbqCLGQ1OSO7j34ud28FFITLrFx5AuwygREIkYZQk3eDP4WLRv+DSXx26HHns16TFUyTADK8+KbjIhY/AMmUmBUyGjuTpwGwzZ6yaiWm3M1n39MRFZqjsokgzeREhNPx+NJHvVALJ5PcAYQRsd3AemydoD1VQ34o5Abe59+rBEWYuQmj2DNLvy4XJl4IHKlJUMBkWWwatQop9bIMtedyzmUBcAlg4HqeoCoBwr3rQAsM6DegkDqoyzpUGCml3mcElQC7ovwJQVT0YS9BSKJPh0SrKZsvbWkQQ92Y8BjY+ssjKSoOgsCXoaQ1ECpqytYCRB0VkSFB4xWaPBSII2pUvd4iNrKxhJ0N7gY3Wbzr6XznlLMtty3pMtHRTzW7BkVlYlw6IyRo+rQ77uqNMVfWI8wfMeS5Y6chUmxTERXIiMNP6wPqsW86EbNyw5qZ/jw7P7Omn9YfHRnZ7lPfiKdGgxgCjSLJV6aFdEC1Z9VID0rSPA6fa5wQsY7ndAittdFSijTB1ISLEsTep3H1TFq9nQq4Ls1R9jH1STPRDVVTKx+ub14Figa/f1tOzzlDGG9XlElgkNqrENQ/s8UreJQRrAuzyaavNz79ZxBLC20/PGNnVQ7b6B2vHifDCNbeqQ0r5BeoZnH05jG3ygklHhg2psg1dhncYcG9uK/mKACwBJob9fkF4cKRrInfYApX3rVCSDf7MHgX6zB5ER0kS0dfAYIbpzaNLZMdA2t2ScXqTeBnzVKCWBr1Puh8qS+rHn7WRe0C/+oPInDMaet3M9bwT6NRLUkCA29ryhs/w3PGJnWtttkTKOIawKX6XlCoPDJ0v3x5a4Ez7QLXFOt2XTcoXt+qlwy2QQVX7NKigZ5HSbCl/SpjI0QAnoi3Op5OEKA4dxqpwS1Pi/Hct2fNomapvwA3S82ec7+dYi+StJqB9kLZTHL+M7j9+Xnt2n5LvaWQmefFPZ8xU83NHm5PsHWXvfQ70n88eBRM22lzjVXhli13HW7U5jqAbmbq/dHdO2u3VU3S3o47RUVjarN1NIHWUbHhFfxyOCsy6OLBl43SPeqKOrPt6ECXSuIOMdx1Rc1fqgU3FH/u6zsfZ1QqxicOC1L0f+POFocGq1FehHd07zaXxeVx7QrmdffJj/O8pkX+F/eprT/wE=
--------------------------------------------------------------------------------
/OperatingSystems/fig/OS.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/OperatingSystems/fig/OS.pdf
--------------------------------------------------------------------------------
/OperatingSystems/fig/SPOOLing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/OperatingSystems/fig/SPOOLing.png
--------------------------------------------------------------------------------
/OperatingSystems/fig/TLB.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/OperatingSystems/fig/TLB.png
--------------------------------------------------------------------------------
/OperatingSystems/fig/VRR.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/OperatingSystems/fig/VRR.png
--------------------------------------------------------------------------------
/OperatingSystems/fig/deadlock.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/OperatingSystems/fig/deadlock.png
--------------------------------------------------------------------------------
/OperatingSystems/fig/deadlock2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/OperatingSystems/fig/deadlock2.png
--------------------------------------------------------------------------------
/OperatingSystems/fig/dynamic_partition.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/OperatingSystems/fig/dynamic_partition.png
--------------------------------------------------------------------------------
/OperatingSystems/fig/feedback.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/OperatingSystems/fig/feedback.png
--------------------------------------------------------------------------------
/OperatingSystems/fig/kernels.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/OperatingSystems/fig/kernels.png
--------------------------------------------------------------------------------
/OperatingSystems/fig/memory_address_transformation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/OperatingSystems/fig/memory_address_transformation.png
--------------------------------------------------------------------------------
/OperatingSystems/fig/process_scheduling.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/OperatingSystems/fig/process_scheduling.png
--------------------------------------------------------------------------------
/OperatingSystems/fig/relocation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/OperatingSystems/fig/relocation.png
--------------------------------------------------------------------------------
/OperatingSystems/fig/resource_graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/OperatingSystems/fig/resource_graph.png
--------------------------------------------------------------------------------
/OperatingSystems/fig/short-term-scheduling-all-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/OperatingSystems/fig/short-term-scheduling-all-2.png
--------------------------------------------------------------------------------
/OperatingSystems/fig/short-term-scheduling-all.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/OperatingSystems/fig/short-term-scheduling-all.png
--------------------------------------------------------------------------------
/OperatingSystems/fig/threads.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/OperatingSystems/fig/threads.png
--------------------------------------------------------------------------------
/OperatingSystems/fig/two-level_paging.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/OperatingSystems/fig/two-level_paging.png
--------------------------------------------------------------------------------
/OperatingSystems/main.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chhzh123/CS-Notes/266d6601234a9ac814e9163c40202eaeadc8efde/OperatingSystems/main.pdf
--------------------------------------------------------------------------------
/OperatingSystems/main.tex:
--------------------------------------------------------------------------------
1 | \documentclass{note}
2 | \usepackage[cpp,table]{mypackage}
3 |
4 | \renewcommand{\thefootnote}{\fnsymbol{footnote}}
5 |
6 | \title{操作系统原理笔记}
7 | \author{陈鸿峥}
8 | \date{{\builddatemonth\today}\protect\footnote{\text{Build \builddate\today}}} % protect!
9 |
10 | \begin{document}
11 |
12 | \maketitle
13 | \renewcommand{\thefootnote}{\arabic{footnote}}
14 | \setcounter{footnote}{0}
15 |
16 | \setcounter{tocdepth}{2}%设置深度
17 | \tableofcontents
18 |
19 | \bigskip\bigskip
20 | 本课程使用的教材为William Stallings《操作系统---精髓与设计原理(第八版)》。
21 | 其他参考资料包括Stanford CS140、CMU15-460、\emph{Operating System Concepts (10th ed.)}。
22 | \par 关于计算机系统的内容在此不再赘述,详情参见\textbf{计算机组成原理}的笔记。
23 |
24 | \input{1_introduction}
25 | \input{2_processes}
26 | \input{3_threads}
27 | \input{4_concurrrency}
28 | \input{5_deadlock}
29 | \input{6_memory}
30 | \input{7_scheduling}
31 | \input{8_IO}
32 | \input{9_file_system}
33 |
34 | \end{document}
--------------------------------------------------------------------------------
/PatternRecognition/1_introduction.tex:
--------------------------------------------------------------------------------
1 | % !TEX root = main.tex
2 |
3 | \section{简介} % 1.1-1.6
4 | 机器学习侧重于处理的算法,而模式识别则包括了数据预处理、实际运算和数据输出的完整过程。
5 | \begin{itemize}
6 | \item 模式识别:涵盖的范围广,包括特征提取、特征选择、降维、各种分类器等。
7 | \item 机器学习:主要是讲学习,更多关于分类器如何训练模型,而不涉及特征方面的知识。
8 | \end{itemize}
9 |
10 | 良好特征的四个特点:
11 | \begin{itemize}
12 | \item 可区别性(不同类)
13 | \item 可靠性(同类)
14 | \item 独立性(特征之间)
15 | \item 参数少(复杂性)
16 | \end{itemize}
17 |
18 | 一个对象的所有特征参数组成特征向量。
19 | 同样需要从高维测量空间(样本)中提取特征映射到低维特征空间。
20 |
21 | 模式识别分为两类
22 | \begin{itemize}
23 | \item 结构/句法模式识别
24 | \item 统计/神经网络模式识别
25 | \end{itemize}
26 |
27 | 模式识别系统过程如下
28 | \[\text{传感器}\to\text{分割}\to\text{特征提取}\to\text{\textbf{分类器}}\to\text{后处理}\]
29 | 设计循环
30 | \[\text{采集}\to\text{选择基本特征}\to\text{选择模型}\to\text{训练分类}\to\text{评价}\]
--------------------------------------------------------------------------------
/PatternRecognition/6_neural_network.tex:
--------------------------------------------------------------------------------
1 | % !TEX root = main.tex
2 |
3 | \section{多层神经网络} % 6.1-6.6 6.8 (6.9)
4 | % 前馈网 6.2
5 | % BP 6.3
6 | % 误差表面 6.4
7 | % 6.5 反向传播作为特征映射
8 | % Bayes与NN 6.6
9 | % 激活函数, 权重衰减, early stoping 6.8
10 | % 6.9 二阶技术(Hessian, Newton, Quickprop, 共轭梯度)
11 |
12 | 三层神经网络:输入层、隐含层、输出层,也称多层感知器(multilayer perceptron, MLP)
13 | \begin{figure}[H]
14 | \centering
15 | \includegraphics[width=0.8\linewidth]{fig/forward_propagation.png}
16 | \end{figure}
17 |
18 | 前馈运算如下,判别函数$y_k(\vx,\vw)$为每个输出单元产生的信号
19 | \[y_{k}(\mathbf{x}, \mathbf{w})=\sigma\left(\sum_{j=1}^{M} w_{k j}^{(2)} h\left(\sum_{i=1}^{D} w_{j i}^{(1)} x_{i}+w_{j 0}^{(1)}\right)+w_{k 0}^{(2)}\right)\]
20 |
21 | 任何从输入到输出的连续映射函数都可以用一个三层非线性网络实现,只要有足够的隐单元$M$、适当的非线性函数和权值。
22 |
23 | 最小化误差函数
24 | \[E(\mathbf{w})=\frac{1}{2} \sum_{n=1}^{N}\left\|\mathbf{y}\left(\mathbf{x}_{n}, \mathbf{w}\right)-\mathbf{t}_{n}\right\|^{2}\]
25 |
26 | 隐含层到输出层的权重更新公式为
27 | \[\Delta w_{kj}=\eta\delta_k y_j=\eta(t_k-z_k)f'(net_k)y_j\]
28 | 输入层到隐含层的权重更新公式为
29 | \[\Delta w_{ji}=\eta x_i\delta_j=\eta\lrs{\sum_{k=1}^c w_{kj}\delta_k}f'(net_j)x_i\]
30 |
31 | sigmoid函数
32 | \[f(\text{net})=a\tanh(b\cdot\text{net})=a\lrs{\frac{1-\ee^{-b\cdot \text{net}}}{1+\ee^{-b\cdot\text{net}}}}=\frac{2a}{1+\ee^{-b\cdot\text{net}}}-a\]
33 |
34 | 改进反向传播的一些技术:
35 | \begin{itemize}
36 | \item 输入信号尺度变换(归一化)
37 | \item 带有噪声/人工扩充数据
38 | \item 权值初始化
39 | \item 隐单元数目、权重衰减、隐含层数目
40 | \item 更好的激活函数
41 | \item 优化器(学习率、冲量项)
42 | \item 批训练
43 | \item 早停(early stopping)
44 | \end{itemize}
--------------------------------------------------------------------------------
/PatternRecognition/7_stochastic_methods.tex:
--------------------------------------------------------------------------------
1 | % !TEX root = main.tex
2 |
3 | \section{随机方法} % 7.1-7.3 (7.4-7.5)
4 | 假设给定多个变量$s_i$,其中每个变量数值都取两个离散值之一,记为$\pm 1$。
5 | 优化问题为确定$N$个$s_i$的合适取值,使下述代价函数或能量函数最小
6 | \[E=-\frac{1}{2}\sum_{i,j=1}^N w_{ij}s_is_j\]
7 | 其中$w_{ij}$是对称的,取值可正可负。
8 | \begin{figure}[H]
9 | \centering
10 | \includegraphics[width=0.9\linewidth]{fig/stochastic_opt_problem.png}
11 | \end{figure}
12 |
13 | \subsection{模拟退火} % 7.2 随机搜索
14 | 一个系统具有能量$E_\gamma$通过下式给出
15 | \[P(\gamma)=\frac{\ee^{-E_\gamma/T}}{Z(T)}\]
16 | 其中分子为Boltzmann因子,而$Z$是一个归一化常量/分配(partition)函数
17 | \[Z(T)=\sum_{\gamma'}\ee^{-E_{\gamma'}/T}\]
18 | 为Boltzmann因子对所有构型的求和。
19 |
20 | \begin{algorithm}[H]
21 | \caption{模拟退火(Simulated Annealing)}
22 | \begin{algorithmic}[2]
23 | \State 将网络随机初始化,并设一个高的初始温度$T(1)$
24 | \State 随机选择节点$i$,设其状态为$s_i=+1$,计算该构型下系统总能量$E_a$
25 | \State 改变其道候选状态不$s_i=-1$,系统总能量为$E_b$
26 | \If{$E_b