? ??????????????Take My Breath Away? ????? ?? ???Rating: 4.4 (13 Ratings)??71 Grabs Today. 12572 Total Gra
bs. ??????Preview?? | ??Get the Code?? ?? ?????Our Hearts on Thin Ice? ????? ?? ???Rating: 5.0 (1 Rating)??52 Grabs Today. 4978 Total Grabs. ??????Preview?? | ??Get the Code?? ?? ??? BLOGGER TEMPLATES AND TWITTER BACKGROUNDS ?

Thursday, July 30, 2009

Threads

Threads
Modern OSes (Mach, Chorus, NT, modern Unix)
separate the concepts of processes and threads
◆ The thread defines a sequential execution stream within a
process (PC, SP, registers)
◆ The process defines the address space and general process
attributes (everything but threads of execution)
A thread is bound to a single process
◆ Processes, however, can have multiple threads
Threads become the unit of scheduling
◆ Processes are now the containers in which threads execute
◆ Processes become static, threads are the dynamic entities

>SINGLE THREADED PROCESS

Single threaded programs have one path of execution,can perform only one task at a time, and have to finish each task in sequence before they can start another, For most programs, one thread of execution is all you need, but sometimes it makes sense to use multiple threads in a program to accomplish multiple simultaneous tasks.

>MULTI-THREADED PROCESS

have two or more paths of execution, Multiple threads can be executed in parallel across many computer systems. This is multithreading, and generally occurs by time slicing (similar to time-division multiplexing) across the computer systems

INTERPROCESS COMMUNICATION

INTERPROCESS COMMUNICATION-Interprocess communication (IPC) is a set of programming interfaces that allow a programmer to coordinate activities among different program processes that can run concurrently in an operating system. This allows a program to handle many user requests at the same time. Since even a single user request may result in multiple processes running in the operating system on the user's behalf, the processes need to communicate with each other. The IPC interfaces make this possible. Each IPC method has its own advantages and limitations so it is not unusual for a single program to use all of the IPC methods.

>••DIRECT COMMUNICATION
• Sender/receiver refer to each other, as seen before
• Properties of communication link
– Link is established automatically between communicating processes
– Link is associated with exactly two processes
– Exactly one link for every pair of processes
• Communication is symmetric (above) or asymmetric
– send(P,m) // send a message to P
– receive(&id, m) // receive from any process, set id to sender


>••INDIRECT COMMUNICATION
• Communication via mailboxes (or ports)
• Processes communicate by putting and taking messages in/from mailboxes
– send(A, m) and receive(A,m)
• Properties of communication link
– A link is established between two processes, if they share a mailbox
– Link maybe associated with more than two processes
– A number of different links may exist between any pair of processes; each one a separate mailbox

>••SYNCHRONIZATION
Message passing maybe blocking or non-blocking(synchronous or asynchronous)

>>••BLOCKING SEND
sender blocked until message is received by receiver (or by mailbox)
>>••NONBLOCKING SEND
sending process resumes operation right after sending
>>••BLOCKING RECEIVE
receiver blocks until message is available
>>••NONBLOCKING RECEIVE
receiver retrieves a valid message or returns an error code
>••BUFFERING
• The mechanism that buffers messages (a.k.a. queue) may have the following properties
– Zero capacity: queue has length 0, no messages can be outstanding on link, sender blocks for message exchange
– Bounded capacity: queue has length N, N messages can be in queue at any point in time, sender blocks if queue is full, otherwise it may continue to execute
– Unbounded capacity: queue has infinite length, sender never blocks

>>••ZERO CAPACITY
queue has length 0, no messages can be outstanding on link, sender blocks for message exchange
>>••BOUNDED CAPACITY
queue has length N, N messages can be in queue at any point in time, sender blocks if queue is full, otherwise it may continue to execute
>>••UNBOUNDED CAPACITY-
queue has infinite length, sender never blocks

>••PRODUCER-CONSUMER EXAMPLE

>>••PRODUCER-
Producer picks up an empty message/slotand send back an item produced
>>••CONSUMER-
Consumer sends N empty messages (i.e., slots)
Consumer receives an item and sends back an emptymessage (i.e., a slot)
Messages sent, but not received are buffered by OS.

Thursday, July 16, 2009

INTER PROCESS COMMUNICATION

INTER PROCESS COMMUNICATION-Interprocess Communication (IPC)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) –message size fixed or variable
>>receive(message)
:If P and Q wish to communicate, they need to
>> establish a communication link between them
>> exchange messages via send/receive
:Implementation of communication link
>> physical (e.g., shared memory, hardware bus) considered later
>> logical (e.g., logical properties) now

COOPERATING PROCESS

COOPERATING PROCESS-
:Independent process cannot affect or be affected by the execution of another process.
:Cooperating process can affect or be affected by the execution of another process
: Advantages of process cooperation
>Information sharing
>Computation speed-up
>Modularity
>Convenience

OPERATION'S ON PROCESSESS

PROCESS CREATION
:Parent process creates children processes, which, in turn create other processes, forming a tree of processes.
:Resource sharing
> Parent and children share all resources.
> Children share subset of parent’s resources.
> Parent and child share no resources.
: Execution
>Parent and children execute concurrently.
> Parent waits until children terminate.
:Address space
> Child duplicate of parent.
> Child has a program loaded into it.
: UNIX examples
> fork system call creates new process
> fork returns 0 to child , process id of child for parent
> exec system call used after a fork to replace the process’ memory space with a new program.

PROCESS TERMINATION

:Process executes last statement and asks the operating system to delete it (exit).
>Output data from child to parent (via wait).
> Process’ resources are deallocated by operating system.
: Parent may terminate execution of children processes (abort).
> Child has exceeded allocated resources.F
>Task assigned to child is no longer required.
> Parent is exiting.
>>Operating system does not allow child to continue if its parent terminates.
>> Cascading termination.
: In Unix, if parent exits children are assigned init as parent

PROCESS SCHEDULING

SCHEDULING QUEUE'S

:Job queue – set of all processes in the system.
: Ready queue – set of all processes residing in main memory, ready and waiting to execute. :Device queues – set of processes waiting for an I/O device.
: Processes migrate between the various queues.

SCHEDULERS

:Long-term scheduler (or job scheduler) – selects which processes should be brought into the ready queue
:Short-term scheduler (or CPU scheduler) – selects which process should be executed next and allocates CPU.
:Short-term scheduler is invoked very frequently (milliseconds) => (must be fast).
: Long-term scheduler is invoked very infrequently (seconds, minutes)=> (may be slow). The long-term scheduler controls the degree of multiprogramming.
Processes can be described as either:
I/O-bound process – spends more time doing I/O thancomputations, many short CPU bursts.
CPU-bound process – spends more time doing computations; few very long CPU bursts.

CONTEXT SWITCH
:When CPU switches to another process, the system must save the state of the old process and load the saved state for the new process.
: Context-switch time is overhead; the system does no useful work while switching.
:Time dependent on hardware support.

THE CONCEPTS OF PROCESS IN O.S.

PROCESS CONCEPTS- An operating system executes a variety of programs:
Batch system – jobs
Time-shared systems – user programs or tasks
Textbook uses the terms job and process almost interchangeably.
Process – a program in execution; process execution must progress in sequential fashion.
A process includes:
: program counter
: stack
:data section


PROCESS STATE- As a process executes, it changes STATES

new: The process is being created.
running: Instructions are being executed.
waiting: The process is waiting for some event to occur.
ready: The process is waiting to be assigned to a processor
terminated: The process has finished execution.

PROCESS CONTROL BLOCK-Process Control Block (PCB)
Information associated with each process.
: Process ID
:Process state
:Program counter
:CPU registers
:CPU scheduling information
:Memory-management information
: Accounting informationn
:I/O status information

TRENDS-

Thursday, July 9, 2009

QUIZ NUMBER 3

1.) WHAT ARE THE MAJOR ACTIVITIES OF THE OPERATING SYSTEM WITH REGARDS TO PROCESS MANAGEMENT.


  • PROCESS CREATION AND DELETION
  • PROCESS SUSPENSION AND RESUMPTION
  • PROVISION OF MECHANISM FOR:

-PROCESS SYNCHRONIZATION

-PROCESS COMMUNICATION

-DEADLOCK HANDLING

2.)WHAT ARE THE MAJOR ACTIVITIES OF THE OPERATING SYSTEM WITH REGARDS TO MEMORY MANAGEMENT.

  • KEEP TRACK OF W/C PARTS OF MEMORY ARE CURRENTLY BEING USED AND BY WHOM.
  • DECIDE W/C PROCESSES TO LOAD WHEN MEMORY SPACES BECOMES AVAILABLE.
  • ALLOCATE AND DEALLOCATE MEMORY SPACE AS NEEDED.

3.)WHAT ARE THE MAJOR ACTIVITIES OF THE OPERATING SYSTEM WITH REGARDS TO SECONDARY STORAGE MANAGEMENT.

  • FREE SPACE MANAGEMENT
  • STORAGE ALLOCATION
  • DISK SCHEDULING

4.)WHAT ARE THE MAJOR ACTIVITIES OF THE OPERATING SYSTEM WITH REGARDS TO FILE MANAGEMENT.

  • FILE CREATION AND RELATION
  • DIRECTORY CREATION AND DELETION
  • SUPPORT OF PRIMITIVES FOR MANIPULATING FILES AND DIRECTORIES
  • MAPPING FILES ONTO SECONDARY STORAGE
  • FILE BACKUP ON STABLE(VOLATILE)STORAGE MEDIA

5.)WHAT ARE THE PURPOSE OF COMMAND INTERPRETER

-IT SERVES AS THE INTERFACE BETWEEN THE USER AND THE O.S

-ITS FUNCTION IS TO GET AND EXECUTE THE NEXT COMMAND STATEMENTS.

-IT DEALS WITH:

  • PROCESS CREATION AND MANAGEMENT
  • I/O HANDLING
  • SECONDARY-STORAGE MANAGEMENT
  • MAIN-MEMORY MANAGEMENT
  • FILE-SYSTEM ACCESS
  • PROTECTION
  • NETWORKING

- PROGRAM THAT READ AND INTERPRETS CONTROL STATEMENTS IS CALLED VARIOUSLY:

  • COMMAND LINE INTERPRETER
  • SHELL IN (UNIX)



Tuesday, July 7, 2009

SYSTEM BOOT

>SYSTEM BOOT--->
One of the most important functions that the BIOS plays is to boot up the system. When the PC is first turned on, its main system memory is empty, and it needs to find instructions immediately to tell it what to run to start up the PC. These it finds within the BIOS program, because the BIOS is in read-only permanent memory and so is always available for use, even when the rest of system memory is empty.
This section takes a look at what is involved in booting the PC, including a discussion of the steps in the system boot process, and a look at the power-on self-test (POST) that is conducted whenever the system starts up

SYSTEM GENERATION

- Operating systems are designed to run on any of a class of machines; the system must be configured for each specific computer site- SYSGEN program obtains information concerning the specific configuration of the hardware system- Booting
– starting a computer by loading the kernel- Bootstrap program
– code stored in ROM that is able to locate the kernel, load it into memory, and start its execution

Virtual Machine

>Virtual Machine--->A virtual machine, simply put, is a virtual computer running on a physical computer. The virtual machine emulates a physical machine in software. This includes not only the processor but the instruction set, the memory bus, any BIOS commands and critical machine hardware such as the system clock and and DMA hardware. Depending upon the machine peripheral devices are generally virtualized including storage devices like floppy drives, hard drives and CD drives. Video, keyboard and mouse support are also common. A virtual machine must look and act just like the real thing so standard software, like operating systems and applications, can run without modification.

>Benefits--->Virtual machines have been around for a long time but they really have not become common place in many development shops. It is unfortunate since virtual machines provide so many benefits to developers and testers alike. This article will discuss some of the benefits of virtual machines and review two of the most popular virtual machine software packages available for Windows.


>Examples--->

Thursday, July 2, 2009

SYSTEM STRUCTURES

Simple Structure
-->View the OS as a series of levels
-->Each level performs a related subset of functions
-->Each level relies on the next lower level to perform more primitive functions
-->This decomposes a problem into a number of more manageable subproblems
Layred Approach
The operating system is divided into a number of layers (levels), each built on top of lower layers. The bottom layer (layer 0), is the hardware; the highest (layer N) is the user interface.With modularity, layers are selected such that each uses functions (operations) and services of only lower-level layers.A process is a program in execution. A process needs certain resources: CPU time, memory (address space), files, and I/O devices, to accomplish its task.

SYSTEM CALLS

>PROCESS CONTROL---> is a statistics and engineering discipline that deals with architectures, mechanisms, and algorithms for controlling the output of a specific process. See also control theory.For example, heating up the temperature in a room is a process that has the specific, desired outcome to reach and maintain a defined temperature (e.g. 20°C), kept constant over time. Here, the temperature is the controlled variable. At the same time, it is the input variable since it is measured by a thermometer and used to decide whether to heat or not to heat. The desired temperature (20°C) is the setpoint. The state of the heater (e.g. the setting of the valve allowing hot water to flow through it) is called the manipulated variable since it is subject to control actions


>FILE MANAGEMENT--->

Also referred to as simply a file system or filesystem. The system that an operating system or program uses to organize and keep track of files. For example, a hierarchical file system is one that uses directories to organize files into a tree structure.
Although the operating system provides its own file management system, you can buy separate file management systems. These systems interact smoothly with the operating system but provide more features, such as improved backup procedures and stricter file protection.

>DEVICE MANAGEMENT--->Device Management is a set of technologies, protocols and standards used to allow the remote management of mobile devices, often involving updates of firmware over the air (FOTA). The network operator, handset OEM or in some cases even the end-user (usually via a web portal) can use Device Management, also known as Mobile Device Management, or MDM, to update the handset firmware/OS, install applications and fix bugs, all over the air. Thus, large numbers of devices can be managed with single commands and the end-user is freed from the requirement to take the phone to a shop or service center to refresh or update.
For companies, a Device Management system means better control and safety as well as increased efficiency, decreasing the possibility for device downtime. As the number of smart devices increases in many companies today, there is a demand for managing, controlling and updating these devices in an effective way. As mobile devices have become true computers over the years, they also force organizations to manage them properly. Without proper management and security policies, mobile devices pose threat to security: they contain lots of information, while they may easily get into wrong hands. Normally an employee would need to visit the IT / Telecom department in order to do an update on the device. With a Device Management system, that is no longer the issue. Updates can easily be done "over the air". The content on a lost or stolen device can also easily be removed by "wipe" operations. In that way sensitive documents on a lost or a stolen device do not arrive in the hands of others.

>INFORMATION MAINTENANCE---> Information management (IM) is the collection and management of information from one or more sources and the distribution of that information to one or more audiences. This sometimes involves those who have a stake in, or a right to that information. Management means the organization of and control over the structure, processing and delivery of information.Throughout the 1970s this was largely limited to files, file maintenance, and the life cycle management of paper-based files, other media and records. With the proliferation of information technology starting in the 1970s, the job of information management took on a new light, and also began to include the field of Data maintenance. No longer was information management a simple job that could be performed by almost anyone. An understanding of the technology involved, and the theory behind it became necessary. As information storage shifted to electronic means, this became more and more difficult. By the late 1990s when information was regularly disseminated across computer networks and by other electronic means, network managers, in a sense, became information managers. Those individuals found themselves tasked with increasingly complex tasks, hardware and software. With the latest tools available, information management has become a powerful resource and a large expense for many organizations.

OPERATING SYSTEM SERVICE

>program execution – system capability to load a program into memory and to run it.
>I/O operations – since user programs cannot execute I/O operations directly, the operating system must provide some means to perform I/O.
>File-system manipulation – program capability to read, write, create, and delete files.
>Communications – exchange of information between processes executing either on the same computer or on different systems tied together by a network. Implemented via shared memory or message passing.
>Error detection – ensure correct computing by detecting errors in the CPU and memory hardware, in I/O devices, or in user programs.

SYSTEM COMPONENTS

>OPERATING SYSTEM PROCESS MANAGEMENT--->In operating systems, process is defined as “A program in execution”. Process can be considered as an entity that consists of a number of elements, including: identifier, state, priority, program counter, memory pointer, context data, and I/O request. The above information about a process is usually stored in a data structure, typically called process block.

>MAIN MEMORY MANAGEMENT--->Memory management is the act of managing computer memory. In its simpler forms, this involves providing ways to allocate portions of memory to programs at their request, and freeing it for reuse when no longer needed. The management of main memory is critical to the computer system.
Virtual memory systems separate the memory addresses used by a process from actual physical addresses, allowing separation of processes and increasing the effectively available amount of RAM using disk swapping. The quality of the virtual memory manager can have a big impact on overall system performance.
Garbage collection is the automated allocation, and deallocation of computer memory resources for a program. This is generally implemented at the programming language level and is in opposition to manual memory management, the explicit allocation and deallocation of computer memory resources.

>TITLE MANAGEMENT--->

>I/O SYSTEM MANAGEMENT--->

The I/O system consists of:
ô>A buffer-caching system

ô>A general device-driver interface

ô>Drivers for specific hardware devices

>SECONDARY STORAGE MANAGEMENT---> Since main memory (primary storage) is volatile and too small to accommodate all data and programs permanently, the computer system must provide secondary storage to back up main memory.
Most modern computer systems use disks as the principle on-line storage medium, for both programs and data.
The operating system is responsible for the following activities in connection with disk management:
Free space management
Storage allocation
Disk scheduling

>PROTECTION SYSTEM--->Protection System is rather anyware, i.e commercial software that applies extremely annoying ads to convince users of the need to buy it (buying Protection System means registering this program for at least one year period). We have to stress on that registering Protection System is no escape from its alerts as the hackers’ design is to get endless cashflow from user who once agreed to pay. That is, registered Protection System will ask for updates and extended registration. There is thus ho way to get rid of Protection System’s noisy ads but to remove Protection System entirely. to detect the infections harming your computer system and to remove Protection System automatically.

>COMMAND INTERPRETER SYSTEM--->A hardware accelerated I/O data processing engine to execute a minimum number of types of I/O data processing commands in response to a stimulus from a host computer. The data processing engine, referred to as a command interpreter includes a command queue, a logic unit, a multiple purpose interface, at least one memory, and a controlling state machine, that each operate in concert with each other and without software control. The types of commands executed by the command interpreter can include, but are not limited to, an Initialize, Copy, DMA Read, DMA Write, Cumulative Exclusive OR, Verify, Compare, and ECC Check. The execution of commands that specify a source data location and a destination data location are characterized by a plurality of reads to an internal cache from the source data location for each bulk write from the internal cache to the destination data location. The locations of the data operated on by the command interpreter include a local I/O controller memory and a non-local I/O controller memory accessible to the command interpreter by way of an I/O bus.