Exam 1 part B

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

What information is typically stored in a PCB (process control block)?

process identification id of process id of parent user id processor state information user-visible registers control/status registers process control information supplemental info by OS

transitions between states

pg 140 stallings

what is a mode switch

switches mode bit user to kernal -interrupt -trap -system call or kernal mode to user mode

8. What is the purpose of each state and each transition between states in the UNIX Process State Transition Diagram

(pg 169) User Running Executing in user mode. Kernel Running Executing in kernel mode. Ready to Run, in MemoryReady to run as soon as the kernel schedules it. Asleep in Memory Unable to execute until an event occurs; process is in main memory (a blocked state). Ready to Run, SwappedProcess is ready to run, but the swapper must swap the process into main memory before the kernel can schedule it to execute. Sleeping, Swapped The process is awaiting an event and has been swapped to secondary storage (a blocked state). Preempted Process is returning from kernel to user mode, but the kernel preempts it and does a process switch to schedule another process. Created Process is newly created and not yet ready to run. Zombie Process no longer exists, but it leaves a record for its parent process to collect.

1. What is a process?

3 definitions: An instance of a program running on a computer the entity that can be assigned to and executed on a processor A unit of activity characterized by the execution of a sequence of instructions, a current state, and an associated set of system resources

What is the relationship between a process and a PCB (process control block)?

PCB stores information about the processes

What are the states in the 5 state model, and what causes the transitions between the different states?

Running: The process that is currently being executed. For this chapter, we will assume a computer with a single processor, so at most one process at a time can be in this state. •Ready: A process that is prepared to execute when given the opportunity. •Blocked/Waiting: 4A process that cannot execute until some event occurs, such as the completion of an I/O operation. •New: A process that has just been created but has not yet been admitted to the pool of executable processes by the OS. Typically, a new process has not yet been loaded into main memory, although its process control block has been created. •Exit: A process that has been released from the pool of executable processes by the OS, either because it halted or because it aborted for some reason.

0. What is the difference between an implementation which uses user-level threads and one which uses kernel-level threads?

ULT All thread management is done by the application • The kernel is not aware of the existence of threads KLT • Advantages - the kernel can simultaneously schedule many threads of the same process on many processors - blocking is done on a thread level - kernel routines can be multithreaded • Inconveniences - thread switching within the same process involves the kernel. - this results in a significant overhead

what is 7 state process model?

adds ready/suspend and blocked/suspend because in 5 state all processes that have been suspended were in blocked state

new transitions in 7 state

blocked/suspend to ready/suspend on event, Running can go to ready/suspend, new can admit to ready/suspend

Process switch

changes state of process

What data structures are typically used by the operating system to manage processes?

dunno

What is the five-state process model?

the model that has 5 states a process can be in

What is an instruction trace of a process?

the the sequence of instructions that a process runs

concepts of 7 state process model

whether a process is waiting on an event (blocked or not) and whether a process has been swapped out of main memory (suspended or not). Ready: The process is in main memory and available for execution •Blocked: The process is in main memory and awaiting an event. •Blocked/Suspend: The process is in secondary memory and awaiting an event. •Ready/Suspend: The process is in secondary memory but is available for execution as soon as it is loaded into main memory.

9. What is a thread? How is a thread different from a process?

• Viewpoint: thread is an independent program counter (and other context) within a process • All threads within a process share the process resources - when one thread alters a (non-private) memory item, all other threads (of the process) see it - a file opened by one thread is available to others


Set pelajaran terkait

Quiz 5: Testing Lifecycle, Unit Testing, Network Programming

View Set

RN Nursing Care of Children 2016 BB

View Set

Exam: 02.08 Government Regulation

View Set

BLAW 2nd MIDTERM REVIEW QUESTIONS

View Set

MIS - Final Exam - Quizzes and Test

View Set

ATI Engage Fundamentals: Vital Signs

View Set

CIT 15 Chapter 12 Technology in Action 16e Fresno City College Fall 2019

View Set