<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://homeostasis.scs.carleton.ca/wiki/index.php?action=history&amp;feed=atom&amp;title=Operating_Systems_2022F_Lecture_18</id>
	<title>Operating Systems 2022F Lecture 18 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://homeostasis.scs.carleton.ca/wiki/index.php?action=history&amp;feed=atom&amp;title=Operating_Systems_2022F_Lecture_18"/>
	<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2022F_Lecture_18&amp;action=history"/>
	<updated>2026-04-05T22:41:56Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2022F_Lecture_18&amp;diff=24145&amp;oldid=prev</id>
		<title>Soma: Created page with &quot;==Video==  Video from the lecture given on November 17, 2022 is now available: * [https://homeostasis.scs.carleton.ca/~soma/os-2022f/lectures/comp3000-2022f-lec18-20221117.m4v video] * [https://homeostasis.scs.carleton.ca/~soma/os-2022f/lectures/comp3000-2022f-lec18-20221117.cc.vtt auto-generated captions] Video is also available through Brightspace (Resources-&gt;Zoom meeting-&gt;Cloud Recordings tab)  ==Notes==  &lt;pre&gt; Lecture 18 ----------  Side note:  - there are only *thre...&quot;</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2022F_Lecture_18&amp;diff=24145&amp;oldid=prev"/>
		<updated>2022-11-17T22:06:22Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Video==  Video from the lecture given on November 17, 2022 is now available: * [https://homeostasis.scs.carleton.ca/~soma/os-2022f/lectures/comp3000-2022f-lec18-20221117.m4v video] * [https://homeostasis.scs.carleton.ca/~soma/os-2022f/lectures/comp3000-2022f-lec18-20221117.cc.vtt auto-generated captions] Video is also available through Brightspace (Resources-&amp;gt;Zoom meeting-&amp;gt;Cloud Recordings tab)  ==Notes==  &amp;lt;pre&amp;gt; Lecture 18 ----------  Side note:  - there are only *thre...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Video==&lt;br /&gt;
&lt;br /&gt;
Video from the lecture given on November 17, 2022 is now available:&lt;br /&gt;
* [https://homeostasis.scs.carleton.ca/~soma/os-2022f/lectures/comp3000-2022f-lec18-20221117.m4v video]&lt;br /&gt;
* [https://homeostasis.scs.carleton.ca/~soma/os-2022f/lectures/comp3000-2022f-lec18-20221117.cc.vtt auto-generated captions]&lt;br /&gt;
Video is also available through Brightspace (Resources-&amp;gt;Zoom meeting-&amp;gt;Cloud Recordings tab)&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Lecture 18&lt;br /&gt;
----------&lt;br /&gt;
&lt;br /&gt;
Side note:&lt;br /&gt;
 - there are only *three* rendering engines that can handle the modern web:&lt;br /&gt;
   - Blink (Chrome), a fork of WebKit&lt;br /&gt;
   - WebKit (Safari)&lt;br /&gt;
   - Gecko (Firefox)&lt;br /&gt;
&lt;br /&gt;
Note Edge uses Blink&lt;br /&gt;
&lt;br /&gt;
On iOS everything must use WebKit, so even Firefox on iOS uses WebKit not Gecko&lt;br /&gt;
(On Android things are different, Firefox is its own thing there)&lt;br /&gt;
&lt;br /&gt;
A3 is due on Monday, Nov. 21st&lt;br /&gt;
 - will be accepted until just before class on Tuesday, Nov. 22nd&lt;br /&gt;
 - I&amp;#039;ll be posting solutions and going over them in class on the 22nd&lt;br /&gt;
 - so T5 &amp;amp; T6 is also due then&lt;br /&gt;
&lt;br /&gt;
A4 will be released before Nov. 21st&lt;br /&gt;
 - T7, T8, &amp;amp; T9 will be due when A4 is due on Dec. 7th&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Tutorial 8 (cont.)&lt;br /&gt;
----------&lt;br /&gt;
&lt;br /&gt;
Remember that all devices have a major and minor number&lt;br /&gt;
 - major number designates the driver&lt;br /&gt;
 - minor specifies which device (in case one driver can be&lt;br /&gt;
   responsible for multiple devices)&lt;br /&gt;
&lt;br /&gt;
When we create a new device with a module, we must allocate a new major number for this device (dynamically) and then we can number off our own devices for the minor number (so, probably just use 0 if we just have one instance)&lt;br /&gt;
&lt;br /&gt;
In ones_read(), why do we call put_user() rather than just writing something like&lt;br /&gt;
   *buf++ = &amp;#039;1&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
Remember that buf is a pointer to userspace, i.e., the address space of a specific process!&lt;br /&gt;
 - we have to treat accessing userspace differently from regular kernel data&lt;br /&gt;
&lt;br /&gt;
Remember that every process, and the kernel itself, have their own address space&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also, note that ones_read() only writes a finite amount.  Why does reading from /dev/ones appear infinite?&lt;br /&gt;
 - where is the loop that makes it infinite?  Is it in the kernel?&lt;br /&gt;
 - NO, it is in userspace!&lt;br /&gt;
    - it becomes infinite because programs keep making read system calls&lt;br /&gt;
      because they don&amp;#039;t get an end of file&lt;br /&gt;
&lt;br /&gt;
&amp;quot;current&amp;quot; in the Linux kernel always refers to the currently running task (process/thread)&lt;br /&gt;
 - in other words, the task that made the system call that got us into the kernel&lt;br /&gt;
 - in the kernel, a &amp;quot;task&amp;quot; is the abstraction applied to kernel threads and processes&lt;br /&gt;
 - a task is something that can be run on a core&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
How did I know to use task_tgid_vnr() to get the process ID of the current task?&lt;br /&gt;
 - look at the source for the getpid system call!&lt;br /&gt;
&lt;br /&gt;
When you want to do something in the kernel, best bet is to find source from a part of the kernel that does something similar&lt;br /&gt;
 - then you can adapt what it does to your problem!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Soma</name></author>
	</entry>
</feed>