B L O G G E R

--> This is JAN AUSTIN EVANGELISTA hir signing..

9. Hardware Protection


-> DUAL-MODE PROTECTION
• Sharing system resources requires operating system to ensure
that an incorrect program cannot cause other programs to
execute incorrectly.

• Provide hardware support to differentiate between at least two
modes of operations.
1. User mode – execution done on behalf of a user.
2. Monitor mode (also supervisor mode or system mode) –
execution done on behalf of operating system.

• Mode bit added to computer hardware to indicate the current
mode: monitor (0) or user (1).

• When an interrupt or fault occurs hardware switches to monitor
mode



• Privileged instructions can be issued only in monitor mode.

-> I/O PROTECTION
• All I/O instructions are privileged instructions.
• Must ensure that a user program could never gain control of the computer in monitor mode (i.e., a user program that, aspart of its execution, stores a new address in the interrupt vector).

Use of a System Call to Perform an I/O



-> MEMORY PROTECTION
• Must provide memory protection at least for the interrupt vectorand the interrupt service routines.
• In order to have memory protection, add two registers thatdetermine the range of legal addresses a program may access:

– base register
– holds the smallest legal physical memoryaddress.
– limit register
– contains the size of the range.

• Memory outside the defined range is protected.



-> CPU PROTECTION
• Timer
– interrupts computer after specified period to ensure operating system maintains control.
– Timer is decremented every clock tick.
– When timer reaches the value 0, an interrupt occurs.
• Timer commonly used to implement time sharing.
• Time also used to compute the current time.
• Load-timer is a privileged instruction.

8. Storage Structure


-> MAIN MEMORY
main memory (main store, main storage, RAM, primary memory). The storage that is closely associated with the processor of a computer system and from which the program instruction and data can be directly retrieved and to which the resulting data is written prior to transfer to backing store or output device. In modern machines this is semiconductor memory but in earlier machines core stores and delay lines were used.

The majority of storage activity generated by a processor in the execution of a program is directed at the main memory. In a modern processor, however, there is usually a further small high-speed memory interposed between the processor and main memory that holds recently accessed main-memory data for rapid re-access. This small high-speed memory is known as a cache. The main memory is normally used in conjunction with a backing store with a much larger capacity.

-> MAGNETIC DISK
magnetic disk. Plastic disk coated with magnetic material and used for storing computer programs and data (information) as a series of magnetic spots. Most computers contain a hard disk unit for general storage. Hard magnetic disks can store larger amounts of data and come in cartridges that slot into a special drive unit. Computers also often have a disk drive for inserting portable, lower-capacity compact discs or floppy disks. Data is stored magnetically on both sides of a floppy disk, and is read by magnetic heads in the computer as the disk rotates.

It provide the bulk of secondary storage for modern computer systems. Conceptually, disks are relatively simple. Each disk platter has a flat circular shape, like a CD. Common platter diameters range from 1.8 to 5.25 inches. the two surfaces of a platter are covered with a magnetic material. We store information be recording it magnetically on the platters.

Moving-head disk mechanism



-> MAGNETIC TAPES
magnetic tape. It was used as an early secondary-storage medium. Although it is relatively permanent and can hold large quantities of data, its access time is slow in comparison to that of main memory. In addition, random access to magnetic tape is about a thousand times slower than random access to magnetic disk, so tapes are not very useful for secondary storage. Tapes are used mainly for backup, for storage of infrequently used information, and as a medium for transfering information from one system to another.

A tape is kept in a spool, and is wound or rewound past a read-write head. Moving to the correct spot on a tape can take minutes, but once positioned, tape drives can write data at speeds comparable to disk drives. Tape capacities vary greatly, depending on the particular kind of tape drive. Some tapes hold 2 to 3 times more data than does a large disk drive. Tapes and their drivers are usually categorized by width, including 4, 8, and 19 millimeters, 1/4 and 1/2 inch.

5. Device Status Table


-> Device-Status Table contains entry for each I/O device indicating its type, address, and state.

->>A diagram of a Device-Status Table<<-


10. Storage Hierarchy


• Storage systems organized in hierarchy.
Speed
Cost
Size
Volatility

STORAGE HEIRARCHY(MEMORY HEIRARCHY)


-> CACHING
copying information into faster storage system; main memory can be viewed as a cache for secondary storage.

• improve performance where a large access-time or transfer-rate disparity exists between two components) Memory caching: add cache (faster and smaller memory) between CPU and main memory
--> When need some data, check if it’s in cache
-->If yes, use the data from cache
--> If not, use data from main memory and put a copy in cache
– Disk caching: main memory can be viewed as a cache for disks

-> Cache COHERENCY and CONSISTENCY
Cache coherency in multiprocessor systems
- Each CPU has a local cache
- A copy of X may exist in several caches --> must make sure that an update of X in one cache is immediately reflected in all other caches where X resides
- Hardware problem

Cache consistency in distributed systems
- A master copy of the file resides at the server machine
- Copies of the same file scattered in caches of different client machines
- Must keep the cached copies consistent with the master file
- OS problem

7. Difference of RAM and DRAM


-> The difference of RAM and DRAM is:

RAM - Random Access Memory - is a form of computer data storage. Takes the form of integrated circuits that allow stored data to be accessed in any order (i.e., at random).

DRAM - Dynamic Random Access Memory - is a type of random access memory that stores each bit of data in a separate capacitor within an integrated circuit. Since real capacitors leak charge, the information eventually fades unless the capacitor charge is refreshed periodically. Because of this refresh requirement, it is a dynamic memory as opposed to SRAM and other static memory.

6. Direct Memory Access


-> Direct memory access (DMA) is a feature of modern computers and microprocessors that allows certain hardware subsystems within the computer to access system memory for reading and/or writing independently of the central processing unit.
DMA including disk drive controllers, graphics cards, network cards and sound cards. DMA is also used for intra-chip data transfer in multi-core processors, especially in multiprocessor system-on-chips, where its processing element is equipped with a local memory (often called scratchpad memory) and DMA is used for transferring data between the local memory and the main memory.
Computers that have DMA channels can transfer data to and from devices with much less CPU overhead than computers without a DMA channel. Similarly a processing element inside a multi-core processor can transfer data to and from its local memory without occupying its processor time and allowing computation and data transfer concurrency.

4. User Mode


-> Enables multiple virtual systems (known as guests) to run as an application within a normal system (known as the host). As each guest is just a normal application running as a process in user space, this approach provides the user with a way of running multiple virtual machines on a single piece of hardware, offering excellent security and safety without affecting the host environment's configuration or stability.

3. Monitor Mode


-> Monitor mode, or RFMON (Radio Frequency Monitor) mode, allows a computer with a wireless network interface card (NIC) to monitor all traffic received from the wireless network. Unlike promiscuous mode, which is also used for packet sniffing, monitor mode allows packets to be captured without having to associate with an access point or ad-hoc network first. Monitor mode only applies to wireless networks, while promiscuous mode can be used on both wired and wireless networks. Monitor mode is one of the six modes that 802.11 wireless cards can operate in: Master (acting as an access point), Managed (client, also known as station), Ad-hoc, Mesh, Repeater, and Monitor mode.

2. Difference of interrupt and trap and their use.


-> An interrupt is a hardware-generated change-of-flow within the system. An interrupt handler is summoned to deal with the cause of the interrupt; control is then returned to the interrupted context and instruction. A trap is a software-generated interrupt. An interrupt can be used to signal the completion of an I/O to obviate the need for device polling. A trap can be used to call operating system routines or to catch arithmetic errors.

1. Bootstrap Program


-> Bootstrapping process that starts operating systems when the user turns on a computer system.

3. What's the diference between Batch System, Multiprogrammed system and Time-sharing system?


* A batch system is one in which jobs are bundled together with the instructions necessary to allow them to be processed without intervention

* As machines with more and more memory became available, it was possible to extend the idea of multiprogramming (or multiprocessing) as used in spooling batch systems to create systems that would load several jobs into memory at once and cycle through them in some order, working on each one for a specified period of time

* The first involved timesharing or timeslicing. The idea of multiprogramming was extended to allow for multiple terminals to be connected to the computer, with each in-use terminal being associated with one or more jobs on the computer. The operating system is responsible for switching between the jobs, now often called processes, in such a way that favored user interaction. If the context-switches occurred quickly enough, the user had the impression that he or she had direct access to the computer.

4. Explain the advantages of Parallel System.


> Multiprocessor system with more than one CPU in close communication.
> Tightly coupled system - processor share memory and a clock; communication usually takes place through the share memory.

Advantage of Parallel system:
-- Increased throughput
-- Economical
-- Increased reliability
> graceful degradation
> fail-soft systems

1. What is the difference of an OS in terms of user's view and system's view?


-Differences:

User view

The user view of the computer varies by the interface being used. Most computer users sit in front of a PC, consisting of a monitor, keyboard, mouse and system unit. Such a system is designed for one user to monopolize its resources, to maximize the work that the user is performing. In this case,the operating system is designed mostly for ease of use, with some attention paid to performance, and none paid to resource utilization.

Some users sit at a terminal connected to a mainframe or minicomputer. Other users are accessing the same computer through other terminals. These users share resources and may exchange information. The operating system is designed to maximize resource utilization.

Other users sit at workstations, connected to networks of other workstations and servers. These users have dedicated resources at their disposal, but they also share resources such as networking and servers.

Recently, many varieties of handheld computers have come into fashion. These devices are mostly standalone, used singly by individual users. Some are connected to networks, either directly by wire or through wireless modems. Due to power and interface limitations they perform relatively few remote operations. These operating systems are designed mostly for individual usability, but performance per amount of battery life is important as well.

Some computers have little or no user view. For example, embedded computers in home devices and automobiles may have numeric keypad, and may turn indicator lights on or off to show status, but mostly they and their operating systems are designed to run without user intervention.

System View

We can view an operating system as a resource allocator. A computer system has many resources - hardware and software - that may be required to solve a problem. The operating system acts as the manager of these resources.

An operating system can also be viewed as a control program that manages the execution of user programs to prevent errors and improper use of the computer. It is especially concerned with the operation and control of I/O devices.

We have no universally accepted definition of what is part of the operating system. A simple viewpoint is that it includes everything a vendor ships when you order “the operating system”.

A more common definition is that the operating system is the one program running at all times on the computer (usually called the kernel), with all else being application programs. This is the one that we generally follow.

2. Explain the goals of OS.


- It is easier to define an operating system by what it does than what it is, but even this can be tricky. The primary goal of some operating system is convenience for the user. The primary goal of other operating system is efficient operation of the computer system. Operating systems and computer architecture have influenced each other a great deal. To facilitate the use of the hardware, researchers developed operating systems. Users of the operating systems then proposed changes in hardware design to simplify them. In this short historical review, notice how identification of operating-system problems led to the introduction of new hardware features.

6. Difference between Client Server System and Peer-to-Peer System.


The difference between the two are as follows:

Client-server computing or networking is a distributed application architecture that partitions tasks or work loads between service providers (servers) and service requesters, called clients. Often clients and servers operate over a computer network on separate hardware. A server is a high-performance host that is a registering unit and shares its resources with clients. A client does not share any of its resources, but requests a server's content or service function. Clients therefore initiate communication sessions with servers which await (listen to) incoming requests.

->> sample diagram of a Client-server system works:



Peer-to-peer (P2P) networking is a method of delivering computer network services in which the participants share a portion of their own resources, such as processing power, disk storage, network bandwidth, printing facilities. Such resources are provided directly to other participants without intermediary network hosts or servers. Peer-to-peer network participants are providers and consumers of network services simultaneously, which contrasts with other service models, such as traditional client-server computing.

->> sample diagram of a Peer-to-peer system works:


8. Define the essential properties of the following types of OS: (a)Batch, (b)Time Sharing, (c)Real Time, (d)Network, (e)Distributed, and (f)Handheld


a. Batch. Jobs with similar needs are batched together and run through the computer as a group by an operator or automatic job sequencer. Performance is increased by attempting to keep CPU and I/O devices busy at all times through buffering, off-line operation, spooling, and multiprogramming. Batch is good for executing large jobs that need little interaction; it can be submitted and picked up later.Answers to
b. Time sharing. Uses CPU scheduling and multiprogramming to provide economical interactive use of a system. The CPU switches rapidly from one user to another. Instead of having a job defined by spooled card images, each program reads its next control card from the terminal, and output is normally printed immediately to the screen.
c. Real time. Often used in a dedicated application. The system reads information from sensors and must respond within a fixed amount of time to ensure correct performance.
d. Network. networked systems consist of multiple computers that are networked together, usually with a common operating system and shared resources. Users, however, are aware of the different computers that make up the system.
e. Distributed. Distributes computation among several physical processors. The processors do not share memory or a clock. Instead, each processor has its own local memory. They communicate with each other through various communication lines,
such as a high-speed bus or telephone line.
d. Handheld. designed to provide an environm,ent in which a user easily interface with the computer to execute programs.

7. Differentiate the design issues of Os between Stand Alone PC and Workstation connected to a network.


- The difference between the two is that a Stand Alone PC practice a none to resource utilization, it imposes monopolization and implies no sharing of resources (like information, file, data, etc.). While a Workstation connected to a network is designed to maximize resource utilization where you can exchange information with a others via internet.

or

- A stand-alone PC works on its own. While in a workstation connected to a network, you can freely share your files and databases to other PC.A desktop or laptop computer that is used on its own without requiring a connection to a local area network (LAN) or wide area network (WAN). Although it may be connected to a network, it is still a stand-alone PC as long as the network connection is not mandatory for its general use.In offices throughout the 1990s, millions of stand-alone PCs were hooked up to the local network for file sharing and mainframe access. Today, computers are commonly networked in the home so that family members can share an Internet connection as well as printers, scanners and other peripherals. When the computer is running local applications without Internet access, the machine is technically a stand-alone PC. A workstation is a high-end microcomputer designed for technical or scientific applications. Intended primarily to be used by one person at a time, they are commonly connected to a local area network and run multi-user operating systems. The term workstation has also been used to refer to a mainframe computer terminal or a PC connected to a network.

5. Difference between Symmetric Multiprocessing and Asymmetric Multiprocessing.


- Symmetric multiprocessing treats all processors as equals, and I/O can be processed on any CPU. Asymmetric multiprocessing has one master CPU and the remainder CPUs are slaves. The master distributes tasks among the slaves, and I/O is usually done by the master only. Multiprocessors can save money, by not duplicating power supplies, housings, and peripherals. They can execute programs more quickly, and can have increased reliability. They are also more complex in both hardware and software than uniprocessor systems.

Welcome

=] an eXciting WORLD awaits you [=

"dount count your
friends
on a
SUNNY DAY
when the sky is blue
and
laughter is
abundant.
Instead,
wait for the
STORM
when the clouds are dark
and
smiles are
scarce.
When someone
stands
besides
you
and
lift your
SPIRITs high,
then you'll
know who deserves
to be
called
FRIENDS..
"

Followers

Labels