• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/15

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

15 Cards in this Set

  • Front
  • Back

What are the "memory resident" parts of a process?

1) Text (the program code)


2) Heap (for dynamically allocated memory)


3) Data (for global variables)


4) Stack (temporary and scope data)

Fill in the blanks

Fill in the blanks

What are the 7 information pieces held in the Process Control Block (aka the Task Control Block)?

1) Accounting information (time elapsed, CPU used, time limits, etc)


2) Program Counter (next instruction)


3) Program state (running, waiting, etc)


4) CPU registers (what is/was last in the registers)


5) CPU Scheduling info (priority, queue pointers, etc)


6) Memory Management (amount of memory owned by process)


7) I/O Status Info (list of open files, I/O devices allocated to this process

How is a Process Control Block represented in Linux?

it is represented a struct called "task_struct" (in C)

What does the Process Scheduler do?

The Process Scheduler selects the next process. It maintains queues (Job Queue, Ready Queue, Device Queue) and selects from them.

What do fork() and exec() do?

fork() creates a child process and exec() populates its text section of the memory with a new program

What are the two ways a process can be ended and its memory deallocated?

The process can call exit() on itself, or the parent can call abort().

What are the two models of Inter-Process Communication?

1) Shared Memory


2) Message passing

Why is the Shared Memory model for IPC not as great a boost on multiprocessors as it is on single processors?

On multiprocessors, each CPU has its own cache that is synchronized with the shared memory area. Once a shared memory variable is updated, the cache has to be flushed and updated to be in sync. This costs significant amounts of time.

What is XDL (External Data Representation) for?

To help Little-Endian and Big-Endian systems communicate

What are the steps involved in an RPC call?

1) Send function name to server on matchmaker port


2) Server sends back the port number associated with that function name


3) Client sends function to proper port on server


4) Server replies with result

What two functions are offered by message passing APIs (IPC) ?

send(message) and receive(message)

What are the two ways POSIX systems create shared memory IPC slots ?

1) Create or return shared memory segment using shmget(key, ...)




2) Use the same approach as file opening with shm_fd = shm_open(...)

How does Windows implement IPC?

Advanced Local Procedure Calls. Uses ports to establish communication between processes.

Why does using ordinary (aka "unnamed") pipes for message passing require a parent-child relationship between processes?

Because parent process needs to create and pass the location of the pipe to its children.




See code for a better idea


http://thecodecracker.com/c-programming/message-passing-through-pipe/