0% found this document useful (0 votes)
16 views6 pages

Os Iae 1 (A)

Uploaded by

Subash M
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views6 pages

Os Iae 1 (A)

Uploaded by

Subash M
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

ANSWER KEY

1. List different parts of a process.


1.Stack
The process stack contains the temporary data such as method/function parameters, return address and
local variables.
2. Heap
This is dynamically allocated memory to a process during its run time.
3. Text
This includes the current activity represented by the value of Program Counter and the contents of the
processor's registers.
4. Data
This section contains the global and static variables.

2. What is the use of abort() system call?


a. Child has exceeded allocated resources
b. Task assigned to child is no longer required
c. The parent is exiting, and the operating systems does not allow a child to continue if its parent
terminates
3. Differentiate process and thread.
4. Define Dispatch latency.
Dispatch latency – time it takes for the dispatcher to stop one process and start another running.

5. What is Convoy effect?


Convoy effect – Other processes wait for one big process to get off the CPU

PART – B

1. Explain Computer System Architecture in detail.

Computer-System Architecture
• Most systems use a single general-purpose processor
– Most systems have special-purpose processors as well
• Multiprocessors systems growing in use and importance
– Also known as parallel systems, tightly-coupled systems
– Advantages include:
1. Increased throughput
2. Economy of scale
3. Increased reliability – graceful degradation or fault tolerance
– Two types:
1. Asymmetric Multiprocessing – each processor is assigned a specie task.
2. Symmetric Multiprocessing – each processor performs all tasks

Symmetric Multiprocessing Architecture

A Dual-Core Design
• Multi-chip and multicore
• Systems containing all chips
– Chassis containing multiple separate systems
Clustered Systems
• Like multiprocessor systems, but multiple systems working together
– Usually sharing storage via a storage-area network (SAN)
– Provides a high-availability service which survives failures
• Asymmetric clustering has one machine in hot-standby mode
• Symmetric clustering has multiple nodes running applications, monitoring each other
– Some clusters are for high-performance computing (HPC)
• Applications must be written to use parallelization

Operating System Structure


• Multiprogramming (Batch system) needed for efficiency
– Single user cannot keep CPU and I/O devices busy at all times
– Multiprogramming organizes jobs (code and data) so CPU always has one to execute
– A subset of total jobs in system is kept in memory
– One job selected and run via job scheduling
– When it has to wait (for I/O for example), OS switches to another job
 Timesharing (multitasking)is logical extension in which CPU switches jobs so frequently that users can
interact with each job while it is running, creating interactive computing
– Response time should be < 1 second
– Each user has at least one program executing in memory [process
– If several jobs ready to run at the same time [CPU scheduling
– If processes don’t fit in memory, swapping moves them in and out to run
– Virtual memory allows execution of processes not completely in memory
Memory Layout for Multiprogrammed System
2. Discuss in detail about Inter process communication.
Interprocess Communication
 IPC is used by cooperating processes to communicate each other
 IPC is best provided by message- passing systems.
Two models of IPC
– Shared memory
– Message passing

Interprocess Communication – Shared Memory


• An area of memory shared among the processes that wish to communicate
• The communication is under the control of the users processes not the operating system.
• Major issues is to provide mechanism that will allow the user processes to synchronize their
actions when they access shared memory.
Interprocess Communication–Message Passing
Mechanism for processes to communicate and to synchronize their actions
• Message system – processes communicate with each other without resorting to shared variables
• IPC facility provides two operations:
– send(message)
– receive(message)
• The message size is either fixed or variable
•If Processes p and Q want to communicate, they must send messages to and receive messages
from each other
•A communication link must exist between them.
•There are several methods for logically implementing a link and the send/receive operations:
 Direct or indirect communication
 Symmetric or asymmetric communication
 Automatic or explicit buffering
 Send by copy or send by reference
 Fixed-sized or variable sized messages
Direct Communication
• Processes must name each other explicitly:
– send (P, message) – send a message to process P
– receive(Q, message) – receive a message from process Q
Properties of communication link
– Links are established automatically
– A link is associated with exactly one pair of communicating processes
– Between each pair there exists exactly one link
– The link may be unidirectional, but is usually bidirectional
Indirect Communication
• Messages are directed and received from mailboxes (also referred to as ports)
– Each mailbox has a unique id
– Processes can communicate only if they share a mailbox
Primitives are defined as:
send(A, message) – send a message to mailbox A
receive(A, message) – receive a message from mailbox A
Properties of communication link
– Link established only if processes share a common mailbox
– A link may be associated with many processes
– Each pair of processes may share several communication links
– Link may be unidirectional or bi directional
• Mailbox sharing – P1 , P2 , and P3 share mailbox A
– P1 , sends; P2 and P3 receive – Who gets the message?
• Solution depends on the scheme that we choose
– Allow a link to be associated with at most two processes
– Allow only one process at a time to execute a receive operation
– Allow the system to select arbitrarily the receiver. Sender is notified who the receiver was.
Synchronization
• Message passing may be either blocking or non-blocking
• Blocking is considered synchronous
– Blocking send -- the sender is blocked until the message is received
– Blocking receive -- the receiver is blocked until a message is available
• Non-blocking is considered asynchronous
– Non-blocking send -- the sender sends the message and continue
– Non-blocking receive -- the receiver receives: A valid message, or Null message
Different Combinations of send and receive are possible. When both the send and receive are
blocking, we have rendezvous between the sender and receiver.
Buffering
• Messages exchanged by communicating processes reside in a temporary queue.
•Queue can be implemented in one of three ways
1. Zero capacity – Queue has maximum length 0; thus link cannot have any messages waiting in
it. The send must block until the recipient receives the message
2. Bounded capacity – finite length of n messages. Sender must wait if link is full
3. Unbounded capacity – infinite length. Sender never waits
Examples of IPC Systems – Windows
• Message-passing centric via advanced local procedure call (LPC) facility
– Only works between processes on the same system
– Uses ports (like mailboxes) to establish and maintain communication channels
– Communication works as follows:
• The client opens a handle to the subsystem’s connection port object.
• The client sends a connection request.
• The server creates two private communication ports and returns the handle to one of them to
the client.
• The client and server use the corresponding port handle to send messages or callbacks and to
listen for replies.
Local Procedure Calls in Windows

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy