ecs150 Operating Systems Midterm Exam. Spring 2009 May 8th, 2009
ECS150, Spring 2009, Midterm Exam
Name:
_
Student ID:
_
Email:
_
Important Instructions:
Open book/notes (but not person).
We have totally 6 questions (2% or 3% each question, and totally
ECS150, Spring 2014, Programming Assignment #1
Due date: 11:59 p.m., April 18, 2014
Total 10% (1% penalty per 24 hours after the due date)
Modifying the FreeBSD 5.4 kernel and Loading new kernel modules
In this homework assignment, you will learn how to
ECS150
WQ2015
HW4
Due: Thursday, March 12, 4:30 PM, HW box
As with HW3, you can view this homework as a preview of the final
None of these are difficult although several, e.g. (1), are tricky
320
320
322
323
324
324
325
325
325
326
326
329
CHAPTER 1
Basic concepts and
terminology
329
330
337
337
339
1
4
341
5
343
In this chapter we will briefly review some basic ideas and terminology that we shall
make use of throughout thi
ECS150
WQ2015
Programming Assignment 2
Process management in MINIX
Due Wednesday, February 18, 4:30 PM, via SmartSite
These problems ask you to make very small modifications to Minix. You will modify the kernel,
recompile and assemble it using MAKE to lin
52
CHAPTER 2 / OPERATING SYSTEM OVERVIEW
the use of graphics terminals and pagemode terminals instead of lineata
time scroll mode terminals affects as design. For example, a graphics terminal
typically allows the user to view several applications at th
APPENDIX A
B
eave it up to the
)mpiler had been
:haracteristic of C,
arter, consider the
INTRODUCTION
TO THE
IBM PC
) a counter. What
lted to by q to the
:er is decremented,
) they successively
)f writing this loop
1t to the zeroth e\e
eached the addr
ECS150
WQ2013
Programming Assignment 3
I/O, Process Manager (memory management) and File System (as an addendum to follow)
Due: Monday, March 17, 4:55 PM
These problems ask you to make very small modifications to Minix tasks or servers. You will be
Modify
ECS150
WQ2015
HW3
Due: Monday, March 2, 4:30 PM, HW box
You can view this homework as a preview of the final, at least for questions on Deadlock
and IPC
cfw_1 Tanenbaum, Chapter 2, 41
cfw_2 Tan
ECS150
WQ 2015
HW #2 More on System Calls, Scheduling, MINIX Process Management
Due: Wednesday, Feb. 4, 4:30 PM, HW box in Kemper
These problems will help you study for the Feb. 11 MT
1 Tanenbaum Book,
ECS150
WQ 2015
Programming Assignment Number 1
Unix System Calls
Due: Monday, January 26, 2015, 4:30 PM via SmartSite
Submission and grading instructions to be posted but assume we will do interactive
grading
COS 318: Operating Systems
Semaphores, Monitors and
Condition Variables
Kai Li
Computer Science Department
Princeton University
(http:/www.cs.princeton.edu/courses/cos318/)
Todays Topics
Semaphores
Monitors
Mesastyle monitors
Programming idiom
Barrie
W4118: segmentation and paging
Instructor: Junfeng Yang
Outline
Memory management goals
Segmentation
Paging
TLB
1
Uni v.s. multiprogramming
Simple uniprogramming with a single segment
per process
Uniprogramming disadvantages
Only one process can run a t
Segmentation
May be unequal, dynamic size
Simplifies handling of growing data
structures
Allows programs to be altered and
recompiled independently
Lends itself to sharing data among
processes
Lends itself to protection
1
Segment Tables
Correspondin
Deadlock
definitions
processes blocked on resource requests that can never be satisfied
2 or more processes holding resources and needing more to proceed
real (?) life examples
trains

gridlock
r, ,,
r,
I
I
I
~~
I
I
I
~~
I
I
~~
,, r, ,,
,
_I
08_02_syscalls
.'<~y:~
,~;.:~L~
General rules for system calls:
return 1 if an error
set errno (a global variable) based on outcome
Operating System  manages
processes (jobs)
resources
cpu (time)
memory
files
o
~
1n
problem
S.L/'
rr\ ,~
UCDavis, ecs150
Fall 2010
:
Operating System
Ecs150 Spring 2013
#4: Memory Management
(chapter 5)
Dr. S. Felix Wu
Computer Science Department
University of California, Davis
http:/www.cs.ucdavis.edu/~wu/
sfelixwu@gmail.com
05/30/2013
ecs150, Spring 2013
1
ECS150 Spring Quarter 2014
Discussion2
Yuxi Hu
Office Hour: 3pm6pm on Fridays
55 Kemper Hall
TA Office Hours
Office Hours:
Tim ChunMing Lai: 6:30pm  8pm on Tuesdays and on Thursdays
Jason Teng Wang: 3pm5pm on Thursdays
Yuxi (Darren) Hu: 3pm6pm on F
Dynamic Programming
Fourstep (twophase) method:
1. Characterize the structure of an optimal solution
2. Recursively dene the value of an optimal solution
3. Compute the value of an optimal solution in a bottomup fashion
4. Construct an optimal solution
Lecture 2:
Divide and Conquer I:
MergeSort and Master Theorem
ShangHua Teng
Example Problem: Sorting
Input: Array A[1.n], of elements in
arbitrary order; array size n
Output: Array A[1.n] of the same elements,
but in the nondecreasing order
Algorithm
01 Knapsack problem revisit
Problem statement:
01 Knapsack problem revisit
Problem statement:
Input: n items cfw_1, 2, . . . , n
Item i is worth vi and weight wi
Total weight W
01 Knapsack problem revisit
Problem statement:
Input: n items cfw_1, 2, . .
Graph Algorithms: Introduction
Basic terminology:
Graph G = (V, E)
V = set of vertices cfw_vi
E = set of edges = a subset of V V = cfw_(vi , vj )
Graph Algorithms: Introduction
Basic terminology:
Graph G = (V, E)
V = set of vertices cfw_vi
E = set of ed
Graph Algorithms: DepthFirst Search (DFS)
another archetype for many important graph algorithms
methodically explore every vertex and every edge
Input: Given G = (V, E)
Output: 2 timestamps for every v E
d[v] = when v is rst discovered.
f [v] = when v is
ECS122A Homework Assignment #2
Due: 4:00pm, April 18, 2014
1. (a) Show that (n + 2)10 = (n10 )
(b) Show that for any real constants a and b, where b > 0,
(n + a)b = (nb )
2. Explain why the statement The running time of algorithm A is at least O(n2 ). is
ecs150 fall 2010 midterm
Name:
Student ID:
Email:
Open book and totally 3 questions (4%/8% each), 8 pages.
Please write precise and clean answers (should be around half to one full page). But, please do not leave it
blank there as I will give partial cred
ECS150 Spring Quarter 2014
Discussion9
Yuxi Hu
<darrenyxhu@gmail.com>
Annoucement
Midterm grades are available/under updating on Smartsite
Please meet Prof. Wu for questions about midterm grading
HW#3 grades will be available on June 3rd.
Please meet T
Homework 3 Solution
Problem 1
[10 points]
A student majoring in anthropology and minoring in computer science has embarked on a research
project to see if African baboons can be taught about deadlocks. He locates a deep canyon and
fastens a rope across it
Homework 1
Problem 1
[10 points]
Which of the following instructions should be allowed only in kernel mode?
(a) Disable all interrupts.
(b) Read the timeofday clock.
(c) Set the timeofday clock.
(d) Change the memory map.
MINIX Book, Chapter 1, proble