Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

ECS 150 midterm 3

Rating
-
Sold
-
Pages
9
Grade
A+
Uploaded on
21-12-2024
Written in
2024/2025

Exam of 9 pages for the course ECS 150 at ECS 150 (ECS 150 midterm 3s)

Institution
Course

Content preview

ECS 150 midterm 3 madness


1. Switching to another track located on the same cylinder is instantaneous: -
falsch
2. It takes roughly the same amount of time to access N random sectors as N sequential sectors.:
falsch
3. what is the race condition: when the order of operations between concurrent threads leads
to undesirable/unexpected results.
4. what is safety: a constraint on program behavior such that it never computes the wrong result
5. what is liveness: a constraint on program behavior such that it always produces a result
6. what is a crictial section: Piece of code where the shared resource is accessed
7. True or False a critical section can be accessed by more than one thread at a time: False it can
only be accesed by one thread
8. how can we avoid race condition within the critical sections: the critical section needs to be
properly protected such as disabling preeption and reenabling it later
9. what is Mutual exclusion: only one thread can enter critical section at a time
10.what is race condition: Undesirable/unexpected output of concurrent threads that depends
on order of operations
11.what can cause race condition: Shared variable, indeterministic scheduling, (need more
examples for this one )
12.what are locks: A lock is a synchronization variable that provides mutual exclu- sion
13.what are the two states of locks: locked and free. initial state is generally free
14.what does the lock() or acquire() do?: Wait until lock is free, then grab it(what does it mean
when it says grab it?)
15.what does the unlock() or release() do?: Unlock, and allow one of the threads waiting in
acquire to proceed
16.what are the downsides of disabling preemption?: User applications cannot be allowed to
disable the interrupts, only works on uniprocessor systems, dangerous to have unpreemptable
critical section, distinct critical sections protected by the same lock (bottleneck)
17.what are spin locks: a lock that keeps checking if the current lock is unlocked
18.what is the cons of spinlocks: it wastes cpu cycles during its wait time
19.what are the pros of spinlocks: reduced latency
20.what are the better alternatives to spinlocks: (The answer to this would be semaphores?
right?)
21.What are three main memory issues?: Volatile, Small, Expensive


1/
9

, ECS 150 midterm 3 madness


22. Explain the anatomy of a magnetic disk:: Surface, Platter, Spindle,Head, Arm, Sector,
Track, Arm Assembly, and the Motor
23.How wide is a track?: 1 micron wide
24.What are the diff. types of disk scheduling?: FCFS, First come first serve, SSTF (Shortest
Seek time First), Elevator Algorithm (SCAN, CSCAN, CLOOK)
25.Explain SSTF works, what are the complications?: you assume that the head will start
somehwere, and then you pick the next shortest one. The issue is that it can lead to starvation,
since you never reach the larger people, (keep taking care of old)
26.Explain how SCAN Scheduling works:: Serves the end on one way of the disk, and then will
serve the stuff on the other end of the disk. The middle has an advantage against the
'extremes'. This is a drawback
27.How is the SCAN issue resolved?: This issue is resolved by... C-SCAN. You only serve
requests in ONE direction, and then go to the other end as fast as possible. Back to the
beginning. This means that we can put a lot of power into the arm movement to move it back
and forward/
28.What is one thing that all of these algorithms goal is?: To reduce the total head movement.
29.What is the optimization to the C-SCAN Algorithm?: The optimization is
C-LOOK, which will only go as far as the last request. (It won't go to Zero, or some crazy big
number)
30.What are the other three as a part of scan?: RCSCAN(accounts for the rotation time, moves
arm around a to the second request, and then back to the first, takes adv. of rotation time),
FSCAN(This essentially will service one queue, and then enqueue the other stuff onto another
queue, and then swap queues at the end), NSCAN(This doesn't just have 2 queues, this has 'N'
queues)
31.How is the best algo determined?: Based on the workload.
32.By default, what do instructions have access to?: To processor registers and memory
33.What are the three main memory issues?: Volatile, Small, and Expensive. (Explain how
each is, and why)
34.What are three important factors about memory?: Size, Memory size can range from
small (memory cache), to larger for remote storage. Cost, and Speed(Caches take
nanoseconds, and CPU takes seconds)
35.What are the two types of secondary storage access?: Could either have a block device, or a
Cloud
36.What are the two types of Volatile memory?: SRAM AND DRAM
37.How is SRAM stored?: Stored on transistors/flip flops
38.How is DRAM stored?: Bits are store on capacitors
2/
9

Written for

Course

Document information

Uploaded on
December 21, 2024
Number of pages
9
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$9.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
smartchoices Chamberlain College Of Nursing
Follow You need to be logged in order to follow users or courses
Sold
36
Member since
5 year
Number of followers
5
Documents
4499
Last sold
2 weeks ago

4.8

9 reviews

5
7
4
2
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions