Basic Concepts and Role of Operating Systems
- An OS manages hardware and acts as an intermediary between users and hardware, providing a foundation for application programs.
- The OS kernel is the core component loaded initially during startup and has direct hardware access, remaining resident in memory.
- The start-up process involves a bootstrap program that loads the OS kernel into memory.
Hardware Components and System Structure
- Components include the CPU, main memory, secondary memory, and...
1. The doctor orders 115mg Tylenol Elixir.
Available: Bottle of Tylenol Elixir 250ml with a concentration of 80mg/ml.
a) What volume would you draw up?
1.44 mL (dose ordered/concentration) = 1.44 mL =(1.4375)
b) The safe dose for Tylenol is 10-15mg/kg. The child weighs 20lbs, Is the above Tylenol order safe?
90-136 mg per dose - Yes (20lbs/2.2=9.1kg) 10*9.1=91mg
2. Gentamycin 60mg is ordered q4h. The drug available is 80mg/2ml.
a) What volume would you draw up.
1.5mL (60/80=
| Inet4Address | Inet6Address |
|---|---|
| Represents IPv4 address. | Represents IPv6 address. |
| 32-bit address. | 128-bit address. |
| Dotted decimal format (e.g., 192.168.1.1). | Hexadecimal colon format (e.g., 2001:db8::1). |
| Limited address space (about 4.3 billion). | Very large address space (2¹²⁸). |
| Simple header structure. | More advanced and larger header. |
Subclass of InetAddress for IPv4. |
Subclass of InetAddress for IPv6. |
| URLConnection | HttpURLConnection |
|---|---|
| Superclass for all types of URL connections. |
How the internet works
A) Web Protocols
HTTP: Used for transfering hypertext requests and info on the WWW. Governs communication between the web server and the web browser
HTTPS: Extension of http, creates a layer of security of encription - uses SSL/TLS to ensure commmunication.
B) File Protocols
FTP: (File transfer prot):: Transfer files between client and a server-simple way to upload and download
FTPS: similar to HTTP's adds a layer of security
SFTP(SSHFILE TRANSFER PROTOCOL=: provides secure
EXP 2 — Multi User Chat Server (TCP)
Server
1. Start server
2. Create ServerSocket, bind to port
3. Display server started
4. Accept client connection
5. Assign unique client ID
6. Send ID to client
7. Store client in list
8. Create thread for client
9. Read client messages continuously
10. Display messages on server
11. Enter target client ID & message for private send
12. Send message to selected client
13. Remove disconnected client
14. Repeat for new clients
Client
1. Start client
(Q.1) Classic Waterfall Model:
The Classic Waterfall Model is a sequential software development model where the development process flows step-by-step like a waterfall. Each phase must be completed before moving to the next phase, and there is usually no going back.
Phases of Waterfall Model:
Requirement Analysis – Collect and analyze all system requirements from the user.
System Design – Plan the architecture, database, and system design.
Implementation (Coding) – Developers write the
Secularisation, the process by which religion loses its social and cultural significance, has significantly influenced the Catholic Church in Aotearoa NZ by contributing to a decline in traditional affiliation among certain demographics. The 2013 Census data illustrates this trend, showing that while nationally 55 percent of the population had a religious affiliation, this represents a decline from previous years. Government Statistician Liz MacPherson noted that "Auckland was the only region
ygame Game Loop
Definition:
Game loop in Pygame is a continuous loop that keeps the game running by handling input, updating logic, and rendering output.
Steps:
Input: Get user input
Update: Update game state
Render: Display on screen
Concept:
Runs continuously until game ends
Each cycle is called a frame
Explanation:
Keeps game active
Controls flow of game
Application:
Used in all Pygame projects
Helps create real-time games
Event Handling in Pygame
Definition:
Event handling is the process of detecting and responding
Pygame Study Notes
1. 🧩 Basic Pygame Functions
Pygame is a Python library used to create games.
🔹 Common Functions
• pygame.init()
→ Initializes all Pygame modules
• pygame.display.set_mode((width, height))
→ Creates the game window
• pygame.display.set_caption("Title")
→ Sets window title
• screen.fill(color)
→ Fills screen with a color
• pygame.display.update()
→ Updates the screen
• pygame.time.Clock()
→ Controls game speed (FPS)
2. 🎯 Events (Keyboard & Mouse)