Shared Flashcard Set

Details

OS quizzes
os
26
Computer Science
Undergraduate 4
05/01/2007

Additional Computer Science Flashcards

 


 

Cards

Term
consider the following cache for a main memory system: cache access time is 25ns, Penalty time is 300ns, and Hit ratio is 75% Please calculate the Average Access Time for this cached mem. system
Definition
100ns
Term
Define the difference between user-level threads and kernel-level threads.
Definition
Kernel threads need not be associated with a process whereas every user thread belongs to a process. User-level threads are unknown to the kernel while kernel-level threads are
Term
What benefits do thread pools provide ?
Definition
eliminates the need for destroy/create routines. threads can be used over and over again. Eliminates a lot of overhead
Term
Which of the following components of program state are shard across threads in a multi threaded process ?

A. Register Values
B. Heap Memory
C. Global Variables
D. Stack Memory
Definition
Heap mem & global variables
Term
Process Burst Time
P1 10
P2 1
P3 2
P4 1
P5 5
processes arrive in order: 1,2,3,4,5
Do FCFS and SJF
Do TT
Definition
FCFS:
P1 | P2 | P3 | P4 | P5 |
0 10 11 13 14 19

SJF:
P2 | P4 | P3 | P5 | P1 |
0 1 2 4 9 19

What is the turnaround time of EACH process for each of the
scheduling algorithms in part a?
Turn around time:
FCFS SJF
P1 10 19
P2 11 1
P3 13 4
P4 14 2
P5 19 9
Term
What are the differences between a trap and a hardware-generated interrupt ?
Definition
a trap is generated by software (an error or a system call). A hardware generated interrupt is caused by hardware (such as I/O completion)
Term
Can traps be generated intentionally by a user program ? If so for what purpose ?
Definition
yes. A user program may start a system call to request an operating system service to be performed. (Since a user program can only execute non-privileged instruction, so when it needs to run some privileged instruction, it has to ask OS to do that for it)
Term
Why are caches useful ?


If caches are so spiffy, why not make a chache that is the size of M. M. ?
Definition
SPeed ! much faster to have cache in between the CPU & M. M.


Expensive to manufacture & memory is lost one the power is shut off
Term
Describe a mechanism for enforcing memory protection in order to prevent a program from modifying the memory associated with other programs
Definition
Use 2 registers, base and limit, to specify the beginning address and the size of the memory allocation of a process. Every time when the process makes a visit to the main memory, the MMU checks to make sure the address is in the range: [base, base+limit]
Term
The interface of an RMI server and client must extend ________ interface
Definition
Remote
Term
What is the purpose of command "rmic" ?
Definition
builds a stub or skeleton of the class file for RMI

"rmic" is no longer needed with JDK 6.0 !!
Term
What is the command that starts the registry of the remote objects ?
Definition
"start RMIregistry"
Term
TRUE OR FALSE:
After a process is loaded into the main memory of a sstem that doent have a memory scheduler, the process changes state among READY, SUSPENDED and BLOCKED, until it terminates
Definition
TRUE
Term
TRUE OR FALSE:

ADMISSION scheduler determines the degree of multiprogramming
Definition
TRUE
Term
TRUE or FALSE:

Unix uses FORK() system call to create a child process, and uses EXEC() to replace the child process' memory space with a new program
Definition
TRUE
Term
TRUE or FALSE
Win32 uses CREATEPROCESS system call to create a new process
Definition
TRUE
Term
TRUE or FALSE

MULTIPROGRAMMING - is a processing technique that loads many jobs in the main memory that will run concurrenlty
Definition
TRUE
Term
Compare "multiprogramming" and "time-sharing" systems (list similarities and diff)
Definition
time-sharing is an extension to multiprogramming

time-sharing gives the illusion tot eh user that he has total acces the the CPU when in reality program time is broken up into "time-slices:

Multiprog and time-sharing are similar in that they create a multitasking environment
Term
Draw an expanded state transition diagram
Definition
see mid-term
Term
Explain how semaphores can be used by a server to limit the number of concurrent connections
Definition
Only N sockets are allocated, acquire() and release() semaphores are used to acquire a socket, if all sockets are being used, acquire() must wait until a socket is free
Term
Explain why spin locks are not appropriate for single- processor systems yet are often used in multiprocessor systems
Definition
single-processor systems: spinlocks waist CPU cycles

Multi-processor system use spinlocks because a thread can sit and "spin" on one processor while another thread/proc is executing on another processor
Term
Look at quiz 6... does it prevent a race condition ?
Definition
no, the "lock" idea doesn't work because two processes could set the lock bit at the same time
Term
What are the 4 necessary conditions for deadlock ?
Definition
mutual exclusion
hold and wait
no preemption
a "circular" wait pattern
Term
explain the differences between internal and external fragmentation
Definition
internal - the memory allocated to a process might be bigger than what the process originally requested

external - many processes cause little chunks of memory to not get used. The more processes, the worse frag gets (50% rule)
Term
do prob #3 on quizlab4
Definition
Deadlock Mofo !!!!!!!!
Term
Consider a paging system with the page table stored in memory. If a memory reference takes 200ns, how long does a paged memory reference take? why ?
Definition
it takes 400ns, 200ns to lookup the page table reference and 200ns to look up the frame contents in memory
Supporting users have an ad free experience!