<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://homeostasis.scs.carleton.ca/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vnguyen</id>
	<title>Soma-notes - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://homeostasis.scs.carleton.ca/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vnguyen"/>
	<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php/Special:Contributions/Vnguyen"/>
	<updated>2026-05-02T08:08:46Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Week_4_Notes&amp;diff=17354</id>
		<title>COMP 3000 2012 Week 4 Notes</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Week_4_Notes&amp;diff=17354"/>
		<updated>2012-09-29T00:33:17Z</updated>

		<summary type="html">&lt;p&gt;Vnguyen: /* Interrupts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Package Management ==&lt;br /&gt;
&lt;br /&gt;
* Two popular ones&lt;br /&gt;
# dpkg ---&amp;gt; debian&lt;br /&gt;
# rpm  ---&amp;gt; redhat&lt;br /&gt;
# portage --&amp;gt; gentoo. Compile packages from source&lt;br /&gt;
&lt;br /&gt;
* Historically, packages distrobuted via compressed archives (filename.tar.gz)&lt;br /&gt;
** Tar --&amp;gt; archives uncompressed&lt;br /&gt;
** .gz, .bz2 --&amp;gt;  compression&lt;br /&gt;
* This method does not take into consideration dependencies, -pre&amp;amp;post install scripts&lt;br /&gt;
&lt;br /&gt;
Package management&#039;s true innovation was that it handled all this.&lt;br /&gt;
&lt;br /&gt;
Yum, apt-get, aptitude are wrappers built around rpm and dpkg. These also maintain&lt;br /&gt;
lists of repos and do alot of other things. &amp;quot;They have alot of smarts.&amp;quot; Basic&lt;br /&gt;
functionality is done by dpkg/rpm, though. Use yum and apt-get for system upgrades.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Package management empowers you to know all the dependencies and files needed for a&lt;br /&gt;
a binary. It allows you absolute control over the binaries in your system.&lt;br /&gt;
* you can strip down linux to the base essentials&lt;br /&gt;
* helps you debug programs not that don&#039;t start &lt;br /&gt;
&lt;br /&gt;
Dpkg files are basically tar balls (archives). The same format dating back from the&lt;br /&gt;
70&#039;s. They contain all the scripts and binaries needed to install the system.&lt;br /&gt;
&lt;br /&gt;
* on Mac, package management is less of a problem because &amp;quot;applications&amp;quot; are directories containing all the files needed by the program&lt;br /&gt;
* before package managers, linux used tarballs (X.tar.gz)&lt;br /&gt;
** tar&lt;br /&gt;
*** tape archiver&lt;br /&gt;
*** combines files&lt;br /&gt;
*** no compression&lt;br /&gt;
** cpio&lt;br /&gt;
*** copy I/O&lt;br /&gt;
*** similar to tar&lt;br /&gt;
** gz&lt;br /&gt;
*** gnu zip&lt;br /&gt;
** bz2&lt;br /&gt;
*** bzip&lt;br /&gt;
*** competes with gzip&lt;br /&gt;
* package manager&lt;br /&gt;
** encodes dependencies&lt;br /&gt;
** pre/post installation scripts&lt;br /&gt;
** mostly written in shell scripts&lt;br /&gt;
** NB: can uninstall the shell (BAD IDEA)&lt;br /&gt;
* &amp;quot;metapackage managers&amp;quot;&lt;br /&gt;
** built on top of package managers&lt;br /&gt;
** installs missing dependencies&lt;br /&gt;
** resolves conflicts&lt;br /&gt;
** examples&lt;br /&gt;
*** yum&lt;br /&gt;
*** apt&lt;br /&gt;
*** aptitude&lt;br /&gt;
* kernel&lt;br /&gt;
** runs on the hardware&lt;br /&gt;
* regular applications&lt;br /&gt;
** run as processes on the kernel&lt;br /&gt;
** each has its own virtual address space&lt;br /&gt;
* virtual address space&lt;br /&gt;
** maps a virtual address like 2000 to a physical address in memory&lt;br /&gt;
** elaborate virtual memory mechanism (we&#039;ll talk about this later)&lt;br /&gt;
* libraries&lt;br /&gt;
** one copy loaded into memory, shared between running processes&lt;br /&gt;
** breaks the notion of process separation&lt;br /&gt;
* static linked library&lt;br /&gt;
** puts the full library into memory with the program&lt;br /&gt;
** allows complete pocess separation&lt;br /&gt;
** wasteful because many copies of the library will be loaded into memory&lt;br /&gt;
* system caller&lt;br /&gt;
** calls from a process to the kernel&lt;br /&gt;
** can watch this to determine how a process is interacting with the outside world through the kernel&lt;br /&gt;
** tools&lt;br /&gt;
*** strace&lt;br /&gt;
**** watch system calls made by a process&lt;br /&gt;
*** ltrace&lt;br /&gt;
**** watch library calls made by a process&lt;br /&gt;
&lt;br /&gt;
== System Calls ==&lt;br /&gt;
&lt;br /&gt;
* strace&lt;br /&gt;
* CPU has two modes&lt;br /&gt;
** user mode&lt;br /&gt;
*** processes run in this mode&lt;br /&gt;
** supervisor mode&lt;br /&gt;
*** kernel runs in this mode&lt;br /&gt;
&lt;br /&gt;
* A process can be at many different states, such as:&lt;br /&gt;
** running : on CPU and executing&lt;br /&gt;
** ready : ready to run&lt;br /&gt;
** blocked : waiting on I/O&lt;br /&gt;
&lt;br /&gt;
== Interrupts ==&lt;br /&gt;
* Scheduler decides what happens next.&lt;br /&gt;
* Disk, network, user input devices, clock, etc can cause interrupt.&lt;br /&gt;
* When making system calls =&amp;gt; generate software interrupt&lt;br /&gt;
* On interrupt:&lt;br /&gt;
** save CPU state &amp;lt;- registers to process structure&lt;br /&gt;
** switch to supervisor mode&lt;br /&gt;
** run interrupt handler (system call dispatcher)&lt;br /&gt;
** return to user space (scheduler will restore the CPU state)&lt;/div&gt;</summary>
		<author><name>Vnguyen</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Week_4_Notes&amp;diff=17353</id>
		<title>COMP 3000 2012 Week 4 Notes</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Week_4_Notes&amp;diff=17353"/>
		<updated>2012-09-29T00:31:03Z</updated>

		<summary type="html">&lt;p&gt;Vnguyen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Package Management ==&lt;br /&gt;
&lt;br /&gt;
* Two popular ones&lt;br /&gt;
# dpkg ---&amp;gt; debian&lt;br /&gt;
# rpm  ---&amp;gt; redhat&lt;br /&gt;
# portage --&amp;gt; gentoo. Compile packages from source&lt;br /&gt;
&lt;br /&gt;
* Historically, packages distrobuted via compressed archives (filename.tar.gz)&lt;br /&gt;
** Tar --&amp;gt; archives uncompressed&lt;br /&gt;
** .gz, .bz2 --&amp;gt;  compression&lt;br /&gt;
* This method does not take into consideration dependencies, -pre&amp;amp;post install scripts&lt;br /&gt;
&lt;br /&gt;
Package management&#039;s true innovation was that it handled all this.&lt;br /&gt;
&lt;br /&gt;
Yum, apt-get, aptitude are wrappers built around rpm and dpkg. These also maintain&lt;br /&gt;
lists of repos and do alot of other things. &amp;quot;They have alot of smarts.&amp;quot; Basic&lt;br /&gt;
functionality is done by dpkg/rpm, though. Use yum and apt-get for system upgrades.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Package management empowers you to know all the dependencies and files needed for a&lt;br /&gt;
a binary. It allows you absolute control over the binaries in your system.&lt;br /&gt;
* you can strip down linux to the base essentials&lt;br /&gt;
* helps you debug programs not that don&#039;t start &lt;br /&gt;
&lt;br /&gt;
Dpkg files are basically tar balls (archives). The same format dating back from the&lt;br /&gt;
70&#039;s. They contain all the scripts and binaries needed to install the system.&lt;br /&gt;
&lt;br /&gt;
* on Mac, package management is less of a problem because &amp;quot;applications&amp;quot; are directories containing all the files needed by the program&lt;br /&gt;
* before package managers, linux used tarballs (X.tar.gz)&lt;br /&gt;
** tar&lt;br /&gt;
*** tape archiver&lt;br /&gt;
*** combines files&lt;br /&gt;
*** no compression&lt;br /&gt;
** cpio&lt;br /&gt;
*** copy I/O&lt;br /&gt;
*** similar to tar&lt;br /&gt;
** gz&lt;br /&gt;
*** gnu zip&lt;br /&gt;
** bz2&lt;br /&gt;
*** bzip&lt;br /&gt;
*** competes with gzip&lt;br /&gt;
* package manager&lt;br /&gt;
** encodes dependencies&lt;br /&gt;
** pre/post installation scripts&lt;br /&gt;
** mostly written in shell scripts&lt;br /&gt;
** NB: can uninstall the shell (BAD IDEA)&lt;br /&gt;
* &amp;quot;metapackage managers&amp;quot;&lt;br /&gt;
** built on top of package managers&lt;br /&gt;
** installs missing dependencies&lt;br /&gt;
** resolves conflicts&lt;br /&gt;
** examples&lt;br /&gt;
*** yum&lt;br /&gt;
*** apt&lt;br /&gt;
*** aptitude&lt;br /&gt;
* kernel&lt;br /&gt;
** runs on the hardware&lt;br /&gt;
* regular applications&lt;br /&gt;
** run as processes on the kernel&lt;br /&gt;
** each has its own virtual address space&lt;br /&gt;
* virtual address space&lt;br /&gt;
** maps a virtual address like 2000 to a physical address in memory&lt;br /&gt;
** elaborate virtual memory mechanism (we&#039;ll talk about this later)&lt;br /&gt;
* libraries&lt;br /&gt;
** one copy loaded into memory, shared between running processes&lt;br /&gt;
** breaks the notion of process separation&lt;br /&gt;
* static linked library&lt;br /&gt;
** puts the full library into memory with the program&lt;br /&gt;
** allows complete pocess separation&lt;br /&gt;
** wasteful because many copies of the library will be loaded into memory&lt;br /&gt;
* system caller&lt;br /&gt;
** calls from a process to the kernel&lt;br /&gt;
** can watch this to determine how a process is interacting with the outside world through the kernel&lt;br /&gt;
** tools&lt;br /&gt;
*** strace&lt;br /&gt;
**** watch system calls made by a process&lt;br /&gt;
*** ltrace&lt;br /&gt;
**** watch library calls made by a process&lt;br /&gt;
&lt;br /&gt;
== System Calls ==&lt;br /&gt;
&lt;br /&gt;
* strace&lt;br /&gt;
* CPU has two modes&lt;br /&gt;
** user mode&lt;br /&gt;
*** processes run in this mode&lt;br /&gt;
** supervisor mode&lt;br /&gt;
*** kernel runs in this mode&lt;br /&gt;
&lt;br /&gt;
* A process can be at many different states, such as:&lt;br /&gt;
** running : on CPU and executing&lt;br /&gt;
** ready : ready to run&lt;br /&gt;
** blocked : waiting on I/O&lt;br /&gt;
&lt;br /&gt;
== Interrupts ==&lt;br /&gt;
&lt;br /&gt;
* On interrupt:&lt;br /&gt;
** save CPU state &amp;lt;- registers to process structure&lt;br /&gt;
** switch to supervisor mode&lt;br /&gt;
** run interrupt handler (system call dispatcher)&lt;br /&gt;
** return to user space (scheduler will restore the CPU state)&lt;/div&gt;</summary>
		<author><name>Vnguyen</name></author>
	</entry>
</feed>